flasher: look for more bootfile tars
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 18 May 2010 11:32:39 +0000 (14:32 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 29 May 2010 13:01:01 +0000 (16:01 +0300)
flasher/doit.sh
flasher/rootfs/etc/updater.sh

index a45cc95..e73b7e8 100755 (executable)
@@ -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 ..
index 67dcc42..26dcd36 100755 (executable)
@@ -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