tech-install archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Grokking miniroot.kmod etc.



On Mon, Nov 17, 2008 at 01:54:51AM +0100, Hubert Feyrer wrote:

> Now with the new world order, I see a number of bits that I can't fit 
> together:
>  * we build a ramdisk image from e.g. src/distrib/i386/ramdisks as
>    before
>  * There's src/sys/modules/miniroot which builds/installs e.g.
>    /stand/i386/4.99.72/modules/miniroot/miniroot.kmod, but it seems
>    unrelated to the ramdisk image. Is that correct? What's this
>    needed for, at all?

We add the ramdisk image to miniroot.kmod as an ELF section:

http://nxr.homeunix.org/source/xref/distrib/i386/kmod/Makefile#15

When miniroot.kmod is first built from miniroot.c, it contains nothing
other than the small code fragment in that file. It's useless until the
ELF object has had the disk image added.

>  * for the kernel, I guess the MEMORY_DISK_HOOKS kernel option is still
>    needed, but instead of MEMORY_DISK_IS_ROOT and esp.
>    MEMORY_DISK_ROOT_SIZE, MEMORY_DISK_DYNAMIC is needed. Does that make
>    sense?

Right, MEMORY_DISK_HOOKS + MEMORY_DISK_DYNAMIC.

>  * Now, how to fit things together? Where does the ramdisk image come
>    into play?

It's in the module!

>  * How to tell the bootloader to load the ramdisk after the kernel?
>    My guess this is done via boot.cfg - is there an example?

boot.cfg on the install CD:

http://nxr.homeunix.org/source/xref/distrib/i386/cdroms/installcd/boot.cfg.in

The 'load' commands can be given at any time. They are processed after
the kernel has been loaded, but before the kernel has been started.

>    What is the /ramdisk.kmod mentioned in boot.cfg.4, is it the
>    ramdiskbin.fs? Where exactly is this put?

It should say miniroot.kmod, someone made a mistake.

Andrew


Home | Main Index | Thread Index | Old Index