no reason to have two extra folders cus/debug, unify on backup

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

@ -1,6 +1,6 @@
Easy:
* cleanup firmware mess, just copy needed firmware from the mainline git tree
* debug.log, to help troubleshoot failures (do we need anything else /boot/uboot/debug/* after install)
* debug.log, to help troubleshoot failures (do we need anything else /boot/uboot/backup/* after install)
* random http link to *.deb package (--deb-file just needs to be extended to http case, as it works for local files)
More Effort:

@ -1147,12 +1147,11 @@ function populate_boot {
if mount -t vfat ${MMC}${PARTITION_PREFIX}1 ${TEMPDIR}/disk; then
mkdir -p ${TEMPDIR}/disk/cus
mkdir -p ${TEMPDIR}/disk/debug
mkdir -p ${TEMPDIR}/disk/backup
if [ "${SPL_BOOT}" ] ; then
if [ -f ${TEMPDIR}/dl/${MLO} ]; then
cp -v ${TEMPDIR}/dl/${MLO} ${TEMPDIR}/disk/MLO
cp -v ${TEMPDIR}/dl/${MLO} ${TEMPDIR}/disk/cus/MLO
cp -v ${TEMPDIR}/dl/${MLO} ${TEMPDIR}/disk/backup/MLO
fi
fi
@ -1160,10 +1159,10 @@ function populate_boot {
if [ -f ${TEMPDIR}/dl/${UBOOT} ]; then
if echo ${UBOOT} | grep img > /dev/null 2>&1;then
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/u-boot.img
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/cus/u-boot.img
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/backup/u-boot.img
else
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/u-boot.bin
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/cus/u-boot.bin
cp -v ${TEMPDIR}/dl/${UBOOT} ${TEMPDIR}/disk/backup/u-boot.bin
fi
fi
fi
@ -1197,7 +1196,7 @@ function populate_boot {
cat ${TEMPDIR}/bootscripts/netinstall.cmd
echo "-----------------------------"
echo "Normal Boot Script:"
cp -v ${TEMPDIR}/bootscripts/normal.cmd ${TEMPDIR}/disk/cus/normal.txt
cp -v ${TEMPDIR}/bootscripts/normal.cmd ${TEMPDIR}/disk/backup/normal.txt
echo "-----------------------------"
cat ${TEMPDIR}/bootscripts/normal.cmd
echo "-----------------------------"

@ -6,7 +6,7 @@ if [ -f /etc/mtab ] ; then
FINAL_FSTYPE=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $5}')
else
#Currently only Maverick, but log if something else does it..
touch /boot/uboot/debug/no_mtab
touch /boot/uboot/backup/no_mtab
FINAL_PART=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $1}')
FINAL_FSTYPE=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $3}')
fi
@ -21,10 +21,10 @@ 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/cus/normal.txt" ] ; then
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/cus/normal.txt
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/cus/normal.txt
mv /boot/uboot/cus/normal.txt /boot/uboot/uEnv.txt
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
fi
#Install Correct Kernel Image:
@ -39,5 +39,5 @@ cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
#Debug:
mount > /boot/uboot/debug/mount.log
mount > /boot/uboot/backup/mount.log

@ -30,10 +30,10 @@ index 0000000..6d06fc7
+
+ mount -o bind /sys /target/sys
+ cat /proc/mounts > /target/mounts
+ cat /proc/mounts > /target/boot/uboot/debug/proc_mounts
+ cat /proc/mounts > /target/boot/uboot/backup/proc_mounts
+ chroot /target /bin/bash /etc/finish-install.sh
+ rm -f /target/mounts || true
+ cat /var/log/syslog > /target/boot/uboot/debug/syslog.log
+ cat /var/log/syslog > /target/boot/uboot/backup/syslog.log
+ umount /target/sys
+
+ sync

@ -6,7 +6,7 @@ if [ -f /etc/mtab ] ; then
FINAL_FSTYPE=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $5}')
else
#Currently only Maverick, but log if something else does it..
touch /boot/uboot/debug/no_mtab
touch /boot/uboot/backup/no_mtab
FINAL_PART=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $1}')
FINAL_FSTYPE=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $3}')
fi
@ -33,8 +33,8 @@ rm -f /boot/uboot/uEnv.txt.bak || true
rm -f /boot/uboot/MLO || true
rm -f /boot/uboot/MLO.bak || true
if [ -f /boot/uboot/cus/MLO ] ; then
mv /boot/uboot/cus/MLO /boot/uboot/MLO
if [ -f /boot/uboot/backup/MLO ] ; then
mv /boot/uboot/backup/MLO /boot/uboot/MLO
fi
#Restore, backup u-boot Bootloader?
@ -43,18 +43,18 @@ rm -f /boot/uboot/u-boot.bin.bak || true
rm -f /boot/uboot/u-boot.img || true
rm -f /boot/uboot/u-boot.img.bak || true
if [ -f /boot/uboot/cus/u-boot.img ] ; then
mv /boot/uboot/cus/u-boot.img /boot/uboot/u-boot.img
if [ -f /boot/uboot/backup/u-boot.img ] ; then
mv /boot/uboot/backup/u-boot.img /boot/uboot/u-boot.img
fi
if [ -f /boot/uboot/cus/u-boot.bin ] ; then
mv /boot/uboot/cus/u-boot.bin /boot/uboot/u-boot.bin
if [ -f /boot/uboot/backup/u-boot.bin ] ; then
mv /boot/uboot/backup/u-boot.bin /boot/uboot/u-boot.bin
fi
if [ -f "/boot/uboot/cus/normal.txt" ] ; then
sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/cus/normal.txt
sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/cus/normal.txt
mv /boot/uboot/cus/normal.txt /boot/uboot/uEnv.txt
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
fi
#Cleanup: some of Ubuntu's packages:
@ -77,5 +77,5 @@ cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img
rm -f /boot/uboot/linux-image-*_1.0*_arm*.deb || true
#Debug:
mount > /boot/uboot/debug/mount.log
mount > /boot/uboot/backup/mount.log

@ -27,10 +27,10 @@ index 0000000..6d06fc7
+
+ mount -o bind /sys /target/sys
+ cat /proc/mounts > /target/mounts
+ cat /proc/mounts > /target/boot/uboot/debug/proc_mounts
+ cat /proc/mounts > /target/boot/uboot/backup/proc_mounts
+ chroot /target /bin/bash /etc/finish-install.sh
+ rm -f /target/mounts || true
+ cat /var/log/syslog > /target/boot/uboot/debug/syslog.log
+ cat /var/log/syslog > /target/boot/uboot/backup/syslog.log
+ umount /target/sys
+
+ sync

Loading…
Cancel
Save