compilation of kernel 2.4.0-test10

richard at richard at
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:

# /usr/src/lfs/kernel

case $1 in
    highlander linux-$kernel_version
    for file in $kernel_patches ; do
      if [ ! -f $file ]; then
        echo "where is $file" >> $log
    case $2 in
      cd $LFS/usr/src 
      if [ -z "$kernel_symlink" ]; then
        # LFS-BOOK behaviour
        [ -d linux ] && rm -rf $LFS/usr/src/linux
        # 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

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

      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
      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
      cp $LFS/usr/src/linux/arch/i386/boot/bzImage $kernel_name
      #cp $LFS/usr/src/linux/ $LFS/boot
      [ -n "$kernel_modules_conf" ] && cp $kernel_modules_conf /etc/modules.conf
      . $path/tasks/kernel install-tarball configure
    echo $task: $1: not implemented
    exit -1

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:

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.


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

More information about the lfs-dev mailing list