mk_mmc: add support for a possible future u-boot bootz

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/8/head
Robert Nelson 13 years ago
parent c04d0d191f
commit f16f7ab549

@ -1162,21 +1162,23 @@ function populate_boot {
VMLINUZ="vmlinuz-*"
UIMAGE="uImage.net"
if [ -f ${TEMPDIR}/kernel/boot/${VMLINUZ} ]; then
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
INITRD="initrd.mod.gz"
UINITRD="uInitrd.net"
if [ -f ${TEMPDIR}/${INITRD} ]; then
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"

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

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

Loading…
Cancel
Save