1

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.

Ezequiel Garcia
  • 1,037
  • 8
  • 20
JosephITA
  • 502
  • 2
  • 11
  • 21
  • The question is not exactly Buildroot specific, it's rather a cpio or kernel issue. Anyway note Buildroot provides several ways to customize your root filesystem, without extracting and regenerating the final images. See the manual, section [Customizing the generated target filesystem](https://buildroot.org/downloads/manual/manual.html#rootfs-custom). Root filesystem overlays are probably what you need. – Luca Ceresoli May 11 '16 at 10:26
  • Yes, thank you. At the moment I'm using with success the "before making rootfs script". It does what I need. But the problem of decompressing and recompressing is still not resolved. Thanks. – JosephITA May 12 '16 at 07:39

0 Answers0