Skip to content

Commit

Permalink
Merge pull request #16 from TurtleRover/dev
Browse files Browse the repository at this point in the history
TurtleOS 1.2
  • Loading branch information
bjsowa authored Dec 21, 2018
2 parents baee112 + c520a31 commit cbea9b6
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 63 deletions.
22 changes: 0 additions & 22 deletions .circleci/config.yml

This file was deleted.

22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,33 @@ We are using identical login: `pi` and password: `raspberry`, as official Raspbi
* Turtle Rover configs
### System tweaks
* Patch sshd to disallow client to pass locale environment variables
* Add custom `hostapd.service`
* Add `turtle.service`
* Install `hostapd`
* Install `uv4l` and custom config
* Install `rng-tools` to feed hwrng into /dev/random
* Install `vim` and `tmux`
### Network tweaks
* Patch `hosts`
* Add udev rules for network interface names
* Internal wifi interface `wlan_int`
* External wifi interface `wlan_ext`
* Add systemd network files
* External wifi interface (hotspot) `wlan0ext`, ip:`10.0.0.1`, default SSID: `TurtleRover-XXYYY`, password: `password`
* Internal wifi interface `wlan0int`
* Add custom `wpa_supplicant-wlan0int.conf`
* Internal eth interface `eth0`, ip:`DHCP`
* External wifi interface `wlan_ext`, ip:`10.0.0.1`
* Install `dnsmasq`
* Install `hostapd`
* Install `NetworkManager`
* Add custom `dnsmasq.conf`
* Add custom `hostapd.service`
* Add custom `hostapd.conf` (hotspot)
* interface: `wlan_ext`, SSID: `TurtleRover-XXYYY`, password: `password`
* Add custom `NetworkManager.conf`
* ignore `eth0` and `wlan_ext` interfaces (control only `wlan_int`)
* Add custom `resolvconf.conf`
* Add custom `sysctl.conf`
* Install `dnsmasq`

### Custom software
* [Turtle Control Software](https://github.com/TurtleRover/tcs)
* [OpenOCD](https://github.com/TurtleRover/openocd)

## How it works
* [First of read readme from original pi-gen repo](https://github.com/RPi-Distro/pi-gen)
Expand Down
2 changes: 1 addition & 1 deletion pi-gen-overlay/stage3/01-sys-tweaks/01-packages
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jq python3-pip wiringpi
jq python3-pip wiringpi rng-tools vim tmux
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
NAME=TurtleOS
VERSION="1.1"
VERSION="1.2"
ID=turtleos
VERSION_ID=1.1
PRETTY_NAME="TurtleOS 1.1"
VERSION_ID=1.2
PRETTY_NAME="TurtleOS 1.2"
HOME_URL="https://github.com/TurtleRover/turtleos"
BUG_REPORT_URL="https://github.com/TurtleRover/turtleos/issues"
BUILD_ID=
2 changes: 1 addition & 1 deletion pi-gen-overlay/stage3/02-net-tweaks/00-packages
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dnsmasq hostapd
dnsmasq hostapd network-manager
4 changes: 3 additions & 1 deletion pi-gen-overlay/stage3/02-net-tweaks/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash -e

install -v -m 644 files/etc/wpa_supplicant/*.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"
install -v -m 644 files/etc/*.conf "${ROOTFS_DIR}/etc/"
install -v -m 644 files/etc/hostapd/hostapd.conf "${ROOTFS_DIR}/etc/hostapd/"

Expand All @@ -9,9 +8,12 @@ install -v -m 644 files/etc/systemd/system/*.service "${ROOTFS_DIR}/etc/systemd/

install -v -m 644 files/etc/udev/rules.d/*.rules "${ROOTFS_DIR}/etc/udev/rules.d/"

install -v -m 644 files/etc/NetworkManager/NetworkManager.conf "${ROOTFS_DIR}/etc/NetworkManager/"

echo "=>Performing enabling/disabling of services"
on_chroot <<-EOF
systemctl disable dhcpcd
systemctl enable systemd-networkd
systemctl enable hostapd
systemctl enable NetworkManager
EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[keyfile]
unmanaged-devices=interface-name:wlan_ext,interface-name:eth0
6 changes: 3 additions & 3 deletions pi-gen-overlay/stage3/02-net-tweaks/files/etc/dnsmasq.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bogus-priv

# Add other name servers here, with domain specs if they are for
# non-public domains.
server=8.8.8.8@wlan0int
server=8.8.8.8@wlan_int

# Example of routing PTR queries to nameservers: this will send all
# address->name queries for 192.168.3/24 to nameserver 10.1.2.3
Expand All @@ -87,7 +87,7 @@ server=8.8.8.8@wlan0int

# You can control how dnsmasq talks to a server: this forces
# queries to 10.1.2.3 to be routed via eth1
# server=10.0.0.1@wlan0ext
# server=10.0.0.1@wlan_ext

# and this sets the source (ie local) address used to talk to
# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that
Expand Down Expand Up @@ -669,6 +669,6 @@ dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com,rover
#dhcp-mac=set:client_is_a_pi,B8:27:EB:*:*:*
#dhcp-reply-delay=tag:client_is_a_pi,2

interface=wlan0ext
interface=wlan_ext

dhcp-range=wlan_external,10.0.0.10,10.0.0.200,12h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface=wlan0ext
interface=wlan_ext
driver=nl80211
ssid=TurtleRover-XXYYY
hw_mode=g
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Match]
Name=wlan0ext
Name=wlan_ext

[Network]
Address=10.0.0.1/24
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Before=graphical.target
After=remote-fs.target
After=network-online.target
Wants=network-online.target
BindsTo=sys-subsystem-net-devices-wlan0ext.device
After=sys-subsystem-net-devices-wlan0ext.device
BindsTo=sys-subsystem-net-devices-wlan_ext.device
After=sys-subsystem-net-devices-wlan_ext.device

[Service]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
KERNEL=="wlan*",ENV{ID_NET_DRIVER}=="brcmfmac",NAME="wlan0int"
KERNEL=="wlan*",ENV{ID_USB_DRIVER}=="rt2800usb",NAME="wlan0ext",ENV{SYSTEMD_WANTS}="hostapd.service"
KERNEL=="wlan*",ENV{ID_NET_DRIVER}=="brcmfmac",NAME="wlan_int"
KERNEL=="wlan*",ENV{ID_USB_DRIVER}=="rt2800usb",NAME="wlan_ext",ENV{SYSTEMD_WANTS}="hostapd.service"

This file was deleted.

2 changes: 1 addition & 1 deletion pi-gen-overlay/stage3/11-install-openocd/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "=> Retrieving latest OpenOCD..."

URL=$(curl -sS --header "Authorization: token $GITHUB_TOKEN" \
--header 'Accept: application/vnd.github.v3.raw' \
https://api.github.com/repos/TurtleRover/openocd/releases/latest | jq -r '.assets[0].browser_download_url')
https://api.github.com/repos/TurtleRover/turtleos-openocd/releases/latest | jq -r '.assets[0].browser_download_url')

curl -L $URL --output "$ROOTFS_DIR"/tmp/install/openocd.deb

Expand Down
9 changes: 7 additions & 2 deletions prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@ RED=$(sgr 31)
GREEN=$(sgr 38 5 2)
RST=$(sgr 0)

export IMG_NAME='turtleos'
export IMG_NAME='TurtleOS'
export IMG_DATE="$(date +%Y%m%d)"
export DEBIAN_FRONTEND='noninteractive'
export LC_ALL='C.UTF-8'

if [ -n "${TRAVIS_TAG:-}" ]; then
export IMG_DATE="$TRAVIS_TAG"
export IMG_FILENAME="${IMG_NAME}-${TRAVIS_TAG}-${IMG_DATE}"
else
export IMG_FILENAME="${IMG_NAME}-${IMG_DATE}"
fi

export ZIP_FILENAME=$IMG_FILENAME

if ! [ -n "${GITHUB_TOKEN:-}" ]; then
. GITHUB_TOKEN
export GITHUB_TOKEN="$GITHUB_TOKEN"
Expand Down

0 comments on commit cbea9b6

Please sign in to comment.