From 13726dc8a1925e3546f7a14b10680c525e55bf26 2018-12-06 20:46:12 From: Unknown Date: 2018-12-06 20:46:12 Subject: [PATCH] - remove some whitespace - fixed regenerating initramfs on firstboot with uboot (aarch64 not beeing detected as vaild arch -> set it to arm64) - escaping COMPILER_PACKAGES in functions.sh with "" breaks uboot generation --- diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 5fe93a3..611f1a5 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -87,7 +87,7 @@ if [ "$ENABLE_TURBO" = true ] ; then fi if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then - + # Bluetooth enabled if [ "$ENABLE_BLUETOOTH" = true ] ; then # Create temporary directory for Bluetooth sources @@ -109,7 +109,7 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then # Install tools install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" - + # make scripts executable chmod +x "${R}/usr/bin/bthelper" chmod +x "${R}/usr/bin/btuart" @@ -123,11 +123,11 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx" install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service" install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service" - + # Remove temporary directories rm -fr "${temp_dir}" rm -fr "${R}"/tmp/pi-bluetooth - + # Switch Pi3 Bluetooth function to use the mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 & 15. Slow Bluetooth and slow cpu. Use /dev/ttyS0 instead of /dev/ttyAMA0 if [ "$ENABLE_MINIUART_OVERLAY" = true ] ; then @@ -139,10 +139,10 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then echo "core_freq=250" >> "${BOOT_DIR}/config.txt" fi fi - + # Activate services chroot_exec systemctl enable pi-bluetooth.hciuart.service - + else # if ENABLE_BLUETOOTH = false # set overlay to disable bluetooth echo "dtoverlay=pi3-disable-bt" >> "${BOOT_DIR}/config.txt" @@ -154,7 +154,7 @@ if [ "$ENABLE_CONSOLE" = true ] ; then echo "enable_uart=1" >> "${BOOT_DIR}/config.txt" # add string to cmdline CMDLINE="${CMDLINE} console=serial0,115200" - + # Enable serial console systemd style chroot_exec systemctl enable serial-getty\@serial0.service else diff --git a/files/firstboot/23-regenerate-initramfs.sh b/files/firstboot/23-regenerate-initramfs.sh index 78e2922..1c4f03c 100644 --- a/files/firstboot/23-regenerate-initramfs.sh +++ b/files/firstboot/23-regenerate-initramfs.sh @@ -8,6 +8,7 @@ INITRAMFS_UBOOT="${INITRAMFS}.uboot" # Extract kernel arch case "${KERNEL_ARCH}" in arm*) KERNEL_ARCH=arm ;; + aarch64) KERNEL_ARCH=arm64 ;; esac # Regenerate initramfs diff --git a/functions.sh b/functions.sh index f7ce802..c73cbaf 100644 --- a/functions.sh +++ b/functions.sh @@ -63,15 +63,15 @@ 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 }') - # Install COMPILER_PACKAGES in chroot - chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install "${COMPILER_PACKAGES}" + # Install COMPILER_PACKAGES in chroot - NEVER do "${COMPILER_PACKAGES}" -> breaks uboot + chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES} fi } chroot_remove_cc() { # Remove c/c++ build environment from the chroot if [ -n "${COMPILER_PACKAGES}" ] ; then - chroot_exec apt-get -qq -y --auto-remove purge "${COMPILER_PACKAGES}" + chroot_exec apt-get -qq -y --auto-remove purge ${COMPILER_PACKAGES} COMPILER_PACKAGES="" fi }