瑞芯微Rockchip开发者社区
直播中

王敏

7年用户 1441经验值
私信 关注
[问答]

怎样才能在SDCARD中运行Android系统呢

怎样才能在SDCARD中运行Android系统呢?
怎样使用rknand.ko在Android上MBR中定义的mount分区?

回帖(1)

王秀兰

2022-2-18 09:51:01
按照RK官方做法就可以实现,但是我也是遇到了不少的问题,所以记录一下。


1.必须使用./mkimage ota生成的固件,即boot.img中包含kernel。


2.Bootloader使用1.28版本,低了不行。


3.Parameter使用自带的,如果修改过且修改的不恰当会造成SD_Fireware_Tool出现:问题事件名称: BEX,就会使得失败。


4.内核中要禁用CONFIG_SDMMC0_RK29。


5.Android4.2.2会有SDIO WiFi不能使用的问题 见《》。


6.注意事项:去掉SDCARD驱动后,如果做成「SDCARD升级」会进入PCBA测试。


7.SDCARD剩下的FAT32分区会挂载到/mnt/internal_sd而不是以前的/mnt/external_sd。因为这个时候是parameter分区了,不再是一个独立的SDCard了。





        原理深入,从SDCARD启动使用的是rknand.ko来实现从SDCARD中挂载文件系统。而没有对SDCARD剩下的FAT32分区做处理。如果不使用rknand.ko的话,那么可以将partition信息写到SDCARD的BRM分区。





另外关于rknand.ko:


[16:44] rknand.ko can be used for eMMC to mount file systems on eMMC
[16:45] err
[16:45] rknand.ko can be used to mount file systems on eMMC when booting from eMMC
[16:45] rknand.ko can be used to mount file systems on SD when booting from SD
[16:45] rknand.ko can be used to mount file systems on NAND when booting from NAND
[16:46] mmc driver can be used to mount file systems on eMMC when booting from eMMC
[16:46] mmc driver can be used to mount file systems on SD when booting from SD but it seems "support partition in parameter" is missing
[16:49] mmc driver can be used to mount file systems on SD when booting from NAND but not booting from eMMC/SD[16:50] rknand.ko cannot be used to mount file systems on NAND when booting from SD/eMMC because it tries to act as SD/eMMC driver and break mmc driver

Tony_: please keep in mind that most of my knowledge is "guessing" with trial & error ;)





1. you/your system can mount "user" partition defined in parameter when booting SD card as same as eMMC


2. rknand.ko shouldn't detect partitions defined in MBR


3. PC will detect partitions defined in MBR


4. btw any storage driver does NOT mount file system, it just provides block device. user can format block device and can request block device to mount as file system








1.mount partition defined in MBR on Android with rknand.ko?


2.or mount partition defined in partition on PC?


3.for former, you can add another partition or modify "user" partition which point same area as fat32 partition in MBR


4.for later, you can modify fat32 partition in MBR which point same are as "user" partition in parameter


5.don't forget 0x2000 sectors offset











For booting from sdcard, the fat32 partition of SDCARD is just partition of parameter.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分