|
|
|
@ -55,18 +55,22 @@ rm -f /boot/uboot/initrd.net || true
|
|
|
|
|
rm -f /boot/uboot/boot.scr || true
|
|
|
|
|
rm -f /boot/uboot/uEnv.txt || true
|
|
|
|
|
|
|
|
|
|
if [ -f "/boot/uboot/backup/boot.scr" ] ; then
|
|
|
|
|
mv /boot/uboot/backup/boot.scr /boot/uboot/boot.scr
|
|
|
|
|
else
|
|
|
|
|
echo "WARN: [/boot/uboot/backup/boot.scr] was missing..." >> /var/log/netinstall.log
|
|
|
|
|
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
|
|
|
|
|
if [ -f "/boot/uboot/backup/boot.scr" ] ; then
|
|
|
|
|
mv /boot/uboot/backup/boot.scr /boot/uboot/boot.scr
|
|
|
|
|
else
|
|
|
|
|
echo "WARN: [/boot/uboot/backup/boot.scr] was missing..." >> /var/log/netinstall.log
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f "/boot/uboot/backup/normal.txt" ] ; then
|
|
|
|
|
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/backup/normal.txt
|
|
|
|
|
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/backup/normal.txt
|
|
|
|
|
mv /boot/uboot/backup/normal.txt /boot/uboot/uEnv.txt
|
|
|
|
|
else
|
|
|
|
|
echo "WARN: [/boot/uboot/backup/normal.txt] was missing..." >> /var/log/netinstall.log
|
|
|
|
|
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
|
|
|
|
|
if [ -f "/boot/uboot/backup/normal.txt" ] ; then
|
|
|
|
|
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/backup/normal.txt
|
|
|
|
|
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/backup/normal.txt
|
|
|
|
|
mv /boot/uboot/backup/normal.txt /boot/uboot/uEnv.txt
|
|
|
|
|
else
|
|
|
|
|
echo "WARN: [/boot/uboot/backup/normal.txt] was missing..." >> /var/log/netinstall.log
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "x${serial_tty}" != "x" ] ; then
|
|
|
|
@ -147,16 +151,18 @@ if [ -f /boot/uboot/linux-image-*arm*.deb ] ; then
|
|
|
|
|
rm -f /boot/uboot/linux-image-*arm*.deb || true
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /boot/vmlinuz-`uname -r` ] ; then
|
|
|
|
|
cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage
|
|
|
|
|
else
|
|
|
|
|
echo "ERROR: [/boot/vmlinuz-`uname -r`] missing" >> /var/log/netinstall.log
|
|
|
|
|
fi
|
|
|
|
|
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
|
|
|
|
|
if [ -f /boot/vmlinuz-`uname -r` ] ; then
|
|
|
|
|
cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage
|
|
|
|
|
else
|
|
|
|
|
echo "ERROR: [/boot/vmlinuz-`uname -r`] missing" >> /var/log/netinstall.log
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /boot/initrd.img-`uname -r` ] ; then
|
|
|
|
|
cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
|
|
|
|
|
else
|
|
|
|
|
echo "ERROR: [/boot/initrd.img-`uname -r`] missing" >> /var/log/netinstall.log
|
|
|
|
|
if [ -f /boot/initrd.img-`uname -r` ] ; then
|
|
|
|
|
cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
|
|
|
|
|
else
|
|
|
|
|
echo "ERROR: [/boot/initrd.img-`uname -r`] missing" >> /var/log/netinstall.log
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f /boot/uboot/vmlinuz- ] ; then
|
|
|
|
@ -173,14 +179,12 @@ fi
|
|
|
|
|
|
|
|
|
|
touch /boot/uboot/run_boot-scripts || true
|
|
|
|
|
|
|
|
|
|
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
|
|
|
|
|
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d /boot/initrd.img-`uname -r` /boot/uboot/uInitrd
|
|
|
|
|
if [ "${zreladdr}" ] ; then
|
|
|
|
|
mkimage -A arm -O linux -T kernel -C none -a ${zreladdr} -e ${zreladdr} -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage
|
|
|
|
|
fi
|
|
|
|
|
#else
|
|
|
|
|
# echo "ERROR: [/boot/uboot/linux-image-*.deb] missing" >> /var/log/netinstall.log
|
|
|
|
|
#fi
|
|
|
|
|
#
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "uname_r=$(uname -r)" > /boot/uEnv.txt
|
|
|
|
|
echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/uEnv.txt
|
|
|
|
@ -188,7 +192,13 @@ echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/
|
|
|
|
|
if [ "x${conf_smart_uboot}" = "xenable" ] ; then
|
|
|
|
|
rootdrive=$(echo ${FINAL_PART} | awk -F"p" '{print $1}' || true)
|
|
|
|
|
if [ "x${bootdrive}" = "x${rootdrive}" ] ; then
|
|
|
|
|
mv /boot/uboot/uEnv.txt /boot/uboot/disabled-uEnv.txt
|
|
|
|
|
rm -f /boot/uboot/boot/uEnv.txt || true
|
|
|
|
|
else
|
|
|
|
|
echo "uname_r=current" > /boot/uboot/boot/uEnv.txt
|
|
|
|
|
echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/uboot/boot/uEnv.txt
|
|
|
|
|
|
|
|
|
|
cp /boot/vmlinuz-`uname -r` /boot/uboot/boot/vmlinuz-current
|
|
|
|
|
cp /boot/initrd.img-`uname -r` /boot/uboot/boot/initrd.img-current
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|