To run Android, you must not only compile the kernel correctly, but also install the root file system correctly. The first step is to extract data from the data directory of the simulator. Maybe you will ask, why is it extracted from the simulator? This is the most convenient method. You do not need to create a directory or file on your own. Run the simulator on a terminal and the android system runs normally. Then open a terminal and run adb on the terminal to obtain the simulator file. The following command is used:
Adb pull/data/nfsboot/data
In this way, the data and system directories can be downloaded from the simulator to the local directory.
Step 2: copy the data directory from the simulator to the directory compiled by android:
Android-2.0/out/target/product/generic/root directory, and overwrite the same directory.
Step 3: Copy all the files in the Android-2.0/out/target/product/generic/system directory to the directory:
Android-2.0/out/target/product/generic/root/system directory.
Step 4: Modify the init. rc file under the Android-2.0/out/target/product/generic/root/directory and comment out the following sentence:
Mount rootfs/ro remount
Mount yaffs2 mtd @ system/system
Mount yaffs2 mtd @ system/system ro remount
Mount yaffs2 mtd @ userdata/data nosuid nodev
Mount yaffs2 mtd @ cache/cache nosuid nodev
Because my system does not use the yaffs2 file system, comment out these annotations.
At this point, the content under root is a complete and available android root file system. The Development Board can be loaded through nfs, but you need to set this directory to the 777 permission attribute, otherwise, the startup will fail.
To burn the root file system to the Development Board, You need to package the root file system and run the following command on the terminal:
Tar-zcvf android.tar.gz *
In this case, you have to go to the android.tar.gz file, and you can press the previous method to solidify it into flash.