Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Generating system map files for booting


On Thu, 23 May 2002, Erich Schulz wrote:

> how do you generate the system map files etc.

It is generated when you compile the kernel.  For example to
compile 2.4.18 for the latest Red Hat Linux:

  Install distribution kernel source, it suck that RH don't put their
  config files in a seperate (much smaller) RPM
    $ rpm -i kernel-source-2.4.9-31.i386.rpm

  Install Linux kernel source
    $ cd /usr/src
    $ bzip2 -dc ~/linux-2.4.18.tar.bz2 | tar xf -
    $ mv linux linux-2.4.18-gt1
    $ cd linux-2.4.18-gt1

  Alter makefile
    $ vi Makefile
      EXTRAVERSION="-gt1"
  Sometimes you will also need to set
      CC=kgcc
  This isn't so at the moment

  Configure kernel using Red Hat defaults, pick the right RH config
  file from the directory
    $ cp ../linux-2.4.9-31/configs/kernel-2.4.9-i686.config .config
    $ make oldconfig

  Standard compile one-liner, make clean is redundant unless you change
  the .config
    $ make clean && make dep && make bzImage && make modules

  It worked, install
    # make modules_install
    # V=2.4.18-gt1
    # cp System.map /boot/System.map-$V
    # cp arch/i386/boot/bzImage /boot/vmlinuz-$V
    # mkinitrd /boot/initrd-${V}.img $V

  Update boot loader
    # vi /etc/grub.conf
      [Copy entry for "Red Hat Linux" to get "root ()" and "root="
       and paste it as the first "title" entry, now edit it to become]
      title Linux (2.4.18-gt1)
        root (hd0,0)
        kernel /vmlinux-2.4.18-gt1 ro root=/dev/hda6
        initrd /initrd-2.4.18-gt1.img

> module-info file

This is a kernel-dependent file but is a file specific to Red Hat Linux
used by its automated configuration tools.  It doesn't matter if it is not
present.

It's not clear how this file is built, or which config tools use it.

-- 
Glen Turner                                 Network Engineer
 (08) 8303 3936      Australian Academic and Research Network
 glen.turner@xxxxxxxxxxxxx          http://www.aarnet.edu.au/
--
 The revolution will not be televised, it will be digitised