Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, i'm a newbie in linux kernel compilation. i tried building the kernel for the first time just for fun and found that it asks so many weired questions(for any ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! amit4g's Avatar
    Join Date
    Feb 2007
    Location
    Bangalore,India
    Posts
    63

    Building custom kernel


    Hi,

    i'm a newbie in linux kernel compilation.
    i tried building the kernel for the first time just for fun and found that it asks
    so many weired questions(for any newbiee it is almost impossible to understand what to select,what not to select and what to select as module out of those thousands of options)
    Following were my steps while building kernel:

    1: cd ~amit/linux<w-x-y-z->
    2: make menuconfig
    didn't do any changes - > save -> exit
    3: make modules
    4: make
    5: su -
    6: cd ~amit/linux<w-x-y-z>
    7: make modules_install
    8: make
    9: reboot
    Grub showed an additional entry and i booted from that kernel(<w-x-y-z>) but after initial kernel initialization the boot process invoked /bin/sh and after that kernel panicd

    Is there any way to minimize this intervention between a newbie and kernel compilation process.
    make defconfig (for selecting some default values)might help but i am not sure of this.
    is there any better to handle this ? any document which give some insight into those thousands options and pros and cons of each selection(Y/N/M).

    ~amit

  2. #2
    Linux Guru Juan Pablo's Avatar
    Join Date
    Mar 2006
    Location
    /home/south_america/ecuador/quito
    Posts
    2,064
    You won't be able to boot your system succesfully if you don't add support for your hardware during config. Navigate through the menus, select what you understand and compile a list of thing you feel are important and you don't understand and post here.
    A couple of tips:

    - Build ALSA drivers as modules
    - Use lspci to get a clue about your current hardware
    Put your hand in an oven for a minute and it will be like an hour, sit beside a beautiful woman for an hour and it will be like a minute, that is relativity. --Albert Einstein
    Linux User #425940

    Don't PM me with questions, instead post in the forums

  3. #3
    Just Joined! amit4g's Avatar
    Join Date
    Feb 2007
    Location
    Bangalore,India
    Posts
    63

    Smile

    Thanks Juan !

    Building ALSA as module worked
    Beside that,while building a warning message was thrown saying that the gcc version(4.1.0) is known to be not compiling the kernel properly and i should use
    a differernt version of gcc.

    Also the build process failed once due to absence of some header file(i forgot to collect the logs for the build process,sorry ) required for OSS,so next time i didn't selected it and it worked.

    Now my silly "hello_world" module is getting loaded but it gives so many warning messages,here they are:



    amit@snowflake:~/ldd> make -C /lib/modules/`uname -r`/build M=`pwd` modules
    make: Entering directory `/home/amit/linux-2.6.20.2'
    CC [M] /home/amit/ldd/hello_world.o
    Building modules, stage 2.
    MODPOST 1 modules
    WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from .text between '_text' (at offset 0xc0100029) and 'startup_32_smp'
    WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from .text between '_text' (at offset 0xc0100037) and 'startup_32_smp'
    WARNING: vmlinux - Section mismatch: reference to .init.data:init_pg_tables_end from .text between '_text' (at offset 0xc0100099) and 'startup_32_smp'
    WARNING: vmlinux - Section mismatch: reference to .init.text:start_kernel from .text between 'is386' (at offset 0xc0100221) and 'check_x87'
    WARNING: vmlinux - Section mismatch: reference to .init.text:smp_prepare_cpus from .text between 'init' (at offset 0xc0100409) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:migration_init from .text between 'init' (at offset 0xc010040e) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:spawn_ksoftirqd from .text between 'init' (at offset 0xc0100413) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:smp_cpus_done from .text between 'init' (at offset 0xc0100481) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:sched_init_smp from .text between 'init' (at offset 0xc0100486) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:cpuset_init_smp from .text between 'init' (at offset 0xc010048b) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:usermodehelper_init from .text between 'init' (at offset 0xc0100495) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:driver_init from .text between 'init' (at offset 0xc010049a) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.text:sysctl_init from .text between 'init' (at offset 0xc010049f) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'init' (at offset 0xc01004b4) and 'rest_init'
    WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between 'init' (at offset 0xc01004f2) and 'rest_init'

    -----------------
    ----------------
    WARNING: vmlinux - Section mismatch: reference to .init.text: from .text between 'iret_exc' (at offset 0xc02e0611) and '_etext'
    CC /home/amit/ldd/hello_world.mod.o
    LD [M] /home/amit/ldd/hello_world.ko
    make: Leaving directory `/home/amit/linux-2.6.20.2'

    Though i could load the module and also unload it back . Can you throw some light over these warning messages.

    Thanks again,
    ~amit

  4. $spacer_open
    $spacer_close

Posting Permissions

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