一、系統啟動流程
bootloader(uboot)——linux Kernel(uImage)——Rootfs(Init)——Application
二、啟動環境配置
uboot環境變量:printenv setenv saveenv tftpboot nand read/write baudrate 115200 bootdelay bootcmd bootargs...
內核啟動參數:bootargs ' <name>=<value> ...'
bootargs root=/dev/nfs nfsroot=10.66.10.10:home/binge/rootfs ip=10.66.10.12 init=/linuxrc console=ttySAC0,115200
root: 指定根文件系統的路徑
nfsroot: 指定nfs根文件系統的網絡位置(ip+路徑)
ip: 開發板的ip地址
init: 掛載根文件系統成功后,開發板執行的第一個程序
console: 內核啟動時,使用哪個設備作為控制台
mem: 限制linux使用的內存大小
若根文件系統在flash上面,則還要指定:
根文件系統鏡像的格式 :rootfstype 如rootfstype=jffs2/yaffs2/squashfs/ubifs......
flash上的分區:mtdparts 格式:mtdparts=mtd-id:<size1>@<offset1>(<name1>),<size2>@<offset2>(<name2>)
如:mtdparts=s5pv210-nand:1M(boot),5M(kernel),80M(rootfs),426M(userfs) 則root=/dev/mtdblock2
注:要想這個參數起作用,內核中的mtd驅動必須支持,即內核配置時需選上 Device Drivers ——>Memory Technology Device(MTD)support——>command line partition table.....