summaryrefslogtreecommitdiff
path: root/HACKING
blob: 2fd91368bb09a12b7724cd7a62de1e5c47033197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
> I am not sure how to modify mkinitramfs to do this automatically, maybe you know?

I need to document this more clearly, but the initramfs-tools have a collection of hooks that will solve your problem.  While there's no way that Breezy could do this in the install, we could certainly include the scripts in the package (Especially if you're willing to test them to make sure they work! *g*)

There are two phases that need to be accounted for.  The first is the install phase for generating the initramfs, the second is run-time phase for actually doing the needed magic.

To install the components you need, look at the scripts in /usr/share/initramfs-tools/hooks.  evms and acpid are good choices.  You can see a bunch of header stuff at the top that basically guarantees that things are run in the right order if they need to be.  Two functions that will interest you:

copy_exec copies a binary and any libraries it depends on
manual_add_modules takes bareword module names (like fan, thermal, etc) and installs those modules and any of their dependancies into the initramfs.

The runtime phase is handled by scripts in /usr/share/initramfs-tools/scripts/ you probably want to start up at about the same point as lvm, md, and evms do, so local-top is a good directory to look in.
You can see the same sort of magic at the top of the script, although lvm and evms each require that md run first.

I hope this helps.  I'll paste this text into a HACKING file on the hopes that someone will see fit to improve it.  That person will probably be me, mind you... =)

Tks,
Jeff Bailey