zipfile="pandora_flasher_v.zip"
if test '!' '(' -d $rd_input -a -f ${sysf_in}x-load.bin.ift -a -f ${sysf_in}u-boot.bin \
- -a -f ${sysf_in}uImage -a -f ${sysf_in}uImage_updater ')'
+ -a -f ${sysf_in}uImage -a -f ${sysf_in}uImage_updater -a -f ${sysf_in}bootmenu.txt ')'
then
echo "missing input files"
exit 1
# bootf.tgz
cd $sysf_in
-tar czvf $bootf u-boot.bin uImage
+bootf_files=`echo u-boot.bin uImage uImage-* bootmenu.txt`
+test -e autoboot.txt && bootf_files="$bootf_files autoboot.txt"
+tar czvf $bootf $bootf_files
cd ..
mv -f ${sysf_in}${bootf} ${out_dir}
fi
}
-wait_for_file()
-{
- for a in `seq 10`
- do
- if test -e "$1"
- then
- return 0
- fi
- sleep .5
- done
- return 1
-}
-
mkdir /mnt/ubifs 2> /dev/null || true
return 0
fi
- # presence of uImage* is a sign that we can wipe whole boot partition,
- # but first get rid of potentially bad autoboot.txt
- rm -f /mnt/ubifs/autoboot.txt
-
for kernel in $kernels
do
if ! cmp $kernel /mnt/ubifs/$kernel 2> /dev/null
cp -a bootmenu.txt /mnt/ubifs/bootmenu.txt || return 1
fi
fi
+ if [ -e autoboot.txt ]
+ then
+ if ! cmp autoboot.txt /mnt/ubifs/autoboot.txt 2> /dev/null
+ then
+ log "updating autoboot.txt"
+ cp -a autoboot.txt /mnt/ubifs/autoboot.txt || return 1
+ fi
+ else
+ # get rid of potentially bad autoboot.txt
+ rm -f /mnt/ubifs/autoboot.txt
+ fi
}
ubiattach /dev/ubi_ctrl -m 3 || true