RK3576 Android平台SD启动
要求
- 1,Android14及以上版本;
- 2,SD卡制作工具:瑞芯微创建升级磁盘工具V1.78及以上版本;
- 3,SD卡容量8G-32G之间;
软件修改
- 1,Android部分
修改PRODUCT_BOOT_DEVICE,增加sdmmc的节点,并删除SD卡挂在的配置
@sys2206:~/b1_Android14_29_aosp/device/rockchip/rk3576$ git diff
diff --git a/BoardConfig.mk b/BoardConfig.mk
index b78d7ac..89abf8b 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
#BOARD_AVB_ENABLE := true
# used for fstab_generator, sdmmc controller address
-PRODUCT_BOOT_DEVICE := 2a2d0000.ufs,2a330000.mmc
-PRODUCT_SDMMC_DEVICE := 2a310000.mmc
+PRODUCT_BOOT_DEVICE := 2a2d0000.ufs,2a330000.mmc,2a310000.mmc
+#PRODUCT_SDMMC_DEVICE := 2a310000.mmc
SF_PRIMARY_DISPLAY_ORIENTATION := 0
- 2,kernel部分
在产品的dts中的sdmmc节点增加supports-emmc字段
@sys2206:~/b1_Android14_29_aosp/kernel-6.1$ git diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-evb1.dtsi b/arch/arm64/boot/dts/rockchip/rk3576-evb1.dtsi
index 323e628adf7d..10212ccf6f43 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-evb1.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576-evb1.dtsi
@@ -535,6 +535,7 @@ &sdio {
};
&sdmmc {
+ supports-emmc;
status = "okay";
};
编译
按上面修改后完整编译update.img固件
制作SD卡启动卡
使用瑞芯微创建升级磁盘工具V1.78,选择 SD启动,然后按工具提示步骤操作即可
注意事项
SD启动时板子emmc或者ufs等存储设备需要把固件擦除掉,处于空片状态,否则会导致SD卡启动失败。