1、mkimage工具
直接运行mkimage得到一下信息:
mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
关于mkimage详解,可以参考制作uboot可引导的linux kernel工具mkimage详解
2、编写boot.script文件
if fatload mmc 0 80200000 uImage
then
echo ***** Kernel: /dev/mmcblk0p1/uImage *****
fi
echo ***** RootFS: /dev/mmcblk0p2 *****
setenv bootargs 'console=ttyS2,115200n8 androidboot.console=ttyS2 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=1 init=/init ip=off mpurate=1000 omap_vout.vid1_static_vrfb_alloc=y'
bootm 0x80200000
3、使用mkimage生成boot.scr
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Execute uImage.bin' -d boot.script boot.scr