diff --git a/mk_mmc.sh b/mk_mmc.sh index b807cac..0bfd645 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1160,24 +1160,26 @@ function populate_boot { fi fi - VMLINUZ="vmlinuz-*" - UIMAGE="uImage.net" - - if [ -f ${TEMPDIR}/kernel/boot/${VMLINUZ} ]; then - LINUX_VER=$(ls ${TEMPDIR}/kernel/boot/${VMLINUZ} | awk -F'vmlinuz-' '{print $2}') - echo "Using mkimage to create uImage" - echo "-----------------------------" - mkimage -A arm -O linux -T kernel -C none -a ${ZRELADD} -e ${ZRELADD} -n ${LINUX_VER} -d ${TEMPDIR}/kernel/boot/${VMLINUZ} ${TEMPDIR}/disk/${UIMAGE} - fi - - INITRD="initrd.mod.gz" - UINITRD="uInitrd.net" + VMLINUZ="vmlinuz-*" + UIMAGE="uImage.net" + if [ -f ${TEMPDIR}/kernel/boot/${VMLINUZ} ] ; then + LINUX_VER=$(ls ${TEMPDIR}/kernel/boot/${VMLINUZ} | awk -F'vmlinuz-' '{print $2}') + echo "Using mkimage to create uImage" + echo "-----------------------------" + mkimage -A arm -O linux -T kernel -C none -a ${ZRELADD} -e ${ZRELADD} -n ${LINUX_VER} -d ${TEMPDIR}/kernel/boot/${VMLINUZ} ${TEMPDIR}/disk/${UIMAGE} + echo "Debug: zImage.net for future u-boot bootz support" + cp -v ${TEMPDIR}/kernel/boot/${VMLINUZ} ${TEMPDIR}/disk/zImage.net + fi - if [ -f ${TEMPDIR}/${INITRD} ]; then - echo "Using mkimage to create uInitrd" - echo "-----------------------------" - mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${TEMPDIR}/${INITRD} ${TEMPDIR}/disk/${UINITRD} - fi + INITRD="initrd.mod.gz" + UINITRD="uInitrd.net" + if [ -f ${TEMPDIR}/${INITRD} ] ; then + echo "Using mkimage to create uInitrd" + echo "-----------------------------" + mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${TEMPDIR}/${INITRD} ${TEMPDIR}/disk/${UINITRD} + echo "Debug: initrd.net for future u-boot bootz support" + cp -v ${TEMPDIR}/${INITRD} ${TEMPDIR}/disk/${UINITRD}/initrd.net + fi echo "Copying uEnv.txt based boot scripts to Boot Partition" echo "-----------------------------" diff --git a/scripts/debian-finish.sh b/scripts/debian-finish.sh index 11b81b6..53bb458 100644 --- a/scripts/debian-finish.sh +++ b/scripts/debian-finish.sh @@ -14,6 +14,8 @@ fi #Cleanup: NetInstall Files rm -f /boot/uboot/uInitrd.net || true rm -f /boot/uboot/uImage.net || true +rm -f /boot/uboot/zImage.net || true +rm -f /boot/uboot/initrd.net || true #Cleanup: Initial Bootloader rm -f /boot/uboot/boot.scr || true @@ -30,6 +32,10 @@ dpkg -x /boot/uboot/linux-image-*_1.0*_arm*.deb / update-initramfs -c -k `uname -r` mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd mkimage -A arm -O linux -T kernel -C none -a ZRELADD -e ZRELADD -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage + +cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage +cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img + rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true #Debug: diff --git a/scripts/ubuntu-finish.sh b/scripts/ubuntu-finish.sh index a56f5d1..ec0264c 100644 --- a/scripts/ubuntu-finish.sh +++ b/scripts/ubuntu-finish.sh @@ -14,6 +14,8 @@ fi #Cleanup: NetInstall Files rm -f /boot/uboot/uInitrd.net || true rm -f /boot/uboot/uImage.net || true +rm -f /boot/uboot/zImage.net || true +rm -f /boot/uboot/initrd.net || true #Cleanup: Ubuntu's mess of backup files rm -f /boot/uboot/uInitrd || true @@ -68,6 +70,10 @@ dpkg -x /boot/uboot/linux-image-*_1.0*_arm*.deb / update-initramfs -c -k `uname -r` mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd mkimage -A arm -O linux -T kernel -C none -a ZRELADD -e ZRELADD -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage + +cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage +cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img + rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true #Debug: