cpio decompression and compression from buildroot

1k views Asked by At

I am successfully able to create and boot a little OS generated from buildroot on my embedded system. Buildroot generates a cpio. I decompress it (a working cpio, that boot with no problem )with

cpio -iv < ../rootfs.cpio

in a directory. After that I compress it again with

find . | cpio --quiet -o -H newc > ../rootfs.cpio

that is the command used in buildroot (in cpio.mk:31)

but at this point that cpio do not work anymore. If I compile my kernel with that file I get a kernel panic. File persmission seems the same. With bcompare I saw that the "re-compressed" file has some additional zero at the end, just before the init script. I've tried to remove them, but at this point the system freeze, maybe there is some CRC check somewhere.

Any ideas? the point is that I'd like to start from buildroot but I want to add my stuff to that rootfs and then embed it into my kernel.

0

There are 0 answers