[PLUG] ELF

Paul Heinlein heinlein at attbi.com
Sun Jul 7 21:43:06 UTC 2002


On Sun, 7 Jul 2002, AthlonRob wrote:

> I would imagine your distro also has support for a.out and MISC
> binaries.  If not, you can probably make your own kernel (although
> from what I've heard, that can be complicated in RedHat, Mandrake,
> or other RPM-based distros).

Here's my recipe for building roll-your-own kernels on a Red Hat 
system:

1. Boot into the default Red Hat kernel, do an 'lsmod' and take note 
   of every single module that's currently running. Red Hat's kernels 
   have very few things compiled in statically (ext2, binary formats 
   like ELF and a.out, and other really essential stuff), so
   a list of running modules will tell you most of the capabilites 
   you're going to need in your kernel.

   If you can't figure out what a certain module does, try opening
   /path/to/linux/src/Documentation/Configure.help in the pager of 
   your choice and searching for the module name. Chances are that 
   you'll be able to discover the configuration option for the module 
   in question.

2. Do 'make xconfig' or, my favorite, 'make menuconfig,' taking care 
   to match (at least) the capabilities of the RH kernel. This isn't a
   100% fool-proof method to define the kernel you'll need, but it's a 
   good start.

3. make bzImage && make modules && make modules_install;
   cp arch/i386/boot/bzImage /boot/vmlinuz-<version>
   cp System.map /boot/System.map-<version>
   cp .config /boot/config-<version>

4. Edit lilo or grub config file or, if you're adventurous, check out 
   the /sbin/new-kernel-pkg script that accompanies Red Hat 7.x; it'll 
   do grub.conf updates and build an initrd image for you.

Cross fingers; offer supplications to appropriate deity; reboot.

--Paul Heinlein <heinlein at attbi.com>






More information about the PLUG mailing list