*: More cleanups

Fix the cleanup to remove more files that are left behind by the build system
Don't hardcode ext3, use fstype so users can set their own.
This commit is contained in:
Steev Klimaszewski
2020-07-26 17:40:50 -05:00
parent 59ea59c5c7
commit 2454874249
35 changed files with 135 additions and 103 deletions

View File

@@ -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/

View File

@@ -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/

7
bbb.sh
View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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

View File

@@ -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

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -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

View File

@@ -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/

7
rpi.sh
View File

@@ -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
# <file system> <mount point> <type> <options> <dump> <pass>
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)"

View File

@@ -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
# <file system> <mount point> <type> <options> <dump> <pass>
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

View File

@@ -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
# <file system> <mount point> <type> <options> <dump> <pass>
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)"

View File

@@ -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
# <file system> <mount point> <type> <options> <dump> <pass>
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)"

View File

@@ -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
# <file system> <mount point> <type> <options> <dump> <pass>
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)"

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/