Kernel-Compile.mini.HowTo [FINAL 4-10-96]

Kernel-Compile.mini.HowTo [FINAL 4-10-96]

Post by Kent Robot » Mon, 08 Apr 1996 05:00:00



Kernel-Compile-mini-HowTo "Trust this, and live, with a new kernel." (Kent)
                                                                    (Robotti)
ncftp> open                                                        
to> ftp.funet.fi                                                      
ncftp> cd /pub/Linux/kernel/src/v1.3     <-/v1.3 ? As of this writing...)
ncftp> ls LATEST*    
<LATEST-IS-1.3.85>                      
ncftp> bin                               <-Set to binary mode...)      
ncftp> get linux-1.3.85.tar.gz          
ncftp> quit

?/# mv linux-1.3.85.tar.gz /usr/src
?/# cd /usr/src
/usr/src# rm -rf linux                   <-Remove old kernel...)
        # tar xzvf linux-1.3.85.tar.gz   <-Unpack new kernel...)
        # cd /usr/include

/usr/include# ln -s /usr/src/linux/include/linux linux   <-Create new links...)
            # ln -s /usr/src/linux/include/asm-i386 asm  
            # cd /usr/src/linux

(Try and read /usr/src/linux/Documentation/Configure.help, this will
explain, the various options you have, in configuring the kernel...)

/usr/src/linux# make config           <-To configure and compile kernel...)
              # make dep  
              # make clean
              # make zlilo
              # make modules          <-To install any modules..?)
              # make modules_install

(If the kernel compiled, you'll have, /vmlinuz /vmlinuz.old)
(If your useing lilo to boot linux, everything is fine as is...)
(But if your booting from a floppy, do this...)

/# fdformat /dev/fd0H1440      <-Format a floppy...)
/# cp vmlinuz /dev/fd0H1440    <-Copy kernel to floppy...)

Boot the new kernel, then /# rm vmlinuz.old

(You don't need all of the kernel source, after it's compiled,
you just need /usr/src/linux/include, you'll need the include files,
to compile anything...)

~/# mv /usr/src/linux/include /usr/src        <-Steps, to removing
~/# rm -rf /usr/src/linux                      kernel source, minus
~/# mkdir /usr/src/linux                       the include files...)
~/# mv /usr/src/include /usr/src/linux

(To remove just the (o)bject files, that were created, when you compiled the
kernel, do this...)

?/# cd /usr/src/linux
/usr/src/linux# find . -name "*.o" | xargs rm

(I would keep the kernel source, and just remove the (o) files, unless I
was short on space, don,t forget # rm linux-1.3.85.tar.gz..?)

(4-10-1996-FINAL)