UBOOT 启动参数: bootargs 和 bootcmd

bootargs

bootargs=console=ttyS0,115200 ubi.mtd=UBI,2048 root=ubi:rootfs ro rootfstype=ubifs init=/linuxrc rootwait=1 LX_MEM=0x7f00000 mma_heap=mma_heap_name0,miu=0,sz=0x3400000 mma_memblock_remove=1 highres=off mmap_reserved=fb,miu=0,sz=0x300000,max_start_off=0x7C00000,max_end_off=0x7F00000 mtdparts=nand0:384k@1280k(IPL0),384k(IPL1),384k(IPL_CUST0),384k(IPL_CUST1),768k(UBOOT0),768k(UBOOT1),256k(ENV),256k(ENV1),0x20000(KEY_CUST),0x60000(LOGO),0x500000(KERNEL),0x500000(RECOVERY),0x1600000(rootfs_bak),-(UBI)

bootargs=console=ttyS0,115200 ubi.mtd=UBI,2048 root=ubi:rootfs ro rootfstype=ubifs init=/linuxrc rootwait=1 LX_MEM=0x7f00000 mma_heap=mma_heap_name0,miu=0,sz=0x3400000 mma_memblock_remove=1 highres=off mmap_reserved=fb,miu=0,sz=0x300000,max_start_off=0x7C00000,max_end_off=0x7F00000 mtdparts=nand0:384k@1280k(IPL0),384k(IPL1),384k(IPL_CUST0),384k(IPL_CUST1),768k(UBOOT0),768k(UBOOT1),256k(ENV),256k(ENV1),0x20000(KEY_CUST),0x60000(LOGO),0x500000(KERNEL),0x500000(RECOVERY),0x1600000(rootfs_bak),-(UBI)
 

bootcmd

例子:

bootcmd=gpio out 4 1; gpio out 6 1; gpio out 7 0; bootlogo 0 0 0 0 1; mw 1f001cc0 11; gpio out 8 0; gpio out 1 1; gpio out 15 0; nand read.e 0x22000000 KERNEL 0x500000; gpio out 8 1; gpio out 15 1; bootm 0x22000000;nand read.e 0x22000000 RECOVERY 0x500000; bootm 0x22000000

bootcmd=gpio out 4 1; gpio out 6 1; gpio out 7 0; bootlogo 0 0 0 0 1; mw 1f001cc0 11; gpio out 8 0; gpio out 1 1; gpio out 15 0; nand read.e 0x22000000 KERNEL 0x500000; gpio out 8 1; gpio out 15 1; bootm 0x22000000;nand read.e 0x22000000 RECOVERY 0x500000; bootm 0x22000000

1. 每一条命令使用; 分割

2. 依次执行每一条命令

命令解释:

gpio out 4 1                 -- gpio4 设置高电平

bootlogo 0 0 0 0 1       -- 执行bootlogo

mw 1f001cc0 11          --"这里是针对2.4G 的wifi 设置命令"

着重解释一下面的操作命令:

nand read.e 0x22000000 KERNEL 0x500000; gpio out 8 1; gpio out 15 1; bootm 0x22000000;nand read.e 0x22000000 RECOVERY 0x500000; bootm 0x22000000

nand read.e 0x22000000 KERNEL 0x500000 ;  bootm 0x22000000 -- 从KERNEL 分区中读取内核到RAM 0x22000000 地址,然后执行启动内核(bootm), 正常情况,bootcmd 到此结束。

当KERNEL分区异常,无法启动内核,则执行下面操作

nand read.e 0x22000000 RECOVERY 0x500000; bootm 0x22000000 -- 从 RECOVERY读取分区到RAM 0x22000000 地址, 然后执行内核。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值