diff --git a/README.md b/README.md index 035da59..a793e4e 100644 --- a/README.md +++ b/README.md @@ -448,13 +448,13 @@ After the image file was successfully created by the `rpi23-gen-image.sh` script ##### Flashing examples: ```shell -bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie.img /dev/mmcblk0 -dd bs=4M if=./images/jessie/2017-01-23-rpi3-jessie.img of=/dev/mmcblk0 +bmaptool copy ./images/buster/2017-01-23-rpi3-buster.img /dev/mmcblk0 +dd bs=4M if=./images/buster/2017-01-23-rpi3-buster.img of=/dev/mmcblk0 ``` If you have set `ENABLE_SPLITFS`, copy the `-frmw` image on the microSD card, then the `-root` one on the USB drive: ```shell -bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-frmw.img /dev/mmcblk0 -bmaptool copy ./images/jessie/2017-01-23-rpi3-jessie-root.img /dev/sdc +bmaptool copy ./images/buster/2017-01-23-rpi3-buster-frmw.img /dev/mmcblk0 +bmaptool copy ./images/buster/2017-01-23-rpi3-buster-root.img /dev/sdc ``` ## QEMU emulation diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 8b1bc3b..6c93cf6 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -42,9 +42,9 @@ fi # Setup firmware boot cmdline if [ "$ENABLE_SPLITFS" = true ] ; then - CMDLINE="dwc_otg.lpm_enable=0 root=/dev/sda1 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1" + CMDLINE="dwc_otg.lpm_enable=0 root=/dev/sda1 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1 init=/bin/systemd" else - CMDLINE="dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1" + CMDLINE="dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=100,data=writeback elevator=deadline rootwait console=tty1 init=/bin/systemd" fi # Add encrypted root partition to cmdline.txt @@ -73,11 +73,6 @@ else CMDLINE="${CMDLINE} net.ifnames=1" fi -# Set init to systemd if required by Debian release -if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then - CMDLINE="${CMDLINE} init=/bin/systemd" -fi - # Install firmware boot cmdline echo "${CMDLINE}" > "${BOOT_DIR}/cmdline.txt" diff --git a/bootstrap.d/20-networking.sh b/bootstrap.d/20-networking.sh index d53b78b..f92e76d 100644 --- a/bootstrap.d/20-networking.sh +++ b/bootstrap.d/20-networking.sh @@ -7,11 +7,11 @@ # Install and setup hostname install_readonly files/network/hostname "${ETC_DIR}/hostname" -sed -i "s/^rpi2-jessie/${HOSTNAME}/" "${ETC_DIR}/hostname" +sed -i "s/^RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hostname" # Install and setup hosts install_readonly files/network/hosts "${ETC_DIR}/hosts" -sed -i "s/rpi2-jessie/${HOSTNAME}/" "${ETC_DIR}/hosts" +sed -i "s/RaspberryPI/${HOSTNAME}/" "${ETC_DIR}/hosts" # Setup hostname entry with static IP if [ "$NET_ADDRESS" != "" ] ; then @@ -65,13 +65,12 @@ sed -i "/.*=\$/d" "${ETC_DIR}/systemd/network/eth.network" sed -i "/.*=\$/d" "${ETC_DIR}/systemd/network/wlan.network" # Move systemd network configuration if required by Debian release -if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then - mv -v "${ETC_DIR}/systemd/network/eth.network" "${LIB_DIR}/systemd/network/10-eth.network" - if [ "$ENABLE_WIRELESS" = true ] ; then - mv -v "${ETC_DIR}/systemd/network/wlan.network" "${LIB_DIR}/systemd/network/11-wlan.network" - fi - rm -fr "${ETC_DIR}/systemd/network" +mv -v "${ETC_DIR}/systemd/network/eth.network" "${LIB_DIR}/systemd/network/10-eth.network" +# If WLAN is enabled copy wlan configuration too +if [ "$ENABLE_WIRELESS" = true ] ; then + mv -v "${ETC_DIR}/systemd/network/wlan.network" "${LIB_DIR}/systemd/network/11-wlan.network" fi +rm -fr "${ETC_DIR}/systemd/network" # Enable systemd-networkd service chroot_exec systemctl enable systemd-networkd diff --git a/bootstrap.d/21-firewall.sh b/bootstrap.d/21-firewall.sh index d078ba1..e6033c4 100644 --- a/bootstrap.d/21-firewall.sh +++ b/bootstrap.d/21-firewall.sh @@ -11,9 +11,7 @@ if [ "$ENABLE_IPTABLES" = true ] ; then # make sure iptables-legacy is the used alternatives #iptables-save and -restore are slaves of iptables and thus are set accordingly - if ! [ "$RELEASE" = jessie ] ; then - chroot_exec update-alternatives --verbose --set iptables /usr/sbin/iptables-legacy - fi + chroot_exec update-alternatives --verbose --set iptables /usr/sbin/iptables-legacy # Install iptables systemd service install_readonly files/iptables/iptables.service "${ETC_DIR}/systemd/system/iptables.service" diff --git a/bootstrap.d/42-fbturbo.sh b/bootstrap.d/42-fbturbo.sh index a5ede42..0835552 100644 --- a/bootstrap.d/42-fbturbo.sh +++ b/bootstrap.d/42-fbturbo.sh @@ -28,11 +28,7 @@ if [ "$ENABLE_FBTURBO" = true ] ; then fi # Install Xorg build dependencies - if [ "$RELEASE" = "jessie" ] ; then - chroot_exec apt-get -q -y --no-install-recommends install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev - elif [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then - chroot_exec apt-get -q -y --no-install-recommends --allow-unauthenticated install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev - fi + chroot_exec apt-get -q -y --no-install-recommends --allow-unauthenticated install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev # Build and install fbturbo driver inside chroot chroot_exec /bin/bash -x <<'EOF' diff --git a/bootstrap.d/99-reduce.sh b/bootstrap.d/99-reduce.sh index 25ec9fe..9576bd6 100644 --- a/bootstrap.d/99-reduce.sh +++ b/bootstrap.d/99-reduce.sh @@ -46,12 +46,8 @@ if [ "$ENABLE_REDUCE" = true ] ; then # Replace bash shell by dash shell (experimental) if [ "$REDUCE_BASH" = true ] ; then - if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then - echo "Yes, do as I say!" | chroot_exec apt-get purge -qq -y --allow-remove-essential bash - else - echo "Yes, do as I say!" | chroot_exec apt-get purge -qq -y --force-yes bash - fi - + # Purge bash and update alternatives + echo "Yes, do as I say!" | chroot_exec apt-get purge -qq -y --allow-remove-essential bash chroot_exec update-alternatives --install /bin/bash bash /bin/dash 100 fi @@ -60,11 +56,6 @@ if [ "$ENABLE_REDUCE" = true ] ; then chroot_exec apt-get -qq -y purge alsa-utils libsamplerate0 libasound2 libasound2-data fi - # Re-install tools for managing kernel modules - if [ "$RELEASE" = "jessie" ] ; then - chroot_exec apt-get -qq -y install module-init-tools - fi - # Remove GPU kernels if [ "$ENABLE_MINGPU" = true ] ; then rm -f "${BOOT_DIR}/start.elf" diff --git a/files/network/hostname b/files/network/hostname index 03a61be..b20bbc3 100644 --- a/files/network/hostname +++ b/files/network/hostname @@ -1 +1 @@ -rpi2-jessie +RaspberryPI diff --git a/files/network/hosts b/files/network/hosts index 360cae7..3ae0878 100644 --- a/files/network/hosts +++ b/files/network/hosts @@ -1,5 +1,5 @@ 127.0.0.1 localhost -127.0.1.1 rpi2-jessie +127.0.1.1 RaspberryPI ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes diff --git a/functions.sh b/functions.sh index 8c52abd..6ee31da 100644 --- a/functions.sh +++ b/functions.sh @@ -63,12 +63,8 @@ chroot_install_cc() { # Install c/c++ build environment inside the chroot if [ -z "${COMPILER_PACKAGES}" ] ; then COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }') - - if [ "$RELEASE" = "jessie" ] ; then - chroot_exec apt-get -q -y --no-install-recommends install ${COMPILER_PACKAGES} - elif [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then - chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES} - fi + # Install COMPILER_PACKAGES in chroot + chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES} fi } diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 2b072ab..d4a4190 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ######################################################################## # rpi23-gen-image.sh 2015-2017 #