]> code.ossystems Code Review - openembedded-core.git/commit
cpio rootfs build: Avoid modifying rootfs dir
authorJonas Eriksson <jonas.eriksson@enea.com>
Mon, 24 Mar 2014 15:56:05 +0000 (16:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Mar 2014 12:15:11 +0000 (12:15 +0000)
commit706055503f493a5af73240c0983c46dbe31d8fe9
treec1eb6aa3048e47c738962fbf84697dfcb6c7de24
parent46b80c80b0e008820b34f4360054e1697df2650d
cpio rootfs build: Avoid modifying rootfs dir

The Linux kernel requires that initrd images contain a /init file for
the image to be used as an initrd, even if it is empty. Adding it into
the rootfs directory creates a race, that can upset tar when building
both a .tar and .cpio image file ("tar: .: file changed as we read it").
Additionally, whether or not the tar file will contain the /init file is
also up to the race condition.

To avoid this problem, move the /init addition out from the rootfs
directory, and thus only include it in the .cpio image.

Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Cc: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image_types.bbclass