eMMC mmcblk0boot0

mmcblk0boot0 is a hardware-defined partition in the eMMC distinct from the mmcblk0pN partitions that are defined by the MBR partition table in the “user area”. U-Boot (if you’re using a version that supports it) could be configured to to access the environment from mmcblk0boot0 instead of the mmcblk0 “user area” by defining #define CONFIG_SYS_MMC_ENV_PART 1 You will also have to define CONFIG_ENV_OFFSET to skip over the u-boot.bin image

mmcblk0boot is a (special) partition itself, so you should not create partitions there. Instead, create partitions on /dev/mmcblk0. These partitions should show up as /dev/mmcblk0p1, /dev/mmblk0p2, etc.

To boot in emmc mode place u-boot on one of the boot partitions and enable the correct boot partition for boot via sysfs.

烧写boot.img到mmcblk0boot0分区

echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=boot.img of=/dev/mmcblk0boot0
echo 1 > /sys/block/mmcblk0boot0/force_ro

Then boot partition (here 0) must be activated e.g. like this:
echo 8 > /sys/devices/platform/sdhci-esdhc-imx.1/mmc_host/mmc0/mmc0:0001/boot_config
Then set the fuses/gpio for emmc boot.

分别烧写u-boot.imx和环境变量到mmcblk0boot0分区

echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=u-boot.imx of=/dev/mmcblk0boot0 seek=2
dd if=env.img of=/dev/mmcblk0boot0 seek=4079
echo 1 > /sys/block/mmcblk0boot0/force_ro

参考文章

Copy U-Boot + U-Boot vars using dd

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

luckywang1103

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值