From b49ab651ce1bad38ff2004c8929907b0ce954df7 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 24 Jul 2014 14:50:59 -0500 Subject: [PATCH] mk_mmc.sh: flash kernel fixes Signed-off-by: Robert Nelson --- mk_mmc.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 8946f2f..8ad9cca 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -732,6 +732,9 @@ flash_kernel_base_installer () { #need by Ubuntu Trusty (flash-kernel) mkdir -p /lib/firmware/\$(uname -r)/device-tree/ cp /target/boot/uboot/boot/dtbs/current/* /lib/firmware/\$(uname -r)/device-tree/ + if [ -f /target/boot/uboot/boot/vmlinuz-current ] ; then + cp /target/boot/uboot/boot/vmlinuz-current /boot/vmlinuz-\$(uname -r) + fi mount -o bind /sys /target/sys cat /proc/mounts > /target/mounts @@ -747,11 +750,17 @@ flash_kernel_base_installer () { rm -f /target/mounts || true umount /target/sys - cp /target/boot/uboot/${fki_vmlinuz} /target/boot/${fki_vmlinuz} - cp /target/boot/initrd.img-\$(uname -r) /target/boot/${fki_initrd} + if [ -f /target/boot/uboot/${fki_vmlinuz} ] ; then + cp /target/boot/uboot/${fki_vmlinuz} /target/boot/${fki_vmlinuz} + cp /target/boot/uboot/${fki_vmlinuz} /target/boot/vmlinuz-\$(uname -r) + else + cp /target/boot/uboot/boot/vmlinuz-current /target/boot/${fki_vmlinuz} + cp /target/boot/uboot/boot/vmlinuz-current /target/boot/vmlinuz-\$(uname -r) + fi - #needed with patched linux-version - cp /target/boot/uboot/${fki_vmlinuz} /target/boot/vmlinuz-\$(uname -r) + if [ -f /target/boot/initrd.img-\$(uname -r) ] ; then + cp /target/boot/initrd.img-\$(uname -r) /target/boot/${fki_initrd} + fi sync umount /target/boot/uboot