From e108b4863bfad66fcf409347ed16c540578b8711 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 29 Jul 2014 09:34:28 -0500 Subject: [PATCH] finish: use the variables Signed-off-by: Robert Nelson --- lib/debian-finish.sh | 14 ++++++++------ lib/ubuntu-finish.sh | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/debian-finish.sh b/lib/debian-finish.sh index 7f3953f..3e17b6c 100644 --- a/lib/debian-finish.sh +++ b/lib/debian-finish.sh @@ -175,14 +175,16 @@ if [ "x${conf_smart_uboot}" = "xenable" ] ; then else wfile="/boot/uboot/boot/uEnv.txt" echo "uname_r=current" > ${wfile} - cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current - cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current - if [ -f /boot/uboot/uImage ] ; then - cp /boot/uboot/uImage /boot/uboot/boot/uImage + if [ "x${uboot_CONFIG_CMD_BOOTZ}" = "xenable" ] ; then + cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current + else + mkimage -A arm -O linux -T kernel -C none -a ${zreladdr} -e ${zreladdr} -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/boot/uImage echo "zreladdr=${zreladdr}" >> ${wfile} fi - if [ -f /boot/uboot/uInitrd ] ; then - cp /boot/uboot/uInitrd /boot/uboot/boot/uInitrd + if [ "x${uboot_CONFIG_SUPPORT_RAW_INITRD}" = "xenable" ] ; then + cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current + else + mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/boot/uInitrd fi fi diff --git a/lib/ubuntu-finish.sh b/lib/ubuntu-finish.sh index f89a538..5a1fb1d 100644 --- a/lib/ubuntu-finish.sh +++ b/lib/ubuntu-finish.sh @@ -145,14 +145,16 @@ if [ "x${conf_smart_uboot}" = "xenable" ] ; then else wfile="/boot/uboot/boot/uEnv.txt" echo "uname_r=current" > ${wfile} - cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current - cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current - if [ -f /boot/uboot/uImage ] ; then - cp /boot/uboot/uImage /boot/uboot/boot/uImage + if [ "x${uboot_CONFIG_CMD_BOOTZ}" = "xenable" ] ; then + cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current + else + mkimage -A arm -O linux -T kernel -C none -a ${zreladdr} -e ${zreladdr} -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/boot/uImage echo "zreladdr=${zreladdr}" >> ${wfile} fi - if [ -f /boot/uboot/uInitrd ] ; then - cp /boot/uboot/uInitrd /boot/uboot/boot/uInitrd + if [ "x${uboot_CONFIG_SUPPORT_RAW_INITRD}" = "xenable" ] ; then + cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current + else + mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/boot/uInitrd fi fi