LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   kernal setup (https://www.linuxquestions.org/questions/linux-from-scratch-13/kernal-setup-12564/)

rlpt 01-24-2002 07:31 AM

kernal setup
 
i have just started setting up my lfs system but i am having trouble setting uo the kernal.

In the book (3.1), chapter 5, preparing the lfs system, Installing Linux Kernel-2.4.16.

the commands needed to install are the following in the book-

make mrproper &&
yes "" | make config &&
make dep &&
cd $LFS/usr/include &&
cp -a ../src/linux/include/linux . &&
chown -R root.root $LFS/usr/include/linux &&
mkdir asm &&
cp -a ../src/linux/include/asm/* asm &&
chown -R root.root $LFS/usr/include/asm


im fine up to the command make dep &&, but after that the commands dont make sense unless im doing something wrong.
im installing the software from /tmp on my current distro, and from this all the change directory and copy commands make no sense.

cd $LFS/usr/include && - this now means im in /mnt/lfs/usr/include

cp -a ../src/linux/include/linux . && - unless im wrong this means i am copying stuff from /mnt/lfs/usr/src/linux/include/linux to the current directory! but the problem is this directory doesnt exist unless im installing the kernel from the wrong directory.

im sory if this post is hard to follow but any help would be greatly appreciated.

cheers

rlpt

Mik 01-24-2002 08:49 AM

Well when you extract the kernel package it places it in $LFS/usr/src/linux-2.4.16 and not in $LFS/usr/src/linux. What I did is just make a symbolic link so I didn't have to add the version bit every time.

cd $LFS/usr/src &&
ln -s $LFS/usr/src/linux-2.4.16 linux

rlpt 01-24-2002 09:27 AM

Quote:

Well when you extract the kernel package it places it in $LFS/usr/s
this is the part i dont understand, from the commands in the book there are no obvious flags that show that its will be installed into $LFS, other packages have had flags such as --prefix=$LFS/usr
.

so does this mean that i have to run the installation from a certain directory on my $LFS partition?

i may of got this all wrong, and if i have please say so!

Mik 01-25-2002 02:39 AM

Well it doesn't actually matter where you placed it as long as you are use the right directory in the commands. I unpacked all the tar.bz2 files in the $LFS/usr/src directory. But for the kernel package it makes a dir called linux-2.4.16. Although the list of commands you are running assumes the kernel package is in $LFS/usr/src/linux. So you either need to use the right directory in the commands or just make a simple link.
Ofcourse if you have chosen to put all your source in another location then you'll have to be pointing to that directory.
And you haven't gotten to the part of installing a kernel yet, you only setup the source code so other packages can use the kernel headers. That's why you never had to use the --prefix=$LFS/usr to get it installed in a certain location.

Hope that's clear enough.

rlpt 01-25-2002 07:13 AM

thanks for the replies, problem sorted, i can now contiue hacking into the early hours of the mourning un hindered!


All times are GMT -5. The time now is 06:25 PM.