Find the answer to your Linux question:
Results 1 to 4 of 4
Hello everyone, I am using the following steps to compile a default 2.6 kernel. Here are my steps to recompile. But I am meeting with strange C/C++ compile errors. 1. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    8

    compile error -- 2.6.9 default kernel source code


    Hello everyone,


    I am using the following steps to compile a default 2.6 kernel. Here are my steps to recompile. But I am meeting with strange C/C++ compile errors.

    1. install kernel source codes RPM (download from Red Hat FTP)

    rpm -ivh kernel-2.6.9-11.el.src.rpm

    2. go to kernel directory

    [root@vm ~]# cd /usr/src/kernels/
    [root@vm kernels]# ls
    2.6.9-11.EL-hugemem-i686 2.6.9-11.EL-i686 2.6.9-11.EL-smp-i686
    [root@vm kernels]# cd 2.6.9-11.EL-i686/
    [root@vm 2.6.9-11.EL-i686]# ls
    arch fs ipc Makefile net sound
    crypto include kernel mm scripts usr
    drivers init lib Module.symvers security

    3. make dep, make clean and make will result in error messages

    [root@vm 2.6.9-11.EL-i686]# make dep
    *** Warning: make dep is unnecessary now.
    [root@vm 2.6.9-11.EL-i686]# make clean
    CLEAN .tmp_versions

    [root@vm 2.6.9-11.EL-i686]# make
    CHK include/linux/version.h
    CHK include/asm-i386/asm_offsets.h
    /bin/sh: arch/i386/kernel/asm-offsets.s: No such file or directory
    UPD include/asm-i386/asm_offsets.h
    mv: cannot stat `include/asm-i386/asm_offsets.h.tmp': No such file or directory
    make: *** [include/asm-i386/asm_offsets.h] Error 1

    Anything wrong with the steps?


    thanks in advance,
    George

  2. #2
    Linux User cyberinstru's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    362
    Before doing "make dep", do
    make menuconfig
    and do necessary configurations. Then do "make" or do as given below.
    make dep
    is not required.
    1. make bzImage
    2. make modules
    3. make modules_install
    4. Copy bzImage from <src>/arch/i386/boot/bzImage to /boot/bzImage-2.6.9-11
    5. Update your grub/lilo conf (depends upon ur boot loader)

    reboot. If any hiccups, please post that here.

    gud luk
    ---------------------------------
    Registered Linux User #440311
    HI2ARUN _AT_ GMAIL _DOT_ COM
    ---------------------------------

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Posts
    8
    Thanks cyberinstru,


    I think I have used the same step.


    Quote Originally Posted by cyberinstru
    Before doing "make dep", do and do necessary configurations. Then do "make" or do as given below. is not required.
    1. make bzImage
    2. make modules
    3. make modules_install
    4. Copy bzImage from <src>/arch/i386/boot/bzImage to /boot/bzImage-2.6.9-11
    5. Update your grub/lilo conf (depends upon ur boot loader)

    reboot. If any hiccups, please post that here.

    gud luk
    I just want to confirm with you that if I want to use kernel source code from Red Hat, then I should use kernel-2.6.9-11.EL.src.rpm

    under

    ftp://ftp.redhat.com/pub/redhat/linu...S/en/os/SRPMS/

    Right?

    And, the directory structure of source code is,

    [root@vm ~]# cd /usr/src/kernels/
    [root@vm kernels]# ls
    2.6.9-11.EL-hugemem-i686 2.6.9-11.EL-i686 2.6.9-11.EL-smp-i686
    [root@vm kernels]# cd 2.6.9-11.EL-i686/

    Does the source code directory matter? I saw some people mentioned they always use /usr/src/linux


    regards,
    George

  4. #4
    Linux User cyberinstru's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    362
    It doesn't matter, u can have the kernel source anywhere.
    In case, the default kernel that has come with ur distro (RH) is 2.4.x, then u need to install mod_init tools, if u r upgrading from 2.4 to 2.6 for the first time.
    ---------------------------------
    Registered Linux User #440311
    HI2ARUN _AT_ GMAIL _DOT_ COM
    ---------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •