After a month, the android system was successfully transplanted to emmc for startup.
Development Board: s5pv210
System: Android 2.34
Objective: To use emmc instead of NAND Flash
Run the fastboot sdfuse command.
Partition command: fdisk
Command in vfat format: fatformat
Ext3 format command: ext3format
--------------------------------------------------------------------------------
1: migrating emmc records to the Android system (1) -- making the SD card Startup Mode
2: porting emmc records to the Android system (2) -- U-Boot Mode for emmc file writing
Bytes ------------------------------------------------------------------------------------------------------------------------
If the file generated by Android is in ext3 format (how to generate it, please learn online, all I have to do is manually generate it), you should be able to start the system and basically port it successfully. However, Samsung's basic porting method is not suitable for the source code in my hand, and the test fails to start the system and stops running on
The/init file cannot be found after the root file system is mounted.
According to the analysis, the correct ramdisk partition address is not obtained by the kernel, so far the U-boot source code is analyzed.
Bytes --------------------------------------------------------------------------------------------------------------------
3: migrating emmc records to Android system (3) -- SD/MMC initialization Analysis
4: migrating emmc records to Android system (4) -- fdisk command Analysis
5: migrating emmc records to the Android system (5) -- fastboot command Analysis
6: migrating emmc records to Android system (6) -- Analysis of SD card burning and writing files
Bytes --------------------------------------------------------------------------------------------------------------------
U-boot can basically initialize emmc and SD, and can burn and write emmc through SD.
According to item 2, the android-compiled ext3 file cannot be successfully executed in the INIT process. The following error occurs:
Kernel panic-not syncing: No init found. Try passing init = option to kernel.
This problem has been stuck for a long time, and the analysis ramdisk is written into the emmc partition. The partitions mounted by the kernel do not include ramdisk partitions. Only fdisk partitions are available.
So the current practice is: do not separate the ramdisk file, integrate it with the system file into an ext3 file, burn it to the system partition, let the kernel mount, successfully executed
INIT process, and the Android system is started.
Principle: According to the init. RC Script file, ramdisk only mounts the system partition to the system under the ramdisk partition file. Therefore, all the system files are taken to the root/system directory.
Modify the init. RC Script file and generate the ext3 file.
Method:
1: Modify the init. RC file
[Java]
View plaincopyprint?
- On init
- Sysclktz 0
- Loglevel 3
- ... Change the File Execution permission under system/bin /.
- Chmod 777/system/bin /*
- ....
On initsysclktz 0 loglevel 3... change the File Execution permission under system/bin/chmod 777/system/bin /*....
On FS
# Mount MTD partitions
# Mount/system RW first to give the filesystem a chance to save a checkpoint
# Mount yaffs2 MTD @ system/system blocks mounting of system partitions.
# Mount yaffs2 MTD @ system/system Ro remount
Mount ext3/dev/block/mmcblk0p3/Data nosuid nodev
Mount ext3/dev/block/mmcblk0p4/cache nosuid nodev
# Mount ext4/dev/block/mmcblk0p3/Data nosuid nodev
# Mount ext4/dev/block/mmcblk0p4/cache nosuid nodev
Chown setprop and other commands should not be placed under the service, otherwise the system will prompt init: error message.
2: enter all the files in system to the root/system/file. Modify the execution permission of files in/root/system/bin.
3: Use the mkext3image root system. ext3 tool to generate the ext3 file.
4: Compile the kernel and support the ext3 file system. Regenerate zimage
5: Burn:
Fastboot mode:
1: Put the u-boot.bin zimage system. ext3 file into the fastboot tool directory
2: Use the movinand tool to firmware the u-boot.bin to SD, and then set the Board to start from SD card mode.
3: The Board is connected to USB and runs on PC --> cmd,
Cd e: \ fastboot \
E: \ fastboot \: fastboot flash bootloader u-boot.bin
Fastboot flash kernel zimage
Fastboot flash system. ext3
Sdfuse:
1: Put the u-boot.bin zimage system. ext3 file under the SD card sdfuse directory
2: Use the movinand tool to firmware the u-boot.bin to SD, and then set the Board to start from SD card mode.
3: Go to the command line:
Input #: sdfuse flash bootloader u-boot.bin
Sdfuse flash kernel zimage
Sdfuse flash system. ext3
6. Modify the startup parameters:
Set bootcmd "movi read kernel c0008000; bootm c0008000"
Set bootargs "console = ttysac2, 115200 noinitrd root =/dev/mmcblk0p2 RW init =/init"
The system partition is mmcblk0p2. RW: indicates that the system partition is readable and writable. You must add this partition. Otherwise, you cannot install software on the system.
7. Start the system and enter the Android system.
Fastboot tool download
Bytes -----------------------------------------------------------------------------------------------
Note: Because emmc interfaces are the same as SD interfaces, We can port the android File System to the SD card for Android to run on the SD card.
Method:
1: Use the winpm software to divide the SD card into three areas and reserve 10 MB space. The format is ext3, which is the system userdata cache partition.
2: Use the movinand tool to install the U-boot enabled SD card. Note: This U-boot cannot enable use_mmc0, but use_mmc2 can only be enabled.
That is, SD is supported, and emmc is not supported. Therefore, the nandflash card can be used on the Development Board. It won't work if it comes with emmc.
3: mount the system partition through the Ubuntu system, and test all the files under the root file into the system partition.
4: Set the start mode of the SD card for the Board, insert the SD card, change the bootargs parameter, and specify the root as the system partition device.
5: Enter the system.
The following error occurs:
Note: Your SD card is in write protection. So the device cannot be opened.
Mmcblk0: mmc0: AAAA su04g 3.69 gib (RO)
[2, 2.439190] mmcblk0: P1 P2 P3 P4
[2.479149] VFS: cannot open root device "mmcblk0p2" or unknown-block)
[2.484751] please append a correct "root =" Boot option; here are the available partitions:
[2.493070] 1f00 256 mtdblock0 (driver ?)
[2.497978] 1f01 5120 mtdblock1 (driver ?)
[2.502917] 1f02 5120 mtdblock2 (driver ?)
[2.507856] 1f03 3072 mtdblock3 (driver ?)
[2.512811] 1f04 112640 mtdblock4 (driver ?)
[2.517735] 1f05 81920 mtdblock5 (driver ?)
[2.522675] 1f06 839680 mtdblock6 (driver ?)
[2.527620] b3003872256 mmcblk0 DRIVER: mmcblk
[2.532829] b301 3256302 mmcblk0p1
[2.537059] b302 124806 mmcblk0p2
[2.541306] b303 359290 mmcblk0p3
[2.545552] b304 105896 mmcblk0p4
[2.549801] Kernel panic-not syncing: VFS: Unable to mount root FS on unknown-block (179,2)
Http://blog.csdn.net/yunfly163/article/details/7495035
Original article address