@@ -0,0 +1,12 | |||
|
1 | [Match] | |
|
2 | Name=wlan0 | |
|
3 | ||
|
4 | [Network] | |
|
5 | DHCP=no | |
|
6 | Address= | |
|
7 | Gateway= | |
|
8 | DNS= | |
|
9 | DNS= | |
|
10 | Domains= | |
|
11 | NTP= | |
|
12 | NTP= |
@@ -67,7 +67,7 A comma separated list of additional packages to be installed by apt after boots | |||
|
67 | 67 | |
|
68 | 68 | #### General system settings: |
|
69 | 69 | ##### `RPI_MODEL`=2 |
|
70 | Specifiy the target Raspberry Pi hardware model. The script at this time supports the Raspberry Pi models `2` and `3`. `BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` is used. | |
|
70 | Specifiy the target Raspberry Pi hardware model. The script at this time supports the Raspberry Pi models `2`,`3` and `3B`. `BUILD_KERNEL`=true will automatically be set if the Raspberry Pi model `3` or `3B` is used. | |
|
71 | 71 | |
|
72 | 72 | ##### `RELEASE`="jessie" |
|
73 | 73 | Set the desired Debian release name. The script at this time supports the bootstrapping of the Debian releases "jessie", "stretch" and "buster". `BUILD_KERNEL`=true will automatically be set if the Debian releases `stretch` or `buster` are used. |
@@ -30,6 +30,12 install_readonly files/network/interfaces "${ETC_DIR}/network/interfaces" | |||
|
30 | 30 | # Install configuration for interface eth0 |
|
31 | 31 | install_readonly files/network/eth.network "${ETC_DIR}/systemd/network/eth.network" |
|
32 | 32 | |
|
33 | # Install configuration for interface wl* | |
|
34 | install_readonly files/network/wlan.network "${ETC_DIR}/systemd/network/wlan.network" | |
|
35 | ||
|
36 | #always with dhcp since wpa_supplicant integration is missing | |
|
37 | sed -i -e "s/DHCP=.*/DHCP=yes/" -e "/DHCP/q" "${ETC_DIR}/systemd/network/wlan.network" | |
|
38 | ||
|
33 | 39 | if [ "$ENABLE_DHCP" = true ] ; then |
|
34 | 40 | # Enable DHCP configuration for interface eth0 |
|
35 | 41 | sed -i -e "s/DHCP=.*/DHCP=yes/" -e "/DHCP/q" "${ETC_DIR}/systemd/network/eth.network" |
@@ -55,10 +61,15 fi | |||
|
55 | 61 | |
|
56 | 62 | # Remove empty settings from network configuration |
|
57 | 63 | sed -i "/.*=\$/d" "${ETC_DIR}/systemd/network/eth.network" |
|
64 | # Remove empty settings from wlan configuration | |
|
65 | sed -i "/.*=\$/d" "${ETC_DIR}/systemd/network/wlan.network" | |
|
58 | 66 | |
|
59 | 67 | # Move systemd network configuration if required by Debian release |
|
60 | 68 | if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then |
|
61 | 69 | mv -v "${ETC_DIR}/systemd/network/eth.network" "${LIB_DIR}/systemd/network/10-eth.network" |
|
70 | if [ "$ENABLE_WIRELESS" = true ] ; then | |
|
71 | mv -v "${ETC_DIR}/systemd/network/wlan.network" "${LIB_DIR}/systemd/network/11-wlan.network" | |
|
72 | fi | |
|
62 | 73 | rm -fr "${ETC_DIR}/systemd/network" |
|
63 | 74 | fi |
|
64 | 75 | |
@@ -91,17 +102,33 if [ "$ENABLE_WIRELESS" = true ] ; then | |||
|
91 | 102 | # Create temporary directory for firmware binary blob |
|
92 | 103 | temp_dir=$(as_nobody mktemp -d) |
|
93 | 104 | |
|
94 | # Fetch firmware binary blob | |
|
105 | # Fetch firmware binary blob for RPI3B+ | |
|
106 | if [ "$RPI_MODEL" = 3B ] ; then | |
|
107 | as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.bin" | |
|
108 | as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.txt" | |
|
109 | as_nobody wget -q -O "${temp_dir}/brcmfmac43455-sdio.clm_blob" "${WLAN_FIRMWARE_URL}/brcmfmac43455-sdio.clm_blob" | |
|
110 | else | |
|
111 | # Fetch firmware binary blob for RPI3 | |
|
95 | 112 | as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.bin" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.bin" |
|
96 | 113 | as_nobody wget -q -O "${temp_dir}/brcmfmac43430-sdio.txt" "${WLAN_FIRMWARE_URL}/brcmfmac43430-sdio.txt" |
|
114 | fi | |
|
97 | 115 | |
|
98 | 116 | # Move downloaded firmware binary blob |
|
117 | if [ "$RPI_MODEL" = 3B ] ; then | |
|
118 | mv "${temp_dir}/brcmfmac43455-sdio."* "${WLAN_FIRMWARE_DIR}/" | |
|
119 | else | |
|
99 | 120 |
|
|
121 | fi | |
|
100 | 122 | |
|
101 | 123 | # Remove temporary directory for firmware binary blob |
|
102 | 124 | rm -fr "${temp_dir}" |
|
103 | 125 | |
|
104 | 126 | # Set permissions of the firmware binary blob |
|
127 | if [ "$RPI_MODEL" = 3B ] ; then | |
|
128 | chown root:root "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."* | |
|
129 | chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43455-sdio."* | |
|
130 | else | |
|
105 | 131 |
|
|
106 | 132 | chmod 600 "${WLAN_FIRMWARE_DIR}/brcmfmac43430-sdio."* |
|
107 | 133 | fi |
|
134 | fi |
@@ -46,6 +46,8 RPI2_DTB_FILE=${RPI2_DTB_FILE:=bcm2709-rpi-2-b.dtb} | |||
|
46 | 46 | RPI2_UBOOT_CONFIG=${RPI2_UBOOT_CONFIG:=rpi_2_defconfig} |
|
47 | 47 | RPI3_DTB_FILE=${RPI3_DTB_FILE:=bcm2710-rpi-3-b.dtb} |
|
48 | 48 | RPI3_UBOOT_CONFIG=${RPI3_UBOOT_CONFIG:=rpi_3_32b_defconfig} |
|
49 | RPI3B_DTB_FILE=${RPI3B_DTB_FILE:=bcm2710-rpi-3-b-plus.dtb} | |
|
50 | RPI3B_UBOOT_CONFIG=${RPI3_UBOOT_CONFIG:=rpi_3_32b_defconfig} | |
|
49 | 51 | |
|
50 | 52 | # Debian release |
|
51 | 53 | RELEASE=${RELEASE:=jessie} |
@@ -234,13 +236,17 elif [ "$RPI_MODEL" = 3 ] ; then | |||
|
234 | 236 | DTB_FILE=${RPI3_DTB_FILE} |
|
235 | 237 | UBOOT_CONFIG=${RPI3_UBOOT_CONFIG} |
|
236 | 238 | BUILD_KERNEL=true |
|
239 | elif [ "$RPI_MODEL" = 3B ] ; then | |
|
240 | DTB_FILE=${RPI3B_DTB_FILE} | |
|
241 | UBOOT_CONFIG=${RPI3B_UBOOT_CONFIG} | |
|
242 | BUILD_KERNEL=true | |
|
237 | 243 | else |
|
238 | 244 | echo "error: Raspberry Pi model ${RPI_MODEL} is not supported!" |
|
239 | 245 | exit 1 |
|
240 | 246 | fi |
|
241 | 247 | |
|
242 | 248 | # Check if the internal wireless interface is supported by the RPi model |
|
243 |
if [ "$ENABLE_WIRELESS" = true ] && [ "$RPI_MODEL" |
|
|
249 | if [ "$ENABLE_WIRELESS" = true ] && [ "$RPI_MODEL" = 2 ]; then | |
|
244 | 250 | echo "error: The selected Raspberry Pi model has no internal wireless interface" |
|
245 | 251 | exit 1 |
|
246 | 252 | fi |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant