注意的问题总结:
1.内核参数传递
内核中的参数是内核提供的,在配置内核时指定,而u-boot提供的则在u-boot启动时传递到内核取代内核提供的。u-boot的参数传递利用了三个通用寄存器R0,R1,R2。u-boot在启动的过程中把参数放到3个寄存器中,到内核启动时再把寄存器中的参数取出。一般我们需要通过u-boot/tools/目录下的mkimage制作uImage,使用bootm命令进行加载,注意go命令是不传递内核参数的。
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' //用于指定CPU类型,比如ARM
-O:set operating system to 'os' //用于指定操作系统,比如Linux
-T:set image type to 'type' //用于指定image类型,比如Kernel
-C:set compression type 'comp' //指定压缩类型
-a:set load address to 'addr' (hex) //指定image的载入地址
-e:set entry point to 'ep' (hex) //内核的入口地址,一般为image的载入地址+0x40(信息头的大小)
-n:set image nam