diff --git a/banana-pi.sh b/banana-pi.sh index 56596f0..52eb967 100755 --- a/banana-pi.sh +++ b/banana-pi.sh @@ -221,7 +221,7 @@ apt -o APT::Sandbox::User=root download ca-certificates 2>/dev/null # We replace the u-boot menu defaults here so we can make sure the build system doesn't poison it. # We use _EOF_ so that the third-stage script doesn't end prematurely. cat << '_EOF_' > /etc/default/u-boot -U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0" +U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0" _EOF_ # Try and make the console a bit nicer @@ -247,13 +247,14 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* rm -rf /var/cache/debconf/*.data-old history -c EOF -# Clear all logs +#Clear all logs for logs in `find $work_dir/var/log -type f`; do > $logs; done # Disable the use of http proxy in case it is enabled. @@ -284,7 +285,7 @@ cp "${basedir}"/../bsp/xorg/20-fbdev.conf ${work_dir}/etc/X11/xorg.conf.d/ # Build system will insert it's root filesystem into the extlinux.conf file so # we sed it out, this only affects build time, not upgrading the kernel on the # device itself. -sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0/g' ${work_dir}/boot/extlinux/extlinux.conf +sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0/g' ${work_dir}/boot/extlinux/extlinux.conf # Calculate the space to create the image. root_size=$(du -s -B1 ${work_dir} --exclude=${work_dir}/boot | cut -f1) @@ -295,7 +296,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 1MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 1MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -322,7 +323,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs to image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/banana-pro.sh b/banana-pro.sh index 537841d..b3c9d59 100755 --- a/banana-pro.sh +++ b/banana-pro.sh @@ -235,7 +235,7 @@ sed -i 's/^TimeoutStartSec=5min/TimeoutStartSec=25/g' "/usr/lib/systemd/system/n # We replace the u-boot menu defaults here so we can make sure the build system doesn't poison it. # We use _EOF_ so that the third-stage script doesn't end prematurely. cat << '_EOF_' > /etc/default/u-boot -U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0" +U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0" _EOF_ rm -f /usr/sbin/policy-rc.d @@ -257,6 +257,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -286,7 +287,7 @@ EOF # Build system will insert it's root filesystem into the extlinux.conf file so # we sed it out, this only affects build time, not upgrading the kernel on the # device itself. -sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0/g' ${work_dir}/boot/extlinux/extlinux.conf +sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0/g' ${work_dir}/boot/extlinux/extlinux.conf # Calculate the space to create the image. root_size=$(du -s -B1 ${work_dir} --exclude=${work_dir}/boot | cut -f1) @@ -297,7 +298,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 1MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 1MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -324,7 +325,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs to image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/bbb.sh b/bbb.sh index 02fdc19..fc1c030 100755 --- a/bbb.sh +++ b/bbb.sh @@ -263,6 +263,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -330,7 +331,7 @@ loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} /dtbs/\${fdtfile} console=ttyO0,115200n8 mmcroot=/dev/mmcblk0p2 rw net.ifnames=0 -mmcrootfstype=ext3 rootwait fixrtc +mmcrootfstype=$fstype rootwait fixrtc ##To disable HDMI/eMMC... #optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G @@ -416,7 +417,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -448,7 +449,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/chromebook-arm-exynos.sh b/chromebook-arm-exynos.sh index 3674f59..c8b9fa0 100755 --- a/chromebook-arm-exynos.sh +++ b/chromebook-arm-exynos.sh @@ -246,6 +246,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -505,7 +506,7 @@ cd ${work_dir}/usr/src/kernel/arch/arm/boot mkimage -D "-I dts -O dtb -p 2048" -f kernel-exynos.its exynos-kernel # microSD Card -echo 'noinitrd console=tty1 quiet root=PARTUUID=%U/PARTNROFF=1 rootwait rw lsm.module_locking=0 net.ifnames=0 rootfstype=ext3' > cmdline +echo 'noinitrd console=tty1 quiet root=PARTUUID=%U/PARTNROFF=1 rootwait rw lsm.module_locking=0 net.ifnames=0 rootfstype=$fstype' > cmdline # Pulled from ChromeOS, this is exactly what they do because there's no # bootloader in the kernel partition on ARM. @@ -651,7 +652,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/chromebook-arm-nyan.sh b/chromebook-arm-nyan.sh index 00f8bb0..e2aeb27 100755 --- a/chromebook-arm-nyan.sh +++ b/chromebook-arm-nyan.sh @@ -250,6 +250,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -441,7 +442,7 @@ cd ${work_dir}/usr/src/kernel/arch/arm/boot mkimage -f kernel-nyan.its nyan-big-kernel # BEHOLD THE POWER OF PARTUUID/PARTNROFF -echo "noinitrd console=tty1 quiet root=PARTUUID=%U/PARTNROFF=1 rootwait rw lsm.module_locking=0 net.ifnames=0 rootfstype=ext3" > cmdline +echo "noinitrd console=tty1 quiet root=PARTUUID=%U/PARTNROFF=1 rootwait rw lsm.module_locking=0 net.ifnames=0 rootfstype=$fstype" > cmdline # Pulled from ChromeOS, this is exactly what they do because there's no # # bootloader in the kernel partition on ARM. @@ -557,7 +558,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/chromebook-arm-veyron.sh b/chromebook-arm-veyron.sh index 693c807..f31398d 100755 --- a/chromebook-arm-veyron.sh +++ b/chromebook-arm-veyron.sh @@ -243,6 +243,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -421,7 +422,7 @@ cd ${work_dir}/usr/src/kernel/arch/arm/boot mkimage -D "-I dts -O dtb -p 2048" -f kernel-veyron.its veyron-kernel # BEHOLD THE MAGIC OF PARTUUID/PARTNROFF -echo 'noinitrd console=tty1 quiet root=PARTUUID=%U/PARTNROFF=1 rootwait rw lsm.module_locking=0 net.ifnames=0 rootfstype=ext3' > cmdline +echo 'noinitrd console=tty1 quiet root=PARTUUID=%U/PARTNROFF=1 rootwait rw lsm.module_locking=0 net.ifnames=0 rootfstype=$fstype' > cmdline # Pulled from ChromeOS, this is exactly what they do because there's no # bootloader in the kernel partition on ARM. @@ -522,7 +523,7 @@ mount ${rootp} "${basedir}"/root # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/cubieboard2.sh b/cubieboard2.sh index 9506b1d..75e1ccf 100755 --- a/cubieboard2.sh +++ b/cubieboard2.sh @@ -256,6 +256,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -326,7 +327,7 @@ cd "${basedir}" # Create boot.txt file cat << EOF > ${work_dir}/boot/boot.cmd -setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=ext3 net.ifnames=0 +setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra} rw rootfstype=$fstype net.ifnames=0 fatload mmc 0 0x43000000 script.bin fatload mmc 0 0x48000000 uImage bootm 0x48000000 @@ -345,7 +346,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -377,7 +378,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs to image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/cubietruck.sh b/cubietruck.sh index 87af10c..60b46bc 100755 --- a/cubietruck.sh +++ b/cubietruck.sh @@ -252,6 +252,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -322,7 +323,7 @@ cd "${basedir}" # Create boot.txt file cat << EOF > ${work_dir}/boot/boot.cmd setenv bootm_boot_mode sec -setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 \${extra} rw rootfstype=ext3 net.ifnames=0 +setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 \${extra} rw rootfstype=$fstype net.ifnames=0 fatload mmc 0 0x43000000 script.bin fatload mmc 0 0x48000000 uImage bootm 0x48000000 @@ -341,7 +342,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -373,7 +374,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs to image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/cubox-i.sh b/cubox-i.sh index 2cec40f..f0c4663 100755 --- a/cubox-i.sh +++ b/cubox-i.sh @@ -238,7 +238,7 @@ sed -i 's/^TimeoutStartSec=5min/TimeoutStartSec=15/g' "/usr/lib/systemd/system/n # We replace the u-boot menu defaults here so we can make sure the build system doesn't poison it. # We use _EOF_ so that the third-stage script doesn't end prematurely. cat << '_EOF_' > /etc/default/u-boot -U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0" +U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0" _EOF_ rm -f /usr/sbin/policy-rc.d @@ -260,6 +260,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -295,7 +296,7 @@ rm -rf ${work_dir}/lib/firmware/brcm cp -a firmware/brcm ${work_dir}/lib/firmware/ # Ensure we don't have root=/dev/sda3 in the extlinux.conf which comes from running u-boot-menu in a cross chroot. -sed -i -e 's/append.*/append root=\/dev\/mmcblk1p1 rootfstype=ext3 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 console=ttymxc0,115200n8 console=tty1 consoleblank=0 rw rootwait/g' ${work_dir}/boot/extlinux/extlinux.conf +sed -i -e 's/append.*/append root=\/dev\/mmcblk1p1 rootfstype=$fstype video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 console=ttymxc0,115200n8 console=tty1 consoleblank=0 rw rootwait/g' ${work_dir}/boot/extlinux/extlinux.conf # Calculate the space to create the image. root_size=$(du -s -B1 ${work_dir} --exclude=${work_dir}/boot | cut -f1) @@ -306,7 +307,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 1MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 1MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -333,7 +334,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/cubox.sh b/cubox.sh index 9388a90..73b2eb4 100755 --- a/cubox.sh +++ b/cubox.sh @@ -254,6 +254,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -336,7 +337,7 @@ if itest.s \${device_name} -eq ide; then fi if itest.s \$root_device -ne ?; then - setenv bootargs "console=ttyS0,115200n8 vmalloc=448M video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 root=\${root_device} rootfstype=ext3 rw net.ifnames=0" + setenv bootargs "console=ttyS0,115200n8 vmalloc=448M video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 root=\${root_device} rootfstype=$fstype rw net.ifnames=0" setenv loadimage "\${fstype}load \${device_name} \${unit_no}:\${partition} 0x00200000 \${directory}\${image_name}" \$loadimage && bootm 0x00200000 @@ -361,7 +362,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 1MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 1MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -388,7 +389,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/gateworks_ventana.sh b/gateworks_ventana.sh index 9d0c65d..cb23a0b 100755 --- a/gateworks_ventana.sh +++ b/gateworks_ventana.sh @@ -238,7 +238,7 @@ cp /etc/skel/.bashrc /root/.bashrc # We replace the u-boot menu defaults here so we can make sure the build system doesn't poison it. # We use _EOF_ so that the third-stage script doesn't end prematurely. cat << '_EOF_' > /etc/default/u-boot -U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0" +U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0" _EOF_ # Try and make the console a bit nicer @@ -296,6 +296,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -359,7 +360,7 @@ wget 'https://github.com/armbian/firmware/blob/master/imx/sdma/sdma-imx6q.bin?ra # Not using extlinux.conf just yet... # Ensure we don't have root=/dev/sda3 in the extlinux.conf which comes from running u-boot-menu in a cross chroot. -#sed -i -e 's/append.*/append root=\/dev\/mmcblk0p1 rootfstype=ext3 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 console=ttymxc0,115200n8 console=tty1 consoleblank=0 rw rootwait/g' ${work_dir}/boot/extlinux/extlinux.conf +#sed -i -e 's/append.*/append root=\/dev\/mmcblk0p1 rootfstype=$fstype video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 console=ttymxc0,115200n8 console=tty1 consoleblank=0 rw rootwait/g' ${work_dir}/boot/extlinux/extlinux.conf install -m644 ${current_dir}/bsp/bootloader/ventana/6x_bootscript-ventana.script ${work_dir}/boot/6x_bootscript-ventana.script mkimage -A arm -T script -C none -d ${work_dir}/boot/6x_bootscript-ventana.script ${work_dir}/boot/6x_bootscript-ventana @@ -372,7 +373,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 1MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 1MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -399,7 +400,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/kalitap.sh b/kalitap.sh index aa9af6c..4e9e352 100755 --- a/kalitap.sh +++ b/kalitap.sh @@ -252,6 +252,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -353,7 +354,7 @@ loadinitrd=load mmc \${mmcdev}:\${mmcpart} \${initrd_addr} \${initrd_file}; sete loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} \${fdtfile} console=ttyO0,115200n8 mmcroot=/dev/mmcblk0p2 -mmcrootfstype=ext3 +mmcrootfstype=$fstype mmcargs=setenv bootargs console=\${console} root=\${mmcroot} rootfstype=\${mmcrootfstype} \${optargs} uenvcmd=run loadimage; run loadfdt; run mmcargs; bootz \${loadaddr} - \${fdtaddr} EOF @@ -380,7 +381,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% parted ${current_dir}/${imagename}.img --script -- set 1 boot on # Set the partition variables @@ -413,7 +414,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/luna.sh b/luna.sh index 25a8f4a..748d9ea 100755 --- a/luna.sh +++ b/luna.sh @@ -251,6 +251,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -329,7 +330,7 @@ loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} /dtbs/\${fdtfile} console=ttyO0,115200n8 mmcroot=/dev/mmcblk0p2 ro -mmcrootfstype=ext3 rootwait fixrtc net.ifnames=0 +mmcrootfstype=$fstype rootwait fixrtc net.ifnames=0 mmcargs=setenv bootargs console=\${console} root=\${mmcroot} rootfstype=\${mmcrootfstype} \${optargs} #zImage: @@ -346,7 +347,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -378,7 +379,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/mini-x.sh b/mini-x.sh index 946a64b..231d851 100755 --- a/mini-x.sh +++ b/mini-x.sh @@ -218,7 +218,7 @@ apt download -o APT::Sandbox::User=root ca-certificates 2>/dev/null # We replace the u-boot menu defaults here so we can make sure the build system doesn't poison it. # We use _EOF_ so that the third-stage script doesn't end prematurely. cat << '_EOF_' > /etc/default/u-boot -U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0" +U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0" _EOF_ # Copy over the default bashrc @@ -257,6 +257,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -286,7 +287,7 @@ EOF # Build system will insert it's root filesystem into the extlinux.conf file so # we sed it out, this only affects build time, not upgrading the kernel on the # device itself. -sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0/g' ${work_dir}/boot/extlinux/extlinux.conf +sed -i -e 's/append.*/append console=ttyS0,115200 console=tty1 root=\/dev\/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0/g' ${work_dir}/boot/extlinux/extlinux.conf # Calculate the space to create the image. root_size=$(du -s -B1 ${work_dir} --exclude=${work_dir}/boot | cut -f1) @@ -297,7 +298,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 4MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 4MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -324,7 +325,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/nanopi2.sh b/nanopi2.sh index c1698a9..75d8ae9 100755 --- a/nanopi2.sh +++ b/nanopi2.sh @@ -264,6 +264,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -397,7 +398,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -429,7 +430,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ @@ -469,7 +470,7 @@ cat << EOF > ${basedir}/bootloader/env.conf # (http://www.friendlyarm.com) # -bootargs console=ttyAMA0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait rw consoleblank=0 net.ifnames=0 +bootargs console=ttyAMA0,115200n8 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rw consoleblank=0 net.ifnames=0 bootdelay 1 EOF diff --git a/nanopi3.sh b/nanopi3.sh index b615449..12c0f48 100755 --- a/nanopi3.sh +++ b/nanopi3.sh @@ -274,6 +274,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -364,7 +365,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -391,7 +392,7 @@ mount ${bootp} ${basedir}/root/boot # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ @@ -428,7 +429,7 @@ cat << EOF > "${basedir}"/bootloader/env.conf # (http://www.friendlyarm.com) # -bootargs console=ttySAC0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait rw consoleblank=0 net.ifnames=0 +bootargs console=ttySAC0,115200n8 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rw consoleblank=0 net.ifnames=0 bootdelay 1 EOF diff --git a/nanopineoplus2-minimal.sh b/nanopineoplus2-minimal.sh index 5c9084d..094e2f4 100755 --- a/nanopineoplus2-minimal.sh +++ b/nanopineoplus2-minimal.sh @@ -359,6 +359,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -491,7 +492,7 @@ fdt set ethernet0 local-mac-address \${mac_node} fdt set mmc\${boot_mmc} boot_device <1> setenv fbcon map:0 -setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait fsck.repair=\${fsck.repair} panic=10 \${extra} fbcon=\${fbcon} ipv6.disable=1 +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=$fstype rw rootwait fsck.repair=\${fsck.repair} panic=10 \${extra} fbcon=\${fbcon} ipv6.disable=1 #booti \${kernel_addr} \${ramdisk_addr}:500000 \${dtb_addr} booti \${kernel_addr} - \${dtb_addr} EOF @@ -512,7 +513,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 32MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -544,7 +545,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/nanopineoplus2.sh b/nanopineoplus2.sh index 062637f..9654662 100755 --- a/nanopineoplus2.sh +++ b/nanopineoplus2.sh @@ -357,6 +357,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -485,7 +486,7 @@ fdt set ethernet0 local-mac-address \${mac_node} fdt set mmc\${boot_mmc} boot_device <1> setenv fbcon map:0 -setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait fsck.repair=\${fsck.repair} panic=10 \${extra} fbcon=\${fbcon} ipv6.disable=1 +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=$fstype rw rootwait fsck.repair=\${fsck.repair} panic=10 \${extra} fbcon=\${fbcon} ipv6.disable=1 #booti \${kernel_addr} \${ramdisk_addr}:500000 \${dtb_addr} booti \${kernel_addr} - \${dtb_addr} EOF @@ -506,7 +507,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 32MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -533,7 +534,7 @@ mount ${bootp} "${basedir}"/root/boot # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/odroid-c.sh b/odroid-c.sh index 20d256d..e6984b5 100755 --- a/odroid-c.sh +++ b/odroid-c.sh @@ -260,6 +260,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -405,7 +406,7 @@ if test "\${hpd}" = "0"; then setenv hdmi_hpd "disablehpd=true"; fi if test "\${cec}" = "1"; then setenv hdmi_cec "hdmitx=cecf"; fi # Boot Arguments -setenv bootargs "root=/dev/mmcblk0p2 rootfstype=ext3 quiet rootwait rw \${condev} no_console_suspend vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=\${m} m_bpp=\${m_bpp} vout=\${vout_mode} \${disableuhs} \${hdmi_hpd} \${hdmi_cec} \${enabledac} net.ifnames=0" +setenv bootargs "root=/dev/mmcblk0p2 rootfstype=$fstype quiet rootwait rw \${condev} no_console_suspend vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=\${m} m_bpp=\${m_bpp} vout=\${vout_mode} \${disableuhs} \${hdmi_hpd} \${hdmi_cec} \${enabledac} net.ifnames=0" # Booting fatload mmc 0:1 0x21000000 uImage @@ -541,7 +542,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 4MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -573,7 +574,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/odroid-c2.sh b/odroid-c2.sh index 892bdcd..a78a579 100755 --- a/odroid-c2.sh +++ b/odroid-c2.sh @@ -260,6 +260,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -320,7 +321,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 32MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 32MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -349,7 +350,7 @@ sed -i -e "0,/root=.*/s//root=UUID=$(blkid -s UUID -o value ${rootp}) rw quiet/g # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/odroid-u2.sh b/odroid-u2.sh index 59a9f10..88f0db3 100755 --- a/odroid-u2.sh +++ b/odroid-u2.sh @@ -259,6 +259,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -366,7 +367,7 @@ cat << EOF > ${work_dir}/boot/boot.txt setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000" -setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p2 rootwait mem=2047M rw rootfstype=ext3 net.ifnames=0" +setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p2 rootwait mem=2047M rw rootfstype=$fstype net.ifnames=0" boot EOF @@ -385,7 +386,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -397,7 +398,7 @@ rootp=${device}p2 # Create file systems mkfs.vfat -n BOOT ${bootp} -# Disable 64bit on ext3 because the u-boot from 2010 is too old. +# Disable 64bit on ext3/4 because the u-boot from 2010 is too old. if [[ $fstype == ext4 ]]; then features="-O ^64bit,^metadata_csum" elif [[ $fstype == ext3 ]]; then diff --git a/odroid-w-devkit.sh b/odroid-w-devkit.sh index b4b22e8..85813b4 100755 --- a/odroid-w-devkit.sh +++ b/odroid-w-devkit.sh @@ -306,6 +306,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -343,7 +344,7 @@ EOF # Create cmdline.txt file cat << EOF > ${work_dir}/boot/cmdline.txt -dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext3 rootwait fbcon=map:10 net.ifnames=0 rw +dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=$fstype rootwait fbcon=map:10 net.ifnames=0 rw EOF # Copy a default config, with everything commented out so people find it when @@ -387,7 +388,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables bootp="$(losetup -o 1MiB --sizelimit ${bootstart}KiB -f --show ${current_dir}/${imagename}.img)" @@ -415,7 +416,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/odroid-w.sh b/odroid-w.sh index a0e2a39..5e32828 100755 --- a/odroid-w.sh +++ b/odroid-w.sh @@ -297,6 +297,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -314,7 +315,7 @@ fi # Create cmdline.txt file cat << EOF > ${work_dir}/boot/cmdline.txt -dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait rootflags=noload net.ifnames=0 +dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rootflags=noload net.ifnames=0 EOF # systemd doesn't seem to be generating the fstab properly for some people, so @@ -355,7 +356,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables bootp="$(losetup -o 1MiB --sizelimit ${bootstart}KiB -f --show ${basedir}/${imagename}.img)" @@ -383,7 +384,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/odroid-xu3.sh b/odroid-xu3.sh index f282c1d..8f77529 100755 --- a/odroid-xu3.sh +++ b/odroid-xu3.sh @@ -260,6 +260,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -341,7 +342,7 @@ setenv macaddr "00:1e:06:61:7a:39" #------------------------------------------------------------------------------------------------------ # Basic Ubuntu Setup. Don't touch unless you know what you are doing. # -------------------------------- -setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 net.ifnames=0 rw" +setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=$fstype net.ifnames=0 rw" # boot commands # Uncomment the following if you use an initrd @@ -391,7 +392,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 2MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -423,7 +424,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/pinebook-pro.sh b/pinebook-pro.sh index a442c51..6c843fd 100755 --- a/pinebook-pro.sh +++ b/pinebook-pro.sh @@ -252,6 +252,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -377,7 +378,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 32MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 32MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -404,7 +405,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/pinebook.sh b/pinebook.sh index 61b4b5c..db920fb 100755 --- a/pinebook.sh +++ b/pinebook.sh @@ -228,7 +228,7 @@ apt download -o APT::Sandbox::User=root ca-certificates 2>/dev/null # We replace the u-boot menu defaults here so we can make sure the build system doesn't poison it. # We use _EOF_ so that the third-stage script doesn't end prematurely. cat << '_EOF_' > /etc/default/u-boot -U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=ext3 net.ifnames=0" +U_BOOT_PARAMETERS="console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 rw rootfstype=$fstype net.ifnames=0" U_BOOT_MENU_LABEL="Kali Linux" _EOF_ @@ -311,6 +311,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -362,7 +363,7 @@ raw_size=$(($((${free_space}*1024))+${root_extra}+$((${bootsize}*1024))+4096)) echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 32MiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype 32MiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -389,7 +390,7 @@ EOF # Ensure we don't have root=/dev/sda3 in the extlinux.conf which comes from running u-boot-menu in a cross chroot. # We do this down here because we don't know the UUID until after the image is created. -sed -i -e "0,/root=.*/s//root=UUID=$(blkid -s UUID -o value ${rootp}) rootfstype=ext3 console=ttyS0,115200 console=tty1 consoleblank=0 rw quiet rootwait/g" ${work_dir}/boot/extlinux/extlinux.conf +sed -i -e "0,/root=.*/s//root=UUID=$(blkid -s UUID -o value ${rootp}) rootfstype=$fstype console=ttyS0,115200 console=tty1 consoleblank=0 rw quiet rootwait/g" ${work_dir}/boot/extlinux/extlinux.conf # And we remove the "Debian GNU/Linux because we're Kali" sed -i -e "s/Debian GNU\/Linux/Kali Linux/g" ${work_dir}/boot/extlinux/extlinux.conf diff --git a/riot.sh b/riot.sh index 9b56ce1..28f9734 100755 --- a/riot.sh +++ b/riot.sh @@ -288,6 +288,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -351,7 +352,7 @@ cd "${basedir}" #loadkernel=load \${dtype} \${disk}:1 \${loadaddr} zImage -#bargs=setenv bootargs console=ttymxc1,115200n8 rootwait root=PARTUUID=\${btpart} net.ifnames=0 rootfstype=ext3 +#bargs=setenv bootargs console=ttymxc1,115200n8 rootwait root=PARTUUID=\${btpart} net.ifnames=0 rootfstype=$fstype #loadfdt=load \${dtype} \${disk}:1 0x11000000 \${fdt_file} @@ -368,7 +369,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -400,7 +401,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/rpi.sh b/rpi.sh index 985737b..d632966 100755 --- a/rpi.sh +++ b/rpi.sh @@ -284,6 +284,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -312,7 +313,7 @@ EOF # Create cmdline.txt file cat << EOF > ${work_dir}/boot/cmdline.txt -dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext3 rootwait net.ifnames=0 +dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=$fstype rootwait net.ifnames=0 EOF # systemd doesn't seem to be generating the fstab properly for some people, so @@ -321,7 +322,7 @@ cat << EOF > ${work_dir}/etc/fstab # proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 2 -/dev/mmcblk0p2 / ext3 defaults,noatime 0 1 +/dev/mmcblk0p2 / $fstype defaults,noatime 0 1 EOF # Copy a default config, with everything commented out so people find it when @@ -340,7 +341,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables bootp="$(losetup -o 1MiB --sizelimit ${bootstart}KiB -f --show ${current_dir}/${imagename}.img)" diff --git a/rpi0w-nexmon-minimal.sh b/rpi0w-nexmon-minimal.sh index ba90389..f4f584b 100755 --- a/rpi0w-nexmon-minimal.sh +++ b/rpi0w-nexmon-minimal.sh @@ -322,6 +322,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -350,7 +351,7 @@ EOF # Create cmdline.txt file cat << EOF > ${work_dir}/boot/cmdline.txt -dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext3 elevator=deadline fsck.repair=yes rootwait +dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype elevator=deadline fsck.repair=yes rootwait EOF # systemd doesn't seem to be generating the fstab properly for some people, so @@ -359,7 +360,7 @@ cat << EOF > ${work_dir}/etc/fstab # proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 2 -/dev/mmcblk0p2 / ext3 defaults,noatime 0 1 +/dev/mmcblk0p2 / $fstype defaults,noatime 0 1 EOF # Copy a default config, with everything commented out so people find it when diff --git a/rpi0w-nexmon-p4wnp1-aloa.sh b/rpi0w-nexmon-p4wnp1-aloa.sh index 0543c2f..db29100 100755 --- a/rpi0w-nexmon-p4wnp1-aloa.sh +++ b/rpi0w-nexmon-p4wnp1-aloa.sh @@ -273,7 +273,7 @@ systemctl enable fake-hwclock # Create cmdline.txt file mkdir -p /boot -echo "dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext3 elevator=deadline fsck.repair=yes rootwait" > /boot/cmdline.txt +echo "dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype elevator=deadline fsck.repair=yes rootwait" > /boot/cmdline.txt # Install P4wnP1 A.L.O.A. cd /root/P4wnP1 @@ -441,7 +441,7 @@ cat << EOF > ${work_dir}/etc/fstab # proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 2 -/dev/mmcblk0p2 / ext3 defaults,noatime 0 1 +/dev/mmcblk0p2 / $fstype defaults,noatime 0 1 EOF @@ -495,7 +495,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables bootp="$(losetup -o 1MiB --sizelimit ${bootstart}KiB -f --show ${current_dir}/${imagename}.img)" diff --git a/rpi3-64.sh b/rpi3-64.sh index 478f8e6..ae71702 100755 --- a/rpi3-64.sh +++ b/rpi3-64.sh @@ -298,6 +298,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -326,7 +327,7 @@ EOF # Create cmdline.txt file cat << EOF > ${work_dir}/boot/cmdline.txt -dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait rootflags=noload net.ifnames=0 +dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rootflags=noload net.ifnames=0 EOF # systemd doesn't seem to be generating the fstab properly for some people, so @@ -335,7 +336,7 @@ cat << EOF > ${work_dir}/etc/fstab # proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 2 -/dev/mmcblk0p2 / ext3 defaults,noatime 0 1 +/dev/mmcblk0p2 / $fstype defaults,noatime 0 1 EOF # Copy a default config, with everything commented out so people find it when @@ -366,8 +367,6 @@ kernel=kernel8l-alt.img arm_64bit=1 EOF - - cd ${current_dir} # Calculate the space to create the image. @@ -380,7 +379,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables bootp="$(losetup -o 1MiB --sizelimit ${bootstart}KiB -f --show ${current_dir}/${imagename}.img)" diff --git a/rpi3-nexmon.sh b/rpi3-nexmon.sh index 4a6df2d..10c33b9 100755 --- a/rpi3-nexmon.sh +++ b/rpi3-nexmon.sh @@ -280,6 +280,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -297,7 +298,7 @@ fi # Create cmdline.txt file cat << EOF > ${work_dir}/boot/cmdline.txt -dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait rootflags=noload net.ifnames=0 +dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rootwait rootflags=noload net.ifnames=0 EOF # systemd doesn't seem to be generating the fstab properly for some people, so @@ -306,7 +307,7 @@ cat << EOF > ${work_dir}/etc/fstab # proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 2 -/dev/mmcblk0p2 / ext3 defaults,noatime 0 1 +/dev/mmcblk0p2 / $fstype defaults,noatime 0 1 EOF # Mirror replacement @@ -336,7 +337,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary fat32 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables bootp="$(losetup -o 1MiB --sizelimit ${bootstart}KiB -f --show ${current_dir}/${imagename}.img)" diff --git a/trimslice.sh b/trimslice.sh index 3ff26c9..99bc87c 100755 --- a/trimslice.sh +++ b/trimslice.sh @@ -286,6 +286,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -339,7 +340,7 @@ echo "Creating image file ${imagename}.img" fallocate -l $(echo ${raw_size}Ki | numfmt --from=iec-i --to=si) ${current_dir}/${imagename}.img parted ${current_dir}/${imagename}.img --script -- mklabel msdos parted ${current_dir}/${imagename}.img --script -- mkpart primary ext2 1MiB ${bootstart}KiB -parted ${current_dir}/${imagename}.img --script -- mkpart primary ext3 ${bootend}KiB 100% +parted ${current_dir}/${imagename}.img --script -- mkpart primary $fstype ${bootend}KiB 100% # Set the partition variables loopdevice=`losetup -f --show ${current_dir}/${imagename}.img` @@ -371,7 +372,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/usbarmory.sh b/usbarmory.sh index fb17ddd..8321577 100755 --- a/usbarmory.sh +++ b/usbarmory.sh @@ -251,6 +251,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -504,7 +505,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/ diff --git a/utilite.sh b/utilite.sh index e45d72b..232c8da 100755 --- a/utilite.sh +++ b/utilite.sh @@ -256,6 +256,7 @@ rm -rf /hs_err* rm -rf /userland rm -rf /opt/vc/src rm -f /etc/ssh/ssh_host_* +rm -rf /var/lib/dpkg/*-old rm -rf /var/lib/apt/lists/* rm -rf /var/cache/apt/*.bin rm -rf /var/cache/apt/archives/* @@ -343,7 +344,7 @@ cd "${basedir}" # Create a file to set up our u-boot environment cat << EOF > ${work_dir}/boot/boot.txt setenv mmcdev 2 -setenv bootargs 'earlyprintk console=ttymxc3,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait net.ifnames=0' +setenv bootargs 'earlyprintk console=ttymxc3,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=$fstype rw rootwait net.ifnames=0' setenv loadaddr 0x10800000 setenv fdtaddr 0x15000000 setenv bootm_low 0x15000000 @@ -407,7 +408,7 @@ EOF # Create an fstab so that we don't mount / read-only. UUID=$(blkid -s UUID -o value ${rootp}) -echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >> ${work_dir}/etc/fstab +echo "UUID=$UUID / $fstype errors=remount-ro 0 1" >> ${work_dir}/etc/fstab echo "Rsyncing rootfs into image file" rsync -HPavz -q ${work_dir}/ ${basedir}/root/