@@ -13,6 +13,9 sed -i "s/^RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hostname" | |||
|
13 | 13 | install_readonly files/network/hosts "${ETC_DIR}/hosts" |
|
14 | 14 | sed -i "s/RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hosts" |
|
15 | 15 | |
|
16 | # Ensure /etc/systemd/network directory is available | |
|
17 | mkdir -p "${ETC_DIR}/systemd/network" | |
|
18 | ||
|
16 | 19 | # Setup hostname entry with static IP |
|
17 | 20 | if [ "$NET_ETH_ADDRESS" != "" ] ; then |
|
18 | 21 | NET_IP=$(echo "${NET_ETH_ADDRESS}" | cut -f 1 -d'/') |
@@ -68,6 +71,7 fi | |||
|
68 | 71 | |
|
69 | 72 | |
|
70 | 73 | if [ "$ENABLE_WIRELESS" = true ] ; then |
|
74 | mkdir -p "${ETC_DIR}/wpa_supplicant" | |
|
71 | 75 | if [ "$ENABLE_WIFI_DHCP" = true ] ; then |
|
72 | 76 | # Enable DHCP configuration for interface eth0 |
|
73 | 77 | sed -i -e "s/DHCP=.*/DHCP=yes/" -e "/DHCP/q" "${ETC_DIR}/systemd/network/wlan0.network" |
@@ -94,19 +98,18 if [ "$ENABLE_WIRELESS" = true ] ; then | |||
|
94 | 98 | fi |
|
95 | 99 | fi |
|
96 | 100 | |
|
97 | if [ -z "$NET_WIFI_SSID" ] && [ -z "$NET_WIFI_PSK" ] ; then | |
|
98 | printf " | |
|
101 | if [ ! -z "$NET_WIFI_SSID" ] && [ ! -z "$NET_WIFI_PSK" ] ; then | |
|
102 | chroot_exec printf " | |
|
99 | 103 | ctrl_interface=/run/wpa_supplicant |
|
100 | ctrl_interface_group=wheel | |
|
101 | 104 | update_config=1 |
|
102 | 105 | eapol_version=1 |
|
103 | 106 | ap_scan=1 |
|
104 | 107 | fast_reauth=1 |
|
105 | 108 | |
|
106 |
" > |
|
|
109 | " > "${ETC_DIR}/wpa_supplicant/wpa_supplicant-wlan0.conf" | |
|
107 | 110 | |
|
108 | 111 | #Configure WPA_supplicant |
|
109 |
chroot_exec wpa_passphrase "$NET_SSID" "$NET_W |
|
|
112 | chroot_exec wpa_passphrase "$NET_WIFI_SSID" "$NET_WIFI_PSK" >> "${ETC_DIR}/wpa_supplicant/wpa_supplicant-wlan0.conf" | |
|
110 | 113 | |
|
111 | 114 | chroot_exec systemctl enable wpa_supplicant.service |
|
112 | 115 | chroot_exec systemctl enable wpa_supplicant@wlan0.service |
@@ -75,7 +75,11 if [ "$ENABLE_REDUCE" = true ] ; then | |||
|
75 | 75 | |
|
76 | 76 | # Remove sound utils and libraries |
|
77 | 77 | if [ "$ENABLE_SOUND" = false ] ; then |
|
78 | if [ "$ENABLE_BLUETOOTH" = false ] ; then | |
|
78 | 79 |
|
|
80 | else | |
|
81 | chroot_exec apt-get -qq -y purge alsa-utils libsamplerate0 | |
|
82 | fi | |
|
79 | 83 | fi |
|
80 | 84 | |
|
81 | 85 | # Remove GPU kernels |
@@ -92,6 +96,9 if [ "$ENABLE_REDUCE" = true ] ; then | |||
|
92 | 96 | rm -f "${R}/boot/initrd.img-*" |
|
93 | 97 | fi |
|
94 | 98 | |
|
99 | #Reduce BOOT | |
|
100 | #Only necessary files for my gen pi | |
|
101 | ||
|
95 | 102 | # Clean APT list of repositories |
|
96 | 103 | rm -fr "${R}/var/lib/apt/lists/*" |
|
97 | 104 | chroot_exec apt-get -qq -y update |
@@ -1,4 +1,4 | |||
|
1 | #!/bin/sh | |
|
1 | #!/bin/bash | |
|
2 | 2 | ######################################################################## |
|
3 | 3 | # rpi23-gen-image.sh 2015-2017 |
|
4 | 4 | # |
@@ -806,7 +806,7 CHROOT_SIZE=$(expr "$(du -s "${R}" | awk '{ print $1 }')") | |||
|
806 | 806 | |
|
807 | 807 | # Calculate the amount of needed 512 Byte sectors |
|
808 | 808 | TABLE_SECTORS=$(expr 1 \* 1024 \* 1024 \/ 512) |
|
809 |
FRMW_SECTORS=$(expr |
|
|
809 | FRMW_SECTORS=$(expr 128 \* 1024 \* 1024 \/ 512) | |
|
810 | 810 | ROOT_OFFSET=$(expr "${TABLE_SECTORS}" + "${FRMW_SECTORS}") |
|
811 | 811 | |
|
812 | 812 | # The root partition is EXT4 |
@@ -834,8 +834,8 EOM | |||
|
834 | 834 | ${TABLE_SECTORS},${ROOT_SECTORS},83 |
|
835 | 835 | EOM |
|
836 | 836 | |
|
837 |
|
|
|
838 |
FRMW_LOOP="$(losetup -o 1M --sizelimit |
|
|
837 | # Setup temporary loop devices | |
|
838 | FRMW_LOOP="$(losetup -o 1M --sizelimit 128M -f --show "$IMAGE_NAME"-frmw.img)" | |
|
839 | 839 | ROOT_LOOP="$(losetup -o 1M -f --show "$IMAGE_NAME"-root.img)" |
|
840 | 840 | # ENABLE_SPLITFS=false |
|
841 | 841 | else |
@@ -849,8 +849,8 ${ROOT_OFFSET},${ROOT_SECTORS},83 | |||
|
849 | 849 | EOM |
|
850 | 850 | |
|
851 | 851 | # Setup temporary loop devices |
|
852 |
FRMW_LOOP="$(losetup -o 1M --sizelimit |
|
|
853 |
ROOT_LOOP="$(losetup -o |
|
|
852 | FRMW_LOOP="$(losetup -o 1M --sizelimit 128M -f --show "$IMAGE_NAME".img)" | |
|
853 | ROOT_LOOP="$(losetup -o 129M -f --show "$IMAGE_NAME".img)" | |
|
854 | 854 | fi |
|
855 | 855 | |
|
856 | 856 | if [ "$ENABLE_CRYPTFS" = true ] ; then |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant