Uboot从各种存储设备上(sd、mmc、nand、nor)加载内核命令

load zImage, dtb, and rootfs to RAM

set bootargs for linux

bootz zImage_addr rootfs_addr dtb_addr, if don't need rootfs, please put "-"

boot from emmc(ext4 format), emmc partition 2 exist rootfs.

The U-Boot Documentation — Das U-Boot unknown version documentation
uboot > mmc rescan;
uboot > ext4load mmc 0:2 0x10000000 /boot/zImage;
uboot > ext4load mmc 0:2 0x11000000 /boot/uboot-board-C.dtb
uboot > setenv bootargs "console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw" 
uboot > bootz 0x10000000 - 0x11000000

boot from SD card (fat32 format), the rootfs isn't exist.
uboot > mmc rescan; 
uboot > fatload mmc 0 0x10000000 zImage;
uboot > fatload mmc 0 0x11000000 uboot-board-C.dtb
uboot > fatload mmc 0 0x12000000 u-rootfs
uboot > setenv bootargs "console=ttyPS0,115200 earlyprintk " 
uboot > bootz 0x10000000 0x12000000 0x11000000

boot from qspi, the rootfs isn't exist.
uboot > sf probe
uboot > sf read 0x10000000 <zImage_addr> <zImage_size>
uboot > sf read 0x11000000 <dtb_addr> <dtb_size>
uboot > sf read 0x12000000 <rootfs_addr> <rootfs_size>
uboot > bootz 0x10000000 0x12000000 0x11000000

boot from nand flash, the rootfs isn't exist.
uboot > nand read 0x10000000 <zImage_addr> <zImage_size>
uboot > nand read 0x11000000 <dtb_addr> <dtb_size>
uboot > nand read 0x12000000 <rootfs_addr> <rootfs_size>
uboot > bootz 0x10000000 0x12000000 0x11000000

boot from nor flash, the rootfs isn't exist.
uboot > cp.b <zImage_addr> 0x10000000 <zImage_size>
uboot > cp.b <dtb_addr> 0x11000000 <dtb_size>
uboot > cp.b <rootfs_addr> 0x12000000 <rootfs_size>
uboot > bootz 0x10000000 0x12000000 0x11000000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值