mk802 -- boot.scr

U-boot for Allwinner explained

The boot.scr file is basically a file consisting of u-boot commands and can be used to change the default parameters.

root@slitaz:/tmp# dd bs=1 skip=72 if=/tmp/boot.scr of=/tmp/boot.script
772+0 records in
772+0 records out

root@slitaz:/tmp# cat boot.script
setenv boot.scr 'if fatload mmc 0 0x44000000 boot.scr || ext2load mmc 0 0x44000000 boot.scr || ext2load mmc 0 0x44000000 boot/boot.scr; then source 0x44000000; fi; true'
setenv boot_mmc 'fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x48000000 ${kernel}; if fatload mmc 0 0x43100000 uInitrd; then bootm 0x48000000 0x43100000; else bootm 0x48000000; fi'
setenv bootcmd 'run boot.scr setargs boot_mmc'
setenv bootdelay '3'
setenv console 'ttyS0,115200'
setenv extraargs 'rootwait mem=928M'
setenv kernel 'uImage'
setenv loglevel '8'
setenv panicarg 'panic=10'
setenv root '/dev/mmcblk0p2'
setenv setargs 'setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}'
setenv stderr 'serial'
setenv stdin 'serial'
setenv stdout 'serial'

root@slitaz:/tmp# mkimage -A arm -T script -C none -n "Run uImage" -d /tmp/boot.script  /tmp/boot.scr
Image Name:   Run uImage
Created:      Wed Oct  3 23:34:06 2012
Image Type:   ARM Linux Script (uncompressed)
Data Size:    780 Bytes = 0.76 kB = 0.00 MB
Load Address: 00000000
Entry Point:  00000000
   Image 0: 772 Bytes = 0.75 kB = 0.00 MB