<feed xmlns='http://www.w3.org/2005/Atom'>
<title>buildroot.git/fs/initramfs, branch master</title>
<subtitle>Buildroot: Making Embedded Linux easy
</subtitle>
<id>https://git.hiegel.fr/cgit/buildroot.git/atom?h=master</id>
<link rel='self' href='https://git.hiegel.fr/cgit/buildroot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/'/>
<updated>2011-09-27T20:46:00Z</updated>
<entry>
<title>fs/initramfs: refactor with fs/cpio</title>
<updated>2011-09-27T20:46:00Z</updated>
<author>
<name>Arnout Vandecappelle (Essensium/Mind)</name>
<email>arnout@mind.be</email>
</author>
<published>2011-09-06T21:16:09Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=13a3afc536b845e8de8eea9b91bbc6e7430c4566'/>
<id>urn:sha1:13a3afc536b845e8de8eea9b91bbc6e7430c4566</id>
<content type='text'>
An initramfs is in fact the same as a cpio archive, but embedded in
the kernel.  So instead of duplicating the cpio infrastructure,
we can simply build images/rootfs.cpio and link that into the
kernel.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) &lt;arnout@mind.be&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>initramfs/init: make sure that 0, 1, 2 fds are available</title>
<updated>2011-08-04T19:52:21Z</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2011-08-04T19:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=10a130f91e5b947e2d2558443ff09b1686eac273'/>
<id>urn:sha1:10a130f91e5b947e2d2558443ff09b1686eac273</id>
<content type='text'>
As the kernel doesn't automatically mount devtmpfs when an initramfs
is used, commit 424888e47431db738f5f9b3c6392435bfce7a842 has
introduced a small wrapper script that mounts devtmpfs before starting
the real init.

Unfortunately, the problem is that in this case, the init process runs
without any 0, 1 and 2 file descriptors, so none of the
messages/errors printed by the various initialization scripts can be
seen. This is due to the fact the init process relies on 0, 1 and 2
being opened by the kernel before init is started. However, as
/dev/console isn't present on the filesystem at the time the kernel
tries to open the console to create the 0, 1 and 2 file descriptors,
the kernel fails on this and prints the famous "Warning: unable to
open an initial console".

The proposed workaround is to actually open 0, 1 and 2 to /dev/console
in the wrapper script, right after mounting the devtmpfs filesystem,
and before starting the real init. The "Warning" from the kernel is
still shown, but at least the messages from the init scripts are
visible.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>initramfs: fix boot with dynamic /dev</title>
<updated>2011-07-20T14:30:14Z</updated>
<author>
<name>Peter Korsgaard</name>
<email>jacmet@sunsite.dk</email>
</author>
<published>2011-07-20T14:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=424888e47431db738f5f9b3c6392435bfce7a842'/>
<id>urn:sha1:424888e47431db738f5f9b3c6392435bfce7a842</id>
<content type='text'>
Devtmpfs (which is used by devtmpfs/mdev/udev options) doesn't get
automounted by the kernel when an initramfs is used, causing boot
failures when a dynamic /dev is used.

Fix it by adding a pre-init script to mount devtmpfs before running init.

Reported-by: Arnout Vandecappelle &lt;arnout@mind.be&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>initramfs: fix init symlink creation</title>
<updated>2010-11-17T20:20:45Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2010-11-17T06:46:22Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=dde5b6830c7d53591cf7f52f9c433eed65c89f84'/>
<id>urn:sha1:dde5b6830c7d53591cf7f52f9c433eed65c89f84</id>
<content type='text'>
The -e test will dereference the symlink, so if there is no /bin/init,
we will constantly try to create the symlink.  So rather than error on
subsequent runs when the link exists, use the force flag to ln.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>Remove INITRAMFS_TARGET variable</title>
<updated>2010-11-04T18:26:27Z</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2010-11-04T16:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=2e869a7c0508f3dda96ed69f79c79c89ea4e6a5d'/>
<id>urn:sha1:2e869a7c0508f3dda96ed69f79c79c89ea4e6a5d</id>
<content type='text'>
This used to be needed when the filesystem code was rewritten, but not
the Linux compilation code. Now that the Linux compilation code has
been rewritten, the mechanism to ensure that initramfs gets built
*before* the kernel so that it can be integrated is different, and
this INITRAMFS_TARGET variable is no longer used.

See f507921d391bb2578261a9e45c003e72302dc67a for details.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>initramfs: Don't overwrite $(TARGET_DIR)/init if it exists</title>
<updated>2010-08-29T21:34:03Z</updated>
<author>
<name>Simon Pasch</name>
<email>fpasch@googlemail.com</email>
</author>
<published>2010-08-29T21:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=c4cdcc3680c5dc551fa563b2133ca83c55967495'/>
<id>urn:sha1:c4cdcc3680c5dc551fa563b2133ca83c55967495</id>
<content type='text'>
Closes #2443

Allow use of custom init scripts.

Signed-off-by: Simon Pasch &lt;fpasch@googlemail.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>initramfs: update help text</title>
<updated>2010-06-26T05:44:16Z</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2010-06-25T22:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=c2a44f158eedf40be3ab3bc3c76f61fe032d7b34'/>
<id>urn:sha1:c2a44f158eedf40be3ab3bc3c76f61fe032d7b34</id>
<content type='text'>
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>initramfs: only show the option when a Linux kernel is being built</title>
<updated>2010-06-26T05:43:20Z</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2010-06-25T22:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=93e801470981010d8760db372f511e04481182d0'/>
<id>urn:sha1:93e801470981010d8760db372f511e04481182d0</id>
<content type='text'>
Closes #2119

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
<entry>
<title>linux: add support for initramfs</title>
<updated>2010-06-22T19:20:28Z</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@free-electrons.com</email>
</author>
<published>2010-06-13T17:19:38Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=f507921d391bb2578261a9e45c003e72302dc67a'/>
<id>urn:sha1:f507921d391bb2578261a9e45c003e72302dc67a</id>
<content type='text'>
In Buildroot, the kernel is built and installed *before* the root
filesystems are built. This allows the root filesystem to correctly
contain the kernel modules that have been installed.

However, in the initramfs case, the root filesystem is part of the
kernel. Therefore, the kernel should be built *after* the root
filesystem (which, in the initramfs case simply builds a text file
listing all files/directories/devices/symlinks that should be part of
the initramfs). However, this isn't possible as the initramfs text
file would lack all kernel modules.

So, the solution choosen here is to keep the normal order: kernel is
built before the root filesystem is generated, and to add a little
quirk to retrigger a kernel compilation after the root filesystem
generation.

To do so, we add a ROOTFS_$(FSTYPE)_POST_TARGETS variable to the
fs/common.mk infrastructure. This allows individual filesystems to set
a target name that we should depend on *after* generating the root
filesystem itself (contrary to normal ROOTFS_$(FSTYPE)_DEPENDENCIES,
on which we depend *before* generating the root filesystem).

The initramfs code in fs/initramfs/initramfs.mk uses this to add a
dependency on 'linux26-rebuild-with-initramfs'.

In linux/linux.mk, we do various things :

 * If BR2_TARGET_ROOTFS_INITRAMFS is enabled (i.e if initramfs is
   enabled as a root filesystem type), then we create an empty
   rootfs.initramfs file (remember that at this point, the root
   filesystem hasn't been generated) and we adjust the kernel
   configuration to include an initramfs. Of course, in the initial
   kernel build, this initramfs will be empty.

 * In the linux26-rebuild-with-initramfs target, we retrigger a
   compilation of the kernel image, after removing the initramfs in
   the kernel sources to make sure it gets properly rebuilt (we've
   experienced cases were modifying the rootfs.initramfs file wouldn't
   retrigger the generation of the initramfs at the kernel level).

This is fairly quirky, but initramfs really is a special case, so in
one way or another, we need a little quirk to solve its specialness.

Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>initramfs: fix init symlink</title>
<updated>2010-04-20T14:54:50Z</updated>
<author>
<name>Will Wagner</name>
<email>will_wagner@carallon.com</email>
</author>
<published>2010-04-20T14:31:01Z</published>
<link rel='alternate' type='text/html' href='https://git.hiegel.fr/cgit/buildroot.git/commit/?id=4ddb427ef96ac5e1786a9ea00e38ebc65cb2d166'/>
<id>urn:sha1:4ddb427ef96ac5e1786a9ea00e38ebc65cb2d166</id>
<content type='text'>
When initramfs was ported to the new fs structure the init symlink
macro was defined, but forgot to add it to PRE_GEN_HOOKS

Signed-off-by: Will Wagner &lt;will_wagner@carallon.com&gt;
Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
</content>
</entry>
</feed>
