From 32f066737291a51d84899fe1e0e2f39c38d018bb Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Tue, 18 May 2010 14:32:39 +0300 Subject: [PATCH] flasher: look for more bootfile tars --- flasher/doit.sh | 13 +++++++------ flasher/rootfs/etc/updater.sh | 12 ++++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/flasher/doit.sh b/flasher/doit.sh index a45cc95..e73b7e8 100755 --- a/flasher/doit.sh +++ b/flasher/doit.sh @@ -9,11 +9,13 @@ out_dir="out/" out_opt_dir="out_opt/" sysf_in="in/" rd_input="rootfs" +bootf="bootf.tgz" rdfile=`mktemp` rdfile_out="tmp/rd-ext2.bin" boot_scr_tmp=`mktemp` boot_scr_tmp2=`mktemp` boot_scr_tmp_scr=`mktemp` +mkimage="tmp/mkimage" 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 \ @@ -32,11 +34,11 @@ cp ${sysf_in}x-load.bin.ift ${out_opt_dir}MLO cp ${sysf_in}u-boot.bin_updater ${out_opt_dir}u-boot.bin -# sysf.tgz +# bootf.tgz cd $sysf_in -tar czvf sysf.tgz u-boot.bin uImage +tar czvf $bootf u-boot.bin uImage cd .. -mv -f ${sysf_in}sysf.tgz ${out_dir} +mv -f ${sysf_in}${bootf} ${out_dir} # rootfs @@ -63,13 +65,12 @@ dd if=${sysf_in}uImage_updater of=$boot_scr_tmp conv=notrunc bs=4K seek=32 # 321000 - end: ramdisk cat $boot_scr_tmp $rdfile_out > $boot_scr_tmp2 # adjust for u-boot header -#dd if=$boot_scr_tmp2 of=$boot_scr_tmp bs=72 skip=1 -tmp/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "script" \ +$mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "script" \ -d $boot_scr_tmp_scr:$boot_scr_tmp2 ${out_dir}boot.scr rm $boot_scr_tmp $boot_scr_tmp2 $boot_scr_tmp_scr # release zip cd ${out_dir} -zip -9 $zipfile sysf.tgz boot.scr +zip -9 $zipfile $bootf boot.scr mv -f $zipfile ../tmp/ cd .. diff --git a/flasher/rootfs/etc/updater.sh b/flasher/rootfs/etc/updater.sh index 67dcc42..26dcd36 100755 --- a/flasher/rootfs/etc/updater.sh +++ b/flasher/rootfs/etc/updater.sh @@ -23,6 +23,7 @@ then fi mdevs="/dev/mmcblk0p1 /dev/mmcblk0p2" +bootfiles="bootf.tgz bootfiles.tar.gz uimage.tar.gz" cd /tmp @@ -36,10 +37,13 @@ do continue; fi - if [ -e $mpoint/sysf.tgz ] - then - tar xzvf $mpoint/sysf.tgz - fi + for bf in $bootfiles + do + if [ -e $mpoint/$bf ] + then + tar xzvf $mpoint/$bf + fi + done if [ -x $mpoint/finalize.sh ] then -- 2.39.2