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 地址, 然后执行内核。

相关推荐
Nerd Nirvana3 小时前
软考—系统架构设计(案例 | 论文)
linux·系统架构·软件工程·软考·计算机基础
勤奋的凯尔森同学4 小时前
webmin配置终端显示样式,模仿UbuntuDesktop终端
linux·运维·服务器·ubuntu·webmin
打不了嗝 ᥬ᭄8 小时前
Linux的权限
linux
落幕8 小时前
C语言-进程
linux·运维·服务器
深度Linux9 小时前
C++程序员内功修炼——Linux C/C++编程技术汇总
linux·项目实战·c/c++
风静如云10 小时前
OpenBMC:BmcWeb定义service
linux
leoufung10 小时前
VIM FZF 安裝和使用
linux·编辑器·vim
bugtraq202111 小时前
XiaoMi Mi5(gemini) 刷入Ubuntu Touch 16.04——安卓手机刷入Linux
linux·运维·ubuntu
CodeWithMe12 小时前
[ Vim ] 常用命令 and 配置
linux·编辑器·vim
DC_BLOG12 小时前
Linux-GlusterFS进阶分布式卷
linux·运维·服务器·分布式