解压步骤如下:# ls
ramdisk-u.img
/*查看文件的格式*/
# file ramdisk-u.img
ramdisk-u.img: u-boot legacy uImage, ramdisk, Linux/ARM, RAMDisk Image (Not compressed), 1010258 bytes, Tue Aug 12 13:45:24 2014, Load Address: 0x40800000, Entry Point: 0x40800000, Header CRC: 0x4075F620, Data CRC: 0x9C0307BF
/*去掉uboot头的64个字节*/# dd if=ramdisk-u.img of=ramdisk.img.gz bs=1 skip=64
1010258+0 records in
1010258+0 records out
1010258 bytes (1.0 MB) copied, 1.36593 s, 740 kB/s
# ls
ramdisk.img.gz ramdisk-u.img
/*再次查看生成文件的格式,已经变成gzip压缩格式*/# file ramdisk.img.gz
ramdisk.img.gz: gzip compressed data, from Unix, last modified: Tue Aug 12 13:45:24 2014
/*解压gzip格式压缩文件*/# gunzip ramdisk.img.gz
# ls
ramdisk.img ramdisk-u.img
/*再次查看文件格式,已经变成cpio归档文件格式*/# file ramdisk.img
ramdisk.img: ASCII cpio archive (SVR4 with no CRC)
/*重新创建一个新的目录存放解压后的ramdisk*/# mkdir rfs
# cd rfs/
/*解压cpio格式的image*/
# cpio -i -F ../ramdisk.img
3758 blocks
# ls
bin dev etc init linuxrc proc r sbin sdcard usr
#
阅读(5851) | 评论(1) | 转发(0) |