Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Optional /usr merge in Gentoo
Date: Sun, 01 Sep 2013 14:51:07
Message-Id: 52235378.1020706@gmail.com
In Reply to: Re: [gentoo-user] Optional /usr merge in Gentoo by Tanstaafl
1 On 01/09/2013 16:30, Tanstaafl wrote:
2 > On 2013-09-01 12:31 AM, Canek Peláez Valdés <caneko@×××××.com> wrote:
3 >> Of course, support for an initramfs is not actually a file system
4 >> (it's not even in the File systems section of the kernel
5 >> configuration, is in General setup); it's not possible to have
6 >> initramfs as a module (that would make no sense at all); and it's
7 >> code that is several orders of magnitude more simpler than the one
8 >> used by ext4 (or any other journal file system).
9 >
10 > Is there any reason that the creation, use and maintenance of the
11 > initramfs couldn't be as simple as a checkbox in the kernel config, so
12 > that running 'make' after the kernel was configured would automatically
13 > build it? Then, all I'd have to do is move it into /boot along with the
14 > new kernel (just like I do now), with *nothing* else required, and the
15 > kernel would call it, and things would just work (as long as it was
16 > there and I didn't forget to copy it to /boot).
17
18
19 That would require a config file of some sort to define what files you
20 want in the initramfs, and it must be available to the kernel build
21 process. It also has to read your self-defined arbitrary stuff from your
22 userland.
23
24 The kernel build machinery is a self-contained environment, the kernel
25 devs work very hard to keep userland out of it. So expect Linux to shoot
26 you down in flames for the very suggestion.
27
28 You keep asking for tools to automate the production of an initramfs;
29 you should realize that the thing has got absolutely nothing to do with
30 building and running a kernel, it's a helper function, and not really
31 tied to the kernel per se.
32
33 Just rig your kernel update process to add a section where you run the
34 command that builds an initramfs. You already have so many steps where
35 you do exactly that in other areas so it's not a realistic issue, and
36 you take that in your stride. Or at it to the end of your kernel build
37 wrapper script if you wrote such a thing for yourself.
38
39
40 --
41 Alan McKinnon
42 alan.mckinnon@×××××.com