Re: How to configure Linux kernel source tree hierarchy




lovecreatesbea...@xxxxxxxxx wrote:

miline wrote:
lovecreatesbea...@xxxxxxxxx wrote:

Markku Kolkka wrote:
lovecreatesbea...@xxxxxxxxx wrote:

I still do not know exactly how to have a Linux kernel
source tree hierarchy on my machine

The way to do this depends on your Linux distribution. You didn't
specify which one you use so it's impossible to answer in detail.

Thank you. I installed debian-31r1a that was downloaded from
debian.org. The kernelversion is 2.4.

Do I need to create and enter /usr/src/linux before untar the kernel
zipped file that was downloaded from kernel.org, e.g.
linux-2.6.16.tar.gz.
No, no need to go in /usr/src/linux/ .... actually when you install
source rpm (SRPM) of kernel in redhat linux it installs the source
there (/usr/src/linux).

I downloaded the newest kernel source, and is it correct for me to
configure a 2.6.x kernel source tree on kernel 2.4 Debian Linux
machine?
yes, you can configure and install 2.6 kernel on 2.4 distribution. Just
have to worry about the modules.

1. Untar the kernel tarball or go to the linux kernel tree if you have
already done that
2. make menuconfig. ( Set your hardware drivers/filesystems)

There were errors after I did this. I created /usr/src/linux and
unpacked the kernel source package there.
What errors?

Is configuring the kernel source tree is similar to upgrading the
kernel?

Upgrading is configuring, building and installing
unlike configuring is only configuring.

About half year ago, I had done a kernel upgrade from 2.4 to
2.6 on another machine. I remember that I also can not run this
command, I just used make config at that time. Following is a full log
of that upgrade on my machine.

$ kernelversion
2.4
$ cd linux-2.6.16/linux-2.6.16/
$ make config
$ make
Which architecture do you have?
make config is as good as make menuconfig.

$ su root 'make moudules_install'
$ su root 'cp linux-2.6.16/linux-2.6.16/arch/i386/boot/bzImage
/boot/vmlinuz-2.6.16-386'
This is installing kernel image.
$

$ su root 'mkinitrd -o /boot/initrd.img-2.6.16 2.6.16'
Creating initial ramdisk image.

Alter boot entries in Grub record typically /boot/grub/menu.lst, add
following section at the bottom part of the file

#jhl, kernel 2.6
title kernel.org, kernel 2.6.16-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.16-386 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.16 2.6.16
savedefault
boot

$ su root -c 'shutdown -r 10'
$ kernelversion
2.6
$

3. make menuconfig/oldconfig/xconfig
4. make dep (only for linux 2.4 , for 2.6 skip this step)
5. make bzImage
6. make modules
7. make modules_install
8. Install this generated bzImage in grub (bootloader)

.



Relevant Pages

  • Re: Cant install Mandrake 9.1
    ... A word on initial install, not covered below - you'll need to point at ... "For BootX to work for Mandrake, ... Linux as the boot OS: Mac F/S Kernel location, ...
    (comp.os.linux.powerpc)
  • Re: Why BSD?
    ... > linux a try". ... and we run FreeBSD almost exclusively at work. ... I had to read a text file and copy and paste install ... "If you choose to use a 2.4 kernel older than 2.4.23 or the updated RH ...
    (freebsd-questions)
  • Re: Help, tailored Linux desired
    ... R>> linux myself? ... R> making my install smaller, ... no drivers of graphics card except the ... Since custom compiling a kernel (and ...
    (comp.os.linux.misc)
  • Plextor PX-716sa DVD-burner how to make it work under SuSE 9.2?
    ... I had heard that Linux was doing ok now (the ... Unfortunately when I did a fresh install of SuSE 9.2 pro the dvd would not ... The kernel recognizes the SATA interface, it just doesn't see the drive at ... writing the drivers, so that I could get this thing moving, as I am not a ...
    (comp.os.linux.hardware)
  • Re: A few RH9 questions
    ... > I'm quite new to linux, so if I ask stupid questions, feel free to give ... > included in the ISO install images. ... > most recent stable version of the kernel is 2.6.0. ... install the driver, if needed. ...
    (linux.redhat.install)