compilation of kernel 2.4.0-test10

richard at reika.demon.co.uk richard at reika.demon.co.uk
Sun Nov 19 08:08:15 PST 2000


Misquoted from Nicholas Dille on Sun, Nov 19, 2000 at 04:36:25PM +0100:
> hi ya,
> 
> i've been working on an automated installation procedure for lfs but got
> stuck
> when compiling kernel 2.4.0-test10 with the latest isdn4linux and reiserfs
> patches.
> 
> it compiles just fine on my old system suse linux 7 pro on several different
> machines
> but as soon as i try compiling it chrooted it never gets past nls and dies
> with the
> following output:
> 
I have found that I cannot make dep while not chrooted, and then make bzImage
when I am. I also have problems if both stages were done in chroot.

Here is my current solution:

#!/bin/bash
# /usr/src/lfs/kernel

case $1 in
  pre-test)
    highlander linux-$kernel_version ftp://ftp.kernel.org/pub/linux/kernel/
    for file in $kernel_patches ; do
      if [ ! -f $file ]; then
        echo "where is $file" >> $log
        stop=yes
      fi
    done
    ;;
  install-tarball)
    case $2 in
    configure)
      cd $LFS/usr/src 
      if [ -z "$kernel_symlink" ]; then
        # LFS-BOOK behaviour
        [ -d linux ] && rm -rf $LFS/usr/src/linux
      else
        # If you often have more than one kernel source tree unpacked,
        # this will be handy.
        [ -L linux ] && /bin/rm $LFS/usr/src/linux
        [ -d $kernel_symlink ] && rm -r $LFS/usr/src/$kernel_symlink
        mkdir $kernel_symlink
        ln -s $kernel_symlink linux
      fi

      unztar linux-$kernel_version
      cd $LFS/usr/src/linux
      for file in "${kernel_patches[@]}" ; do
        unzip_cd $file | patch -sNp1
        echo "              patch ${file##*/}" >> $log
      done

      cp $kernel_config_file $LFS/usr/src/linux/.config
      make oldconfig
      make dep
      cd $LFS/usr/include
      ln -s ../src/linux/include/linux linux
      ln -s ../src/linux/include/asm   asm

      # The tarball probably contained some random UID
      # I could do unpleasant things if I controlled that UID
      chown -R root.root /usr/include/asm
      chown -R root.root /usr/include/linux

      > $cleanup
      ;;
    install)
      echo "Installing kernel   $kernel_name" >> $log
      . $path/tasks/kernel install-tarball configure
      cd $LFS/usr/src/linux
      make bzImage
      make modules
      cat >>$chrootfile <<-end_of_chroot
	make modules_install
	#make sgmldocs psdocs pdfdocs htmldocs XXX
	end_of_chroot
      chroot_lfs
      cp $LFS/usr/src/linux/arch/i386/boot/bzImage $kernel_name
      #cp $LFS/usr/src/linux/System.map $LFS/boot
      [ -n "$kernel_modules_conf" ] && cp $kernel_modules_conf /etc/modules.conf
      . $path/tasks/kernel install-tarball configure
      ;;
    esac
    ;;
  *)
    echo $task: $1: not implemented
    exit -1
    ;;
esac

This gets called as:
kernel install-tarball configure
kernel install-tarball install

The pre-test was intended to check that all the required
files are present, but is currently broken while I sort out
autmatic download.

The the whole script is at:
http://www.reika.demon.co.uk

It is currently being modified for glibc-2.2
At the moment the only things I have not got to work with 2.2
are apache, coda, and gnome. These refuse to find db.

Richard


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list