Re: How to configure Linux kernel source tree hierarchy



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.

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?

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.

Is configuring the kernel source tree is similar to upgrading the
kernel? 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
$ 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'
$

$ su root 'mkinitrd -o /boot/initrd.img-2.6.16 2.6.16'

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: How to configure Linux kernel source tree hierarchy
    ... The way to do this depends on your Linux distribution. ... Untar the kernel tarball or go to the linux kernel tree if you have ... Install this generated bzImage in grub ... it because of the lack of the kernel source tree? ...
    (comp.os.linux.development.system)
  • Re: Help during binary upgrade from 5.3 to 5.4
    ... kernel after you CVSupped the source tree. ... only the kernel. ... I've read in other upgrade ... > HOWTOs that installed ports will not work after the upgrade with ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Kernel 2.6.9: i810 video
    ... Attached is the configuration file I just used after again adding the kernel ... removing the kernel 2.6.9 source tree, and for luck, reinstalling the 2.6.7 ... alsa-project in RH7.2 which used OSS and since alsa can be updated more ...
    (Linux-Kernel)
  • Re: why "probe_kernel_address()", not "probe_user_address()"?
    ... source tree, wouldn't it be more meaningful to use a more appropriate ... You'll notice that all callers are indeed probing kernel addresses. ... __get_userit is in fact not being used to access user memory. ... perche` vuol dire che ti ...
    (Linux-Kernel)
  • Re: How do you apply patches from kernel.org?
    ... > I've started building and upgrading my own kernel - much easier than I ... > is, I can't figure out how to apply this patch to my source tree, and ... To upgrade a kernel using patches you must install all patches ...
    (comp.os.linux)