1. ramdisk. the imgfile gzip is compressed, so use the gunzip command to decompress it. but gunzip extension .gz can be decompressed normally, otherwise it will be ignored. (source file type) ramdisk. img: gzip compressed data, from Unix 2. after the name is removed, the suffix .gz is automatically removed and renamed as ramdisk. img. The file type is ramdisk. img: ASCII cpio archive (SVR4 with no CRC) 3. at this time, you can use the cpio command from ramdisk. img decompress the file with the file system. Therefore, we recommend that you create a new directory for mkdir aaa to enter the directory cpio-I-F .. /ramdisk. imgOK. After decompression, you can customize your file system and init. rc: you can change it. 4. after the customization, we began to repackage cpio-I-t-F .. /r Amdisk. img> listcpio-o-H newc-O new. img <list is ready, and a new ramdisk is packaged. img. The name is new. img, but it cannot run directly at this time. Why? Let's look at the file type. new. img: ASCII cpio archive (SVR4 with no CRC) and ramdisk after decompression. img is the same, so it is still a step away at this time, that is, use gzip to compress gzip new.imgto to create a. file named new.img.gz: gzip compressed data, was "new. img ", from Unix, last modified: Mon Dec 24 10:59:51 2012 and rename it ramdisk. imgmv new.img.gz ramdisk. img 5. okay. If you have a board, re-burn ramdisk. imgfile. You can also run the simulator without a board. emulator-ramdisk. /ramdisk. img-system. /system. img-data. /userdata. img-sdcard (Optional). Sort out the command cp ramdisk. img ramdisk.img.gz gunzip ramdisk.img.gz mkdir aaacd aaacpio-I-F .. /ramdisk. img (after decompression, customize your own root file system) cpio-I-t-F .. /ramdisk. img> listcpio-o-H newc-O new. img <listgzip new. imgmv new.img.gz ramdisk. imgcp ramdisk. img .. /ramdisk. img (overwrite the original ramdisk, optional) emulator-ramdisk. /ramdisk. img-system. /system. img-data. /userdata. img