PDA

View Full Version : Kernel compiling.



Aleramo
08-08-2006, 02:13 PM
I installed knoppix 5.0 on my pc and i thought to compile the kernel cos it doesn't recognize a lot of things of my pc. It doesn't recognize my USB webcam, it doesn't open a new windows for pen drive, it undestand when a CD is inside the reader but don't allow me to see the content and so on. I tried to compile the kernel to solve the problem, but when i try to do it, i receive:

root@LinuxBox:/usr/src/linux# make menuconfig
Makefile:266: /usr/src/linux-2.6.17/scripts/Kbuild.include: No such
file or directory
Makefile:403: /usr/src/linux-2.6.17/arch/i386/Makefile: No such file or
directory
make: *** No rule to make target
`/usr/src/linux-2.6.17/arch/i386/Makefile'. Stop.

When i use xconfig, the answer is similar. What can i do to solve my problem with Hardware? what can i do to compile the kernel?

angor
08-09-2006, 08:37 AM
From what I can see, knoppix does not come with the kernel source
(only headerfiles). You can get the source via ftp from
ftp.kernel.org/pub/linux/kernel/v2.6 or via http from
www.kernel.org/pub/linux/kernel/v2.6 .

Aleramo
08-09-2006, 09:42 AM
The 2 links are full and i haven't enought experience to understand what i have to download. :shock:
I want the kernel 2.6.17, what file have i to download? :?:
Can linux-2.6.17.tar.bz2 be right? :?:

angor
08-10-2006, 11:20 AM
You probably want the latest (because of fixed bugs), that would be
linux-2.6.17.8.tar.bz2 .

As you mention your inexperience, let me add a few points.
Make a directory in /opt, e.g. linuxsrc, and download the tar.bz2
to that directory. "tar xjf linux-2.6.17.8.tar.bz2" there produces
a further direcory linux-2.6.17.8 . Now make a link to this new
directory: "ln -s linux-2.6.17.8 linux".

"cd linux" and "make menuconfig". menuconfig needs libncurses5,
which you may have to install with apt-get (or similar).

Now, the next time someone fixes some bugs in the kernel there
will be a linux-2.6.17.9 which you DON'T want to download - you
already have 99% of it. Instead you download "patch-2.6.17.9.bz2"
to linuxsrc. For this one time you also get the patch 2.6.17.8 .
Then you cd to linux and do this:

bzip2 -dc ../patch-2.6.17.8.bz2 | patch -Rp1
bzip2 -dc ../patch-2.6.17.9.bz2 | patch -p1

Basically, this first strips 2.6.17.8 down to 2.6.17, then upgrades
to 2.6.17.9. This is because a patch applies to the "basic" kernel
version.

Have fun!

Aleramo
08-13-2006, 08:11 PM
I am sorrow to say u that i don't find in the two links of kernel source the file:
patch-2.6.17.9.bz2
have i to replace it with:
patch-2.6.17.8.bz2 ?

My teachers at university said me to compile the kernel to solve the problems about hardware. Do u agree with them? here knoppix is blocked with CD/DVR reader/writer, pendrive and so on.
bye bye.

angor
08-14-2006, 09:18 AM
No wonder you can't find 2.6.17.9 - it's not there yet :-)
I meant this for the (near) future.

And yes, I agree with your teachers. I'd recommend you to
ask them to guide you through your first steps - it *can* be
confusing even for a not-so-beginner.

Aleramo
08-14-2006, 09:41 AM
Well i'll check the two links to find the patch of kernel 2.6.17.9 :wink:
I'll tried to use xconfig, but yesterday it didn't started, menuconfig started but i didn't do changes cos i was very tired, i'll try today.
My teachers will not help me again cos i ended university 2 mounths ago so u'll find my topics on this Forum. :wink:
Has Linux a great diffusion in Germany? here less people use it. I think the problem is they are lazy to seek to solve the problems. :wink:

Aleramo
08-14-2006, 01:57 PM
:?

Aleramo
08-14-2006, 01:57 PM
I am near the end.
After "make menuconfig" i did:
make dep
make clean
make bzImage
make modules
make modules_install
cd arch/i386/boot
cp bzImage /boot
Now i have to configure the boot loader to load the new kernel. What have i to do?
Were the instructions before right?

rusty
08-14-2006, 03:20 PM
Hello,

I hope that you are successful with your kernel rebuild but if it does not solve your problems with hardware recognition I suggest you try Kanotix http://kanotix.com/changelang-ita.html.

Knoppix is difficult to install to a hard drive because it is really meant for use as a Live CD. Kanotix is a better choice if you plan for hard drive installation.

Good Luck!

Aleramo
08-14-2006, 07:59 PM
Thank u rusty, i know kanotix yet, i have it installed in my laptop, but i didn't know it's better than knoppix to install.
If i won't solve my problems i'll install it.

angor
08-15-2006, 07:46 AM
>cp bzImage /boot

I'd suggest "cp bzImage /boot/vmlinuz-2.6.17.8" (if that is your
version). That way you keep this around when you upgrade to
2.6.17.9 or whatever instead of overwriting /boot/bzImage.
You'll also want to "cp /path/to/linux/System.map /boot/System.map-2.6.17.8"
Personally, I also copy .config to /boot/config-2.6..., so I can later
tell how the kernel was configured in the past.

>Now i have to configure the boot loader to load the new kernel. What have i to do?

AFAIK Knoppix uses the grub bootloader with which I have no experience.
Perhaps someone else can take it up from here.

angor
08-15-2006, 08:36 AM
Oops, I forgot one real "gotcha"... during "make menuconfig"
please make sure you did NOT choose your filesystem
(probably ext3) as a module, because that module cannot be
loaded before the filesystem can be read, and the filesystem
cannot be read before the module is loaded...