Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13
Originally Posted by PastAsNew Can you build a development kernel without affecting your currently running kernel? When you do "make install" the kernel is copied to /boot. A symlink is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513

    Quote Originally Posted by PastAsNew View Post
    Can you build a development kernel without affecting your currently running kernel?
    When you do "make install" the kernel is copied to /boot. A symlink is created/updated to point to it, with the name of /boot/vmlinuz. The rest of installed kernels on that directory should remain unaffected. The other piece of the puzzle is the configuration of the bootloader. As long as you have the correct path to the kernel on that file, then the kernel will boot without problems. You can install as many kernels as you wish, and you can have all of them in the config file of the bootloader (usually /etc/lilo.conf or /boot/grub/grub.conf) so you can choose which one do you want to use when booting.


    Is there any way of debugging your development kernel without trashing your current kernel, and without it being the default kernel at boot time?
    The default kernel is also configured on the bootloader config file.

  2. #12
    Just Joined!
    Join Date
    Apr 2009
    Location
    South East England
    Posts
    40
    Sorry - been away from this for a while. Thanks for all your help so far.

    I've got 2.6.29.3 in a dir /usr/src/linux-2.6.29.3, also symlinked as /usr/src/linux.

    I've done the config based on my old config ... just hitting return so it (presumably) defaults for all the new functionality since my distro level of 2.6.21.4.

    I go into this dir and run ...

    make clean
    make bzImage

    ... and I get section mismatch warnings.

    So I then did ...

    make clean
    make CONFIG_DEBUG_SECTION_MISMATCH=y bzImage 2> makeErr.log

    ... and the error log dump contains stuff like ...

    WARNING: drivers/built-in.o(.text+0x8354b): Section mismatch in reference from the function cmd640_init_dev() to the function .init.text:check_prefetch()
    The function cmd640_init_dev() references
    the function __init check_prefetch().
    This is often because cmd640_init_dev lacks a __init
    annotation or the annotation of check_prefetch is wrong.

    WARNING: vmlinux.o(.text+0x150603): Section mismatch in reference from the function cmd640_init_dev() to the function .init.text:check_prefetch()
    The function cmd640_init_dev() references
    the function __init check_prefetch().
    This is often because cmd640_init_dev lacks a __init
    annotation or the annotation of check_prefetch is wrong.

    WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel()
    The variable __cpuinitdata initial_code references
    a function __init i386_start_kernel().
    If i386_start_kernel is only used by initial_code then
    annotate i386_start_kernel with a matching annotation.


    ... Any ideas what's going on here, and what I can do to sort it? I've done some google searches and though there are plenty of hits, I cannot really glean anything very helpful from them!

    Many thanks.

  3. #13
    Just Joined!
    Join Date
    Apr 2009
    Location
    South East England
    Posts
    40
    I think my previous post may be me worrying more than I need to - hopefully!

    __init I now realise simply gives the build a hint the relevant code is not used after startup so its memory can be recovered. So other than a bit of unrecovered memory it may not be a real issue at all. Other than these warnings the build does seem to build OK. I found a post which directed me to look in ...

    linux/include/init.h

    ... and that does seem to suggest this.

    See how I get on.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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