-
Notifications
You must be signed in to change notification settings - Fork 1
/
env
71 lines (61 loc) · 2.95 KB
/
env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Compressed Raspberry image file to use.
IMGXZ=2024-03-15-raspios-bookworm-arm64-lite.img.xz
# Image parameters to be set
USERNAME="pi" # TODO: changing the default username needs some work, don't change
USERPASS="changeme123"
# By default includes current user's SSH key, can be any other key or multiple keys
# SSHKEYS="$(cat ~/.ssh/id_rsa.pub)"
# export SSHPASS=$USERPASS
# Add a static Ethernet network configuration
NETIF="eth0:1"
NETIP="192.168.8.10"
NETMASK="255.255.255.0"
NETGW="192.168.8.1"
NETDNS="1.1.1.1" # DNS server for target network, might be needed if not using DHCP
NETMETRIC="999" # needs to be set higher than 100 for default DHCP route to work
# Add a static WLAN network configuration
SSID="SSID"
PSK="PSK"
WLAN_NETIF="wlan0"
WLAN_NETIP="192.168.8.20"
WLAN_NETMASK="255.255.255.0"
WLAN_NETGW="192.168.8.1"
WLAN_NETDNS="1.1.1.1" # DNS server for target network, might be needed if not using DHCP
WLAN_NETMETRIC="100" # needs to be set higher than 100 for default DHCP route to work
# Change hostname
RASPIHOST="rover-pi"
# Example packages to install
PKGS="i2c-tools spi-tools netcat-traditional"
# raspi-config commands, see: https://www.thedigitalpictureframe.com/cheat-sheet-raspberry-pi-configuration-settings-terminal-commands/
# or the official manual: https://www.raspberrypi.com/documentation/computers/configuration.html#raspi-config-cli
# You only need to provide the specific command and its arguments, eg. "do_boot_wait 0", without the "sudo raspi-config nonint" part.
RASPICMDS=()
RASPICMDS+=('do_change_timezone Europe/Warsaw') # Set a timezone
# RASPICMDS+=('do_wifi_ssid_passphrase ssid passphrase') # Set WLAN settings
# Extra commands to run. This can do literally anything that can be ran on the actual HW before starting it.
EXTRACMDS=()
EXTRACMDS+=("touch /home/$USERNAME/.image_created_with_remoterover")
# Define which actions should be ran
RUN_PREP=1 # Unpack and resize raspberry image
RUN_USERSETUP=1 # Set user password (USERNAME/USERPASS)
RUN_I2C=1 # Enable I2C
RUN_SPI=1 # Enable SPI
RUN_SERIAL=1 # Enable UART
RUN_ENABLESSH=1 # Enable SSH by default
RUN_SSHKEYS=1 # Copy SSKEYS to authorized_keys
RUN_NETWORK=1 # Set a static IP
RUN_ETH=1 # Set up ethernet with a static IP
RUN_WLAN=1 # Set up Wi-Fi with a static IP
RUN_WLAN_DHCP=0 # Use DHCP for WLAN
RUN_HOSTNAME=1 # Change hostname
RUN_UPDATE=1 # Update package index, takes some time
RUN_UPGRADE=0 # Update the OS, takes a long time
RUN_PKGS=1 # Install packages listed in PKGS, takes some time
RUN_STM32=1 # Enable STM32 gdb server
RUN_CAMERA=1 # Enable remote camera
RUN_CURRENT_MONITOR=1 # Enable Power Monitor HAT
RUN_RASPICONF=1 # Run raspi-config commands specified in RASPICMDS array
RUN_RELAY=1 # Enable Waveshare RPi Relay Board
RUN_EXTRA=1 # Run extra commands specified in EXTRACMDS array
RUN_SHRINK=1 # Shrink image back for faster writing to SD
RUN_CLEANUP=1 # Clean temporary files - kernel, dtb, mountpoints