bpi_r3_mini:emmc
Table of Contents
刷写OpenWrt到eMMC
1. 准备
从NAND启动路由器
2. 刷写系统
2.1 上传固件
将所有固件上传到/tmp
目录
2.2 刷入GPT分区表
GPT_BIN=$(ls /tmp/|grep 'emmc-gpt') dd if=/tmp/${GPT_BIN} of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync
2.3 刷入preloader
echo 0 > /sys/block/mmcblk0boot0/force_ro # 4MiB preloader dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8192 conv=fsync RRE_LOAD=$(ls /tmp/|grep 'emmc-preloader') dd if=/tmp/${RRE_LOAD} of=/dev/mmcblk0boot0 bs=512 conv=fsync
2.4 刷入uboot
dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=13312 count=8192 conv=fsync UBOOT=$(ls /tmp/|grep 'emmc-bl31-uboot') dd if=/tmp/${UBOOT} of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync
2.5 刷入sysupgrade
SYSUPGRADE=$(ls /tmp/|grep 'sysupgrade') dd if=/tmp/${SYSUPGRADE} of=/dev/mmcblk0p5 bs=512 conv=fsync
2.6 刷入recovery(不建议)
刷入之后重启会自动进入恢复模式
RECOVERY=$(ls /tmp/|grep 'recovery') dd if=/tmp/${RECOVERY} of=/dev/mmcblk0p4 bs=512 conv=fsync
3. 附官方emmc镜像刷写方法
echo 0 > /sys/block/mmcblk0boot0/force_ro BL2_EMMC=$(ls /tmp/|grep 'bl2_emmc') dd if=/tmp/${BL2_EMMC} of=/dev/mmcblk0boot0
EMMC_BIN=$(ls /tmp/|grep 'mtk-bpi'|grep 'EMMC') dd if=/tmp/${EMMC_BIN} of=/dev/mmcblk0
4. 参考文献
bpi_r3_mini/emmc.txt · Last modified: 2024/01/15 04:48 by sandro