diff --git a/build.sh b/build.sh index 1643d5f..d4c0005 100755 --- a/build.sh +++ b/build.sh @@ -114,7 +114,7 @@ EOF esac popd > /dev/null log "End ${SUB_STAGE_DIR}/${i}-patches-${ARCH}" - elif [ -d "${i}-patches-arm-only" ]; then + elif [ -d "${i}-patches-arm-only" ] && [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then log "Begin ${SUB_STAGE_DIR}/${i}-patches-arm-only" pushd "${STAGE_WORK_DIR}" > /dev/null if [ "${CLEAN}" = "1" ]; then @@ -213,7 +213,7 @@ run_stage(){ unmount "${WORK_DIR}/${STAGE}" if [ ! -f SKIP_IMAGES ]; then - if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ]; then + if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ] && [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}" fi fi diff --git a/stage1/00-boot-files/00-run.sh b/stage1/00-boot-files/00-run-arm-only.sh similarity index 100% rename from stage1/00-boot-files/00-run.sh rename to stage1/00-boot-files/00-run-arm-only.sh diff --git a/stage1/01-sys-tweaks/00-packages b/stage1/01-sys-tweaks/00-packages-arm-only similarity index 100% rename from stage1/01-sys-tweaks/00-packages rename to stage1/01-sys-tweaks/00-packages-arm-only diff --git a/stage1/02-net-tweaks/00-run.sh b/stage1/02-net-tweaks/00-run.sh index 95dfbdc..acbe3c2 100755 --- a/stage1/02-net-tweaks/00-run.sh +++ b/stage1/02-net-tweaks/00-run.sh @@ -2,7 +2,3 @@ echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname" echo "127.0.1.1 ${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts" - -on_chroot << EOF - SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_net_names 1 -EOF diff --git a/stage1/02-net-tweaks/01-run-arm-only.sh b/stage1/02-net-tweaks/01-run-arm-only.sh new file mode 100755 index 0000000..2c56245 --- /dev/null +++ b/stage1/02-net-tweaks/01-run-arm-only.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +on_chroot << EOF + SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_net_names 1 +EOF diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index cdac68c..4362c00 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -12,13 +12,10 @@ ca-certificates curl fake-hwclock nfs-common usbutils dosfstools dphys-swapfile -raspberrypi-sys-mods -pi-bluetooth apt-listchanges apt-file usb-modeswitch libpam-chksshpwd -rpi-update libmtp-runtime rsync htop @@ -28,8 +25,6 @@ ssh-import-id ethtool ntfs-3g pciutils -rpi-eeprom -raspi-utils udisks2 unzip zip p7zip-full file diff --git a/stage2/01-sys-tweaks/00-patches/04-inputrc.diff b/stage2/01-sys-tweaks/00-patches/03-inputrc.diff similarity index 100% rename from stage2/01-sys-tweaks/00-patches/04-inputrc.diff rename to stage2/01-sys-tweaks/00-patches/03-inputrc.diff diff --git a/stage2/01-sys-tweaks/00-patches/05-path.diff b/stage2/01-sys-tweaks/00-patches/04-path.diff similarity index 100% rename from stage2/01-sys-tweaks/00-patches/05-path.diff rename to stage2/01-sys-tweaks/00-patches/04-path.diff diff --git a/stage2/01-sys-tweaks/00-patches/series b/stage2/01-sys-tweaks/00-patches/series index aee0402..eb33ae7 100644 --- a/stage2/01-sys-tweaks/00-patches/series +++ b/stage2/01-sys-tweaks/00-patches/series @@ -1,5 +1,4 @@ 01-useradd.diff 02-swap.diff -04-inputrc.diff -05-path.diff -07-resize-init.diff +03-inputrc.diff +04-path.diff diff --git a/stage2/01-sys-tweaks/01-packages-arm-only b/stage2/01-sys-tweaks/01-packages-arm-only new file mode 100644 index 0000000..5347bbe --- /dev/null +++ b/stage2/01-sys-tweaks/01-packages-arm-only @@ -0,0 +1,5 @@ +raspberrypi-sys-mods +pi-bluetooth +rpi-update +rpi-eeprom +raspi-utils diff --git a/stage2/01-sys-tweaks/00-patches/07-resize-init.diff b/stage2/01-sys-tweaks/01-patches-arm-only/01-resize-init.diff similarity index 100% rename from stage2/01-sys-tweaks/00-patches/07-resize-init.diff rename to stage2/01-sys-tweaks/01-patches-arm-only/01-resize-init.diff diff --git a/stage2/01-sys-tweaks/01-patches-arm-only/series b/stage2/01-sys-tweaks/01-patches-arm-only/series new file mode 100644 index 0000000..7bc2773 --- /dev/null +++ b/stage2/01-sys-tweaks/01-patches-arm-only/series @@ -0,0 +1 @@ +01-resize-init.diff diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index aca8074..4af99d4 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -2,7 +2,9 @@ install -m 755 files/resize2fs_once "${ROOTFS_DIR}/etc/init.d/" -install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" +if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then + install -m 644 files/50raspi "${ROOTFS_DIR}/etc/apt/apt.conf.d/" +fi install -m 644 files/console-setup "${ROOTFS_DIR}/etc/default/" diff --git a/stage2/02-net-tweaks/00-packages b/stage2/02-net-tweaks/00-packages index d446837..308e8d0 100644 --- a/stage2/02-net-tweaks/00-packages +++ b/stage2/02-net-tweaks/00-packages @@ -1,4 +1,3 @@ wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek -raspberrypi-net-mods network-manager net-tools diff --git a/stage2/02-net-tweaks/01-packages-arm-only b/stage2/02-net-tweaks/01-packages-arm-only new file mode 100644 index 0000000..aa5f958 --- /dev/null +++ b/stage2/02-net-tweaks/01-packages-arm-only @@ -0,0 +1 @@ +raspberrypi-net-mods diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run-arm-only.sh similarity index 100% rename from stage2/02-net-tweaks/01-run.sh rename to stage2/02-net-tweaks/01-run-arm-only.sh diff --git a/stage3/00-install-packages/00-packages b/stage3/00-install-packages/00-packages index adfbe8e..c8d842a 100644 --- a/stage3/00-install-packages/00-packages +++ b/stage3/00-install-packages/00-packages @@ -4,7 +4,7 @@ desktop-base git gvfs rfkill -firefox rpi-firefox-mods libwidevinecdm0 +firefox libwidevinecdm0 gldriver-test fonts-droid-fallback fonts-liberation2 diff --git a/stage3/00-install-packages/01-packages-arm-only b/stage3/00-install-packages/01-packages-arm-only new file mode 100644 index 0000000..22c5603 --- /dev/null +++ b/stage3/00-install-packages/01-packages-arm-only @@ -0,0 +1 @@ +rpi-firefox-mods diff --git a/stage3/01-install-desktop/02-packages b/stage3/01-install-desktop/01-packages similarity index 100% rename from stage3/01-install-desktop/02-packages rename to stage3/01-install-desktop/01-packages diff --git a/stage3/02-extras-fixes/00-run.sh b/stage3/02-extras-fixes/00-run.sh index 9716b30..6416e44 100755 --- a/stage3/02-extras-fixes/00-run.sh +++ b/stage3/02-extras-fixes/00-run.sh @@ -1,10 +1,5 @@ #!/bin/bash -e -# Enable xcompmgr -on_chroot << EOF - raspi-config nonint do_xcompmgr 0 -EOF - # polkit fixes install -m 644 files/polkit-admin.conf "${ROOTFS_DIR}/etc/polkit-1/localauthority.conf.d/51-admin.conf" @@ -43,11 +38,6 @@ on_chroot << EOF SUDO_USER="${FIRST_USER_NAME}" dconf update EOF -# Pi-Apps (this is a bash script that installs pi-apps when the user runs it, then gets overwritten by the actual pi-apps) -install -m 755 files/pi-apps "${ROOTFS_DIR}/usr/bin/pi-apps" -install -m 755 files/pi-apps.desktop "${ROOTFS_DIR}/usr/share/applications/pi-apps.desktop" -install -m 644 files/pi-apps-logo.png "${ROOTFS_DIR}/usr/share/icons/hicolor/256x256/apps/pi-apps.png" - # Remove setup user (only if it's not a system account) on_chroot << EOF #deluser --remove-home --remove-all-files ${FIRST_USER_NAME} diff --git a/stage3/02-extras-fixes/01-run.sh b/stage3/02-extras-fixes/01-run.sh new file mode 100755 index 0000000..5d00a9b --- /dev/null +++ b/stage3/02-extras-fixes/01-run.sh @@ -0,0 +1,11 @@ +#!/bin/bash -e + +# Enable xcompmgr +on_chroot << EOF + raspi-config nonint do_xcompmgr 0 +EOF + +# Pi-Apps (this is a bash script that installs pi-apps when the user runs it, then gets overwritten by the actual pi-apps) +install -m 755 files/pi-apps "${ROOTFS_DIR}/usr/bin/pi-apps" +install -m 755 files/pi-apps.desktop "${ROOTFS_DIR}/usr/share/applications/pi-apps.desktop" +install -m 644 files/pi-apps-logo.png "${ROOTFS_DIR}/usr/share/icons/hicolor/256x256/apps/pi-apps.png" \ No newline at end of file