From 03c30a6b8f78845ae67a27da85dde276325c73d2 2020-11-16 10:36:17 From: g-vidal Date: 2020-11-16 10:36:17 Subject: [PATCH] Error correction on start4.elf copies add # ## ### indicators on architecture spacific settings --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 8d1f576..fe11b49 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -31,7 +31,7 @@ if [ "$BUILD_KERNEL" = true ] ; then # Create temporary directory for kernel sources temp_dir=$(as_nobody mktemp -d) - # Fetch current RPi2/3 kernel sources + # Fetch current RPi2/3/4 kernel sources if [ -z "${KERNEL_BRANCH}" ] ; then as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux else @@ -52,13 +52,13 @@ if [ "$BUILD_KERNEL" = true ] ; then if [ -n "$KERNEL_THREADS" ] && [ -r /proc/cpuinfo ] ; then KERNEL_THREADS=$(grep -c processor /proc/cpuinfo) fi - -# TODO: Check if defined Threadcount is higher than actual cores + +# TODO: Check if defined Threadcount is higher than actual cores # if [ "$KERNEL_THREADS" > grep -c processor /proc/cpuinfo] ; then # echo "Defined more Threads than core assigned to this system" # exit 1 # fi - + #Copy 32bit config to 64bit if [ "$ENABLE_QEMU" = true ] && [ "$KERNEL_ARCH" = arm64 ]; then cp "${KERNEL_DIR}"/arch/arm/configs/vexpress_defconfig "${KERNEL_DIR}"/arch/arm64/configs/ @@ -108,7 +108,7 @@ if [ "$BUILD_KERNEL" = true ] ; then #Switch to KERNELSRC_DIR so we can use set_kernel_config cd "${KERNEL_DIR}" || exit - + # Enable RPI POE HAT fan if [ "$KERNEL_POEHAT" = true ]; then set_kernel_config CONFIG_SENSORS_RPI_POE_FAN m @@ -119,20 +119,20 @@ if [ "$BUILD_KERNEL" = true ] ; then if [ "$KERNEL_NSPAN" = true ]; then set_kernel_config CONFIG_CGROUP_NET_PRIO y fi - + # Compile in BTRFS if [ "$KERNEL_BTRFS" = true ]; then set_kernel_config CONFIG_BTRFS_FS y set_kernel_config CONFIG_BTRFS_FS_POSIX_ACL y set_kernel_config CONFIG_BTRFS_FS_REF_VERIFY y fi - + # Diffie-Hellman operations on retained keys # (required for >keyutils-1.6) if [ "$KERNEL_DHKEY" = true ]; then set_kernel_config CONFIG_KEY_DH_OPERATIONS y - fi - + fi + if [ "$KERNEL_ARCH" = arm64 ] && [ "$ENABLE_QEMU" = false ]; then # Mask this temporarily during switch to rpi-4.19.y #Fix SD_DRIVER upstream and downstream mess in 64bit RPIdeb_config @@ -141,11 +141,11 @@ if [ "$BUILD_KERNEL" = true ] ; then #set_kernel_config CONFIG_MMC_SDHCI_IPROC n #set_kernel_config CONFIG_USB_DWC2 n #sed -i "s|depends on MMC_BCM2835_MMC && MMC_BCM2835_DMA|depends on MMC_BCM2835_MMC|" "${KERNEL_DIR}"/drivers/mmc/host/Kconfig - + #VLAN got disabled without reason in arm64bit set_kernel_config CONFIG_IPVLAN m fi - + # enable ZSWAP see https://askubuntu.com/a/472227 or https://wiki.archlinux.org/index.php/zswap if [ "$KERNEL_ZSWAP" = true ] ; then set_kernel_config CONFIG_ZPOOL y @@ -156,7 +156,7 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_PGTABLE_MAPPING y set_kernel_config CONFIG_LZO_COMPRESS y fi - + if [ "$RPI_MODEL" = 4 ] ; then # Following are set in current 32-bit LPAE kernel set_kernel_config CONFIG_CGROUP_PIDS y @@ -362,7 +362,7 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_PCIE_BRCMSTB y set_kernel_config CONFIG_BCM2835_MMC y - # Snap needs squashfs. The ubuntu eoan-preinstalled-server image at + # Snap needs squashfs. The ubuntu eoan-preinstalled-server image at # http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/ uses snap # during cloud-init setup at first boot. Without this the login accounts are not # created and the user can not login. @@ -404,10 +404,10 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_SLAB_FREELIST_RANDOM=y set_kernel_config CONFIG_SLAB_FREELIST_HARDENED=y set_kernel_config CONFIG_MMU_NOTIFIER y - + # erratum set_kernel_config ARM64_ERRATUM_834220 y - + # https://sourceforge.net/p/kvm/mailman/message/18440797/ set_kernel_config CONFIG_PREEMPT_NOTIFIERS y fi @@ -471,7 +471,7 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_SYSTEM_TRUSTED_KEYS m set_kernel_config CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE 4096 fi - + if [ "$ENABLE_CRYPTFS" = true ] ; then set_kernel_config CONFIG_EMBEDDED y set_kernel_config CONFIG_EXPERT y @@ -625,7 +625,7 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_NF_TABLES_BRIDGE y set_kernel_config CONFIG_NF_CT_NETLINK_TIMEOUT m set_kernel_config CONFIG_NFT_OSF m - + fi # Enables BPF syscall for systemd-journald see https://github.com/torvalds/linux/blob/master/init/Kconfig#L848 or https://groups.google.com/forum/#!topic/linux.gentoo.user/_2aSc_ztGpA @@ -637,7 +637,7 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_XDP_SOCKETS y fi - # KERNEL_DEFAULT_GOV was set by user + # KERNEL_DEFAULT_GOV was set by user if [ "$KERNEL_DEFAULT_GOV" != ondemand ] && [ -n "$KERNEL_DEFAULT_GOV" ] ; then case "$KERNEL_DEFAULT_GOV" in performance) @@ -811,16 +811,16 @@ else # BUILD_KERNEL=false temp_dir=$(as_nobody mktemp -d) # Fetch kernel dl - as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" + as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI3_64_KERNEL_URL" fi if [ "$SET_ARCH" = 64 ] && [ "$RPI_MODEL" = 4 ] ; then # Create temporary directory for dl temp_dir=$(as_nobody mktemp -d) # Fetch kernel dl - as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI4_64_KERNEL_URL" + as_nobody wget -O "${temp_dir}"/kernel.tar.xz -c "$RPI4_64_KERNEL_URL" fi - + #extract download tar -xJf "${temp_dir}"/kernel.tar.xz -C "${temp_dir}" @@ -883,4 +883,4 @@ else # BUILD_KERNEL=false cleanup exit 1 fi -fi \ No newline at end of file +fi diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 6278b50..63f556c 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -20,7 +20,7 @@ if [ -n "$RPI_FIRMWARE_DIR" ] && [ -d "$RPI_FIRMWARE_DIR" ] ; then cp "${RPI_FIRMWARE_DIR}"/boot/fixup4x.dat "${BOOT_DIR}"/fixup4x.dat cp "${RPI_FIRMWARE_DIR}"/boot/start4cd.elf "${BOOT_DIR}"/start4cd.elf cp "${RPI_FIRMWARE_DIR}"/boot/start4db.elf "${BOOT_DIR}"/start4db.elf - cp "${RPI_FIRMWARE_DIR}"/boot/start4.elf "${BOOT_DIR}"/start4x.elf + cp "${RPI_FIRMWARE_DIR}"/boot/start4.elf "${BOOT_DIR}"/start4.elf cp "${RPI_FIRMWARE_DIR}"/boot/start4x.elf "${BOOT_DIR}"/start4x.elf else # Create temporary directory for boot binaries @@ -40,7 +40,7 @@ else as_nobody wget -q -O "${temp_dir}/fixup4x.dat" "${FIRMWARE_URL}/fixup4x.dat" as_nobody wget -q -O "${temp_dir}/start4cd.elf" "${FIRMWARE_URL}/start4cd.elf" as_nobody wget -q -O "${temp_dir}/start4db.elf" "${FIRMWARE_URL}/start4db.elf" - as_nobody wget -q -O "${temp_dir}/start4x.elf" "${FIRMWARE_URL}/start4x.elf" + as_nobody wget -q -O "${temp_dir}/start4.elf" "${FIRMWARE_URL}/start4.elf" as_nobody wget -q -O "${temp_dir}/start4x.elf" "${FIRMWARE_URL}/start4x.elf" # Move downloaded boot binaries diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 586860f..0c6defc 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -45,7 +45,7 @@ RPI_MODEL=${RPI_MODEL:=3P} # Debian release RELEASE=${RELEASE:=buster} if [ $RELEASE = "bullseye" ] ; then - RELEASE=testing + RELEASE=testing fi # Kernel Branch @@ -65,7 +65,7 @@ SYSTEMDSWAP_URL=${SYSTEMDSWAP_URL:=https://github.com/Nefelim4ag/systemd-swap.gi # Kernel deb packages for 32bit kernel RPI_32_KERNEL_URL=${RPI_32_KERNEL_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel_20180422-141901_armhf.deb} RPI_32_KERNELHEADER_URL=${RPI_32_KERNELHEADER_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel-headers_20180422-141901_armhf.deb} -# Kernel has KVM and zswap enabled - use if KERNEL_* parameters and precompiled kernel are used +# Kernel has KVM and zswap enabled - use if KERNEL_* parameters and precompiled kernel are used RPI3_64_BIS_KERNEL_URL=${RPI3_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel-bis/releases/download/4.19.102.20200211/bcmrpi3-kernel-bis-4.19.102.20200211.tar.xz} # Default precompiled 64bit kernel RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel/releases/download/4.19.102.20200211/bcmrpi3-kernel-4.19.102.20200211.tar.xz} @@ -73,7 +73,7 @@ RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmr RPI4_64_BIS_KERNEL_URL=${RPI4_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.102.20200211/bcm2711-kernel-bis-4.19.102.20200211.tar.xz} # Default precompiled 64bit kernel - https://github.com/sakaki-/bcm2711-kernel RPI4_64_DEF_KERNEL_URL=${RPI4_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.102.20200211/bcm2711-kernel-bis-4.19.102.20200211.tar.xz} -# Generic +# Generic RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_DEF_KERNEL_URL} RPI4_64_KERNEL_URL=${RPI4_64_KERNEL_URL:=$RPI4_64_DEF_KERNEL_URL} # Kali kernel src - used if ENABLE_NEXMON=true (they patch the wlan kernel modul) @@ -270,73 +270,74 @@ fi # Setup architecture specific settings if [ -n "$SET_ARCH" ] ; then - # 64-bit configuration + ## 64-bit configuration if [ "$SET_ARCH" = 64 ] ; then - # General 64-bit depended settings + ### General 64-bit depended settings QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} KERNEL_ARCH=${KERNEL_ARCH:=arm64} KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="Image"} - # Raspberry Pi model specific settings + ### Raspberry Pi 64-bit model specific settings if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then if [ "$RPI_MODEL" != 4 ] ; then KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi3_defconfig} else KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig} fi - + REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-arm64" RELEASE_ARCH=${RELEASE_ARCH:=arm64} KERNEL_IMAGE=${KERNEL_IMAGE:=kernel8.img} CROSS_COMPILE=${CROSS_COMPILE:=aarch64-linux-gnu-} + else echo "error: Only Raspberry PI 3, 3B+ and 4 support 64-bit" exit 1 fi fi - # 32-bit configuration + ## 32-bit configuration if [ "$SET_ARCH" = 32 ] ; then - # General 32-bit dependend settings + ### General 32-bit dependend settings QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static} KERNEL_ARCH=${KERNEL_ARCH:=arm} KERNEL_BIN_IMAGE=${KERNEL_BIN_IMAGE:="zImage"} - # Raspberry Pi model specific settings + ### Raspberry Pi (0-1P) model specific settings if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} RELEASE_ARCH=${RELEASE_ARCH:=armel} KERNEL_IMAGE=${KERNEL_IMAGE:=kernel.img} CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-} - - if [ $ENABLE_XORG = true ] ; then - if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then - printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] " - read -r confirm + if [ $ENABLE_XORG = true ] ; then + if [$RELEASE = "stretch" ] || [$RELEASE = "oldstable" ] ; then + printf "\nBest support for armel architecture is provided under Debian stretch/oldstable. Choose yes to change release to Debian stretch[y/n] " + read -r confirm if [ "$confirm" = "y" ] ; then - $RELEASE = "stretch" - fi - fi - fi + $RELEASE = "stretch" + fi + fi + fi fi - # Raspberry Pi model specific settings + ### Raspberry Pi (2-4) model specific settings if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then if [ "$RPI_MODEL" != 4 ] ; then KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} - KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7.img} + KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7.img} else KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2711_defconfig} - KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7l.img} + KERNEL_IMAGE=${KERNEL_IMAGE:=kernel7l.img} fi - + REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" RELEASE_ARCH=${RELEASE_ARCH:=armhf} - + CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabihf-} fi fi -# SET_ARCH not set + + # SET_ARCH not set else echo "error: Please set '32' or '64' as value for SET_ARCH" exit 1 @@ -344,50 +345,51 @@ fi # Device specific configuration and U-Boot configuration case "$RPI_MODEL" in 0) - DTB_FILE=${DTB_FILE:=bcm2708-rpi-0-w.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} - ;; + DTB_FILE=${DTB_FILE:=bcm2708-rpi-0-w.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} + ;; 1) - DTB_FILE=${DTB_FILE:=bcm2708-rpi-b.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} - ;; + DTB_FILE=${DTB_FILE:=bcm2708-rpi-b.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} + ;; 1P) - DTB_FILE=${DTB_FILE:=bcm2708-rpi-b-plus.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} - ;; + DTB_FILE=${DTB_FILE:=bcm2708-rpi-b-plus.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_defconfig} + ;; 2) - DTB_FILE=${DTB_FILE:=bcm2709-rpi-2-b.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_2_defconfig} - ;; + DTB_FILE=${DTB_FILE:=bcm2709-rpi-2-b.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_2_defconfig} + ;; 3) - DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} - ;; + DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} + ;; 3P) - DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} - ;; + DTB_FILE=${DTB_FILE:=bcm2710-rpi-3-b.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_3_defconfig} + ;; 4) - DTB_FILE=${DTB_FILE:=bcm2711-rpi-4-b.dtb} - UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_4_defconfig} - ;; + DTB_FILE=${DTB_FILE:=bcm2711-rpi-4-b.dtb} + UBOOT_CONFIG=${UBOOT_CONFIG:=rpi_4_defconfig} + ;; *) - echo "error: Raspberry Pi model $RPI_MODEL is not supported!" - exit 1 - ;; + echo "error: Raspberry Pi model $RPI_MODEL is not supported!" + exit 1 + ;; esac # Raspberry PI 0,3,3P with Bluetooth and Wifi onboard if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] || [ "$RPI_MODEL" = 4 ] ; then - # Include bluetooth packages on supported boards + ## Include bluetooth packages on supported boards if [ "$ENABLE_BLUETOOTH" = true ] ; then APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez" fi if [ "$ENABLE_WIRELESS" = true ] ; then APT_INCLUDES="${APT_INCLUDES},wireless-tools,crda,wireless-regdb,wpasupplicant" fi -else # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard - # Check if the internal wireless interface is not supported by the RPi model + # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard +else + ## Check if the internal wireless interface is not supported by the RPi model if [ "$ENABLE_WIRELESS" = true ] || [ "$ENABLE_BLUETOOTH" = true ]; then echo "error: The selected Raspberry Pi model has no integrated interface for wireless or bluetooth" exit 1 @@ -440,11 +442,11 @@ if [ "$ENABLE_CRYPTFS" = true ] && [ "$BUILD_KERNEL" = true ] ; then REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cryptsetup" APT_INCLUDES="${APT_INCLUDES},cryptsetup,busybox,console-setup,cryptsetup-initramfs" - # If cryptfs,dropbear and initramfs are enabled include dropbear-initramfs package + ## If cryptfs,dropbear and initramfs are enabled include dropbear-initramfs package if [ "$CRYPTFS_DROPBEAR" = true ] && [ "$ENABLE_INITRAMFS" = true ]; then APT_INCLUDES="${APT_INCLUDES},dropbear-initramfs" fi - + if [ -z "$CRYPTFS_PASSWORD" ] ; then echo "error: no password defined (CRYPTFS_PASSWORD)!" exit 1 @@ -462,11 +464,11 @@ if [ "$ENABLE_UBOOT" = true ] ; then APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bc" fi -if [ "$ENABLE_USBBOOT" = true ] ; then - if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 2 ]; then - echo "error: Booting from USB alone is only supported by Raspberry Pi 3 and 3P" - exit 1 - fi +if [ "$ENABLE_USBBOOT" = true ] ; then +if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 2 ]; then + echo "error: Booting from USB alone is only supported by Raspberry Pi 3 and 3P" + exit 1 +fi fi # Check if root SSH (v2) public key file exists @@ -506,7 +508,7 @@ if [ -n "$MISSING_PACKAGES" ] ; then read -r confirm [ "$confirm" != "y" ] && exit 1 - # Make sure all missing required packages are installed + ## Make sure all missing required packages are installed apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"` fi @@ -554,8 +556,8 @@ fi # Check if specified CHROOT_SCRIPTS directory exists if [ -n "$CHROOT_SCRIPTS" ] && [ ! -d "$CHROOT_SCRIPTS" ] ; then - echo "error: ${CHROOT_SCRIPTS} specified directory not found (CHROOT_SCRIPTS)!" - exit 1 + echo "error: ${CHROOT_SCRIPTS} specified directory not found (CHROOT_SCRIPTS)!" + exit 1 fi # Check if specified device mapping already exists (will be used by cryptsetup) @@ -649,12 +651,12 @@ fi # Replace selected packages with smaller clones if [ "$ENABLE_REDUCE" = true ] ; then - # Add levee package instead of vim-tiny + ## Add levee package instead of vim-tiny if [ "$REDUCE_VIM" = true ] ; then APT_INCLUDES="$(echo ${APT_INCLUDES} | sed "s/vim-tiny/levee/")" fi - # Add dropbear package instead of openssh-server + ## Add dropbear package instead of openssh-server if [ "$REDUCE_SSHD" = true ] ; then APT_INCLUDES="$(echo "${APT_INCLUDES}" | sed "s/openssh-server/dropbear/")" fi @@ -702,12 +704,12 @@ fi if [ -n "$CHROOT_SCRIPTS" ] && [ -d "$CHROOT_SCRIPTS" ] ; then cp -r "${CHROOT_SCRIPTS}" "${R}/chroot_scripts" chroot_exec /bin/bash -x <<'EOF' -for SCRIPT in /chroot_scripts/* ; do - if [ -f $SCRIPT -a -x $SCRIPT ] ; then - $SCRIPT - fi -done -EOF + for SCRIPT in /chroot_scripts/* ; do + if [ -f $SCRIPT -a -x $SCRIPT ] ; then + $SCRIPT + fi + done + EOF rm -rf "${R}/chroot_scripts" fi @@ -823,13 +825,13 @@ if [ "$ENABLE_SPLITFS" = true ] ; then # Write firmware/boot partition tables sfdisk -q -L -uS -f "$IMAGE_NAME-frmw.img" 2> /dev/null < /dev/null < /dev/null <