Kernel Compilation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    Kernel Compilation

    I have followed the steps below according to a book:

    Edited init/main.c as below:
    Code:
    asmlinkage void __init start_kernel(void)
    {
     ..............
     ..............
     //this line is added right after variable declaration 
     printk("Penguins are Cute, But so are polar bears\n");
     ............
     ............
    }
    Code:
    bash>cd /usr/src/linux-x.y.z/
    bash>make clean
    #bash>make menuconfig//i have skipped this part
    //instead i have done this
    bash>cp .config.old .config
    bash>make bzImage
    bash>cp arch/x86/boot/bzImage /boot/vmlinuz
    Then I have edited the /boot/grub/menu.lst file. as below:

    Code:
    title openSUSE 11.0 - 2.6.25.5-1.1
    root(hd0,1)
    kernel /boot/vmlinuz root=/dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB72b5415f-0465leee-part2 resume=/devsda1 splash=silent showopts
    initrd /boo/initrd-2.6.25.5.1.1-default
    After that I have rebooted the OS. According to book suggestion I was suppose to see my added line in the beginning of the boot sequence

    But all I have found is, I cant connect to internet anymore from that. What am I missing?

    I am using this on VirtualBox.

    Best Regards,
    johny
  • Oralloy
    Recognized Expert Contributor
    • Jun 2010
    • 988

    #2
    Johnny,

    Have you tried the very simplest build - which is to change nothing at all?

    That way you will at least know if your build process is working correctly, and that you've made no perturbations in the kernel that disable your networking (or other system behaviour).

    You're a smart guy, and just like me, you tend to consider the basic baby steps as avoidable. Apparently this is one of those instances when it's not.

    Also - just a thought - are you building the same kernel version as you were running with? If there's a version mismatch, some of the higher level driver code may not work correctly.

    Luck!
    Oralloy

    Comment

    • johny10151981
      Top Contributor
      • Jan 2010
      • 1059

      #3
      I am using the same version of kernel that I have found on SUSE disk(linux-2.6.25.5-1.1).

      I am trying to do the simplest compilation, so that my os can run with minimum feature(video card, sound card, Network support, USB Support). But During
      bash>make bzImage it ask about lots of driver installation. In some case I dont even understand what to do...

      So, if I can get a suggestion on simplest compilation, it will be great for me to understand what needed to be done.

      Comment

      • Oralloy
        Recognized Expert Contributor
        • Jun 2010
        • 988

        #4
        Johny,

        Take the other tack. Compile everyting in, and see if your system works properly that way.

        Then you can start eliminating bits until you have a minimal kernel, assuming that's what you truly need (or want).

        Luck!

        Comment

        Working...