fix: trampoline

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/37/head
Robert Nelson 10 years ago
parent 8a251ddd49
commit b2f154e11f

@ -165,13 +165,27 @@ if [ "x${conf_smart_uboot}" = "xenable" ] ; then
rootdrive=$(echo ${FINAL_PART} | awk -F"p" '{print $1}' || true)
if [ "x${bootdrive}" = "x${rootdrive}" ] ; then
rm -f /boot/uboot/boot/uEnv.txt || true
echo "uname_r=$(uname -r)" > ${wfile}
else
touch /boot/uboot/boot/trampoline.uboot
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
fi
else
touch /boot/uboot/boot/trampoline.uboot
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
fi
if [ -f /boot/uboot/uInitrd ] ; then
cp /boot/uboot/uInitrd /boot/uboot/boot/uInitrd
fi
fi
echo "uname_r=$(uname -r)" > ${wfile}
echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> ${wfile}
if [ ! "x${dtb}" = "x" ] ; then
echo "dtb=${dtb}" >> ${wfile}
@ -183,18 +197,4 @@ if [ ! "x${optargs}" = "x" ] ; then
fi
fi
#Setup trampoline for old u-boot's or bootdrive =/= rootdrive...
if [ -f /boot/uboot/boot/trampoline.uboot ] ; then
cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current
cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
if [ -f /boot/uboot/uImage ] ; then
cp /boot/uboot/uImage /boot/uboot/boot/uImage
fi
if [ -f /boot/uboot/uInitrd ] ; then
cp /boot/uboot/uInitrd /boot/uboot/boot/uInitrd
fi
fi
fi
#

@ -135,13 +135,27 @@ if [ "x${conf_smart_uboot}" = "xenable" ] ; then
rootdrive=$(echo ${FINAL_PART} | awk -F"p" '{print $1}' || true)
if [ "x${bootdrive}" = "x${rootdrive}" ] ; then
rm -f /boot/uboot/boot/uEnv.txt || true
echo "uname_r=$(uname -r)" > ${wfile}
else
touch /boot/uboot/boot/trampoline.uboot
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
fi
else
touch /boot/uboot/boot/trampoline.uboot
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
fi
if [ -f /boot/uboot/uInitrd ] ; then
cp /boot/uboot/uInitrd /boot/uboot/boot/uInitrd
fi
fi
echo "uname_r=$(uname -r)" > ${wfile}
echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> ${wfile}
if [ ! "x${dtb}" = "x" ] ; then
echo "dtb=${dtb}" >> ${wfile}
@ -153,18 +167,4 @@ if [ ! "x${optargs}" = "x" ] ; then
fi
fi
#Setup trampoline for old u-boot's or bootdrive =/= rootdrive...
if [ -f /boot/uboot/boot/trampoline.uboot ] ; then
cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current
cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
if [ -f /boot/uboot/uImage ] ; then
cp /boot/uboot/uImage /boot/uboot/boot/uImage
fi
if [ -f /boot/uboot/uInitrd ] ; then
cp /boot/uboot/uInitrd /boot/uboot/boot/uInitrd
fi
fi
fi
#

Loading…
Cancel
Save