Trying to build my first bzImage or custom kernel



  • So, I’d say to some degree that i know enough Linux to be dangerous, but i might be selling myself short. Anyway, I’ve got my first Fog env up and running and have completed a number of imaging tasks. The need has come up for me to become able to add drivers to the kernel image that’s passed onto clients booting PXE.

    I’ve followed instructions here:
    [url]http://fogproject.org/wiki/index.php?title=Building_a_Custom_Kernel[/url]
    and [url]http://dinomite.net/blog/2007/setting-up-ubuntu-for-building-kernel-modules/#.T48antUcuo5[/url]

    The only item I added in the GUI (from make xconfig) was “VMware PVSCSI driver suport” I then saved and closed that guy then ran the make bzImage. the product of that was, after some time:

    drivers/net/dl2k.c: In function ‘rio_ioctl’:
    drivers/net/dl2k.c:1294: error: implicit declaration of function 'capable’
    drivers/net/dl2k.c:1294: error: ‘CAP_NET_ADMIN’ undeclared (first use in this function)
    drivers/net/dl2k.c:1294: error: (Each undeclared identifier is reported only once
    drivers/net/dl2k.c:1294: error: for each function it appears in.)
    make[2]: *** [drivers/net/dl2k.o] Error 1
    make[1]: *** [drivers/net] Error 2
    make: *** [drivers] Error 2
    root@AusFog01:/usr/src/linux-source-2.6.32#

    This is what i have for my fog server and where this failure occured:
    root@AusFog01:/usr/src/linux-source-2.6.32# uname -a
    Linux AusFog01 2.6.32-45-server #101-Ubuntu SMP Mon Dec 3 15:54:27 UTC 2012 x86_64 GNU/Linux

    And I’m running fog .32



  • Heck yes. I’m able to boot the fog image and blast images to the VM. Be it paravirtual or LSI Logic SAS. Havent tested the other modes yet tho.



  • Haha shoot. At least you got it sorted out now? Were you able to test booting to the SCSI VMware hard drive?



  • RTFM, I tell myself…

    This was the reason for my last two failures with init and CPU arch:

    copied from the WIKI,
    [SIZE=5][B][FONT=sans-serif][SIZE=19px][COLOR=#000000]Note[/COLOR][/SIZE][/FONT][/B][/SIZE]

    [FONT=sans-serif][COLOR=#000000]When building on x86_64 systems you may need to specify that you are building for an x86 target architecture.[/COLOR][/FONT]
    [FONT=sans-serif][COLOR=#000000][FONT=monospace]make ARCH=i386 menuconfig[/FONT][/COLOR][/FONT]
    [FONT=sans-serif][COLOR=#000000][FONT=monospace]make ARCH=i386 bzImage[/FONT][/COLOR][/FONT]



  • Thanks for the tip, i’ll ultimately go that route if needed but I have the itch to get through this at present.

    The kernel compiled and the bzImage was produced but it wont boot. i get this on the VM:
    “kernel panic - not syncing: No init found. Try passing init= option to kernel”

    And a thin client also fails with “This kernel requires x86_64 CPU, but only detected an i686 CPU”

    So, it looks like I have more things to do in xconfig. Back to the console!



  • Strange… I wonder if the same error would occur if you opened up the kernel and remade it, but didn’t change any settings when doing the make xconfig step. Which I realize is nothing like a solution… More just a curiosity, haha.

    On another note, I had a similar problem to yours, so I updated the kernel to include those VMWare drivers. And then I ended up not needing it. The only VMs I need to connect to FOG are my reference images, so when I created the new VMs I created them as blank templates, deleted the default SCSI hard drive, and added VM IDE hard drives which FOG 0.32 picked up just fine.

    Not sure if that helps you in your situation at all (especially if you’re trying to connect exisitng vms with SCSI based vmdks), but if you’re sick of banging your head against the bzImage errors and you have the option to switch, it works.



  • mkay, took out the ubuntu third party drivers but left the swap thing in place. looks like make bzImage completed. time to test!



  • Looks like that was yet another superfluous driver for some kind of remote. removed it. got further and yet another error:

    LD vmlinux.o
    ubuntu/built-in.o:(.bss+0xa40): multiple definition of debug' arch/x86/built-in.o:(.kprobes.text+0x70): first defined here ld: Warning: size of symboldebug’ changed from 49 in arch/x86/built-in.o to 4 in ubuntu/built-in.o
    make: *** [vmlinux.o] Error 1
    root@AusFog01:/usr/src/linux-source-2.6.32#

    more info on my server:
    minimalist/base/headless install of Ubuntu Server 11.10. Then installed fog .32 per instruction. then added other tidbits. and ultimately, through this process, added GDM and X.



  • So, this isn’t a fix to the problem, but I’ve foudn that driver is the D-Link 2000 network driver. I dont need that for my environment so i simply removed it and i think i got a bit further with the make bzImage job.

    however, on to the next failure:
    CC ubuntu/lirc/lirc_atiusb/lirc_atiusb.o
    In file included from ubuntu/lirc/lirc_atiusb/lirc_atiusb.c:67:
    ubuntu/lirc/lirc_atiusb/…/kcompat.h:245:2: error: #error "LIRC modules currently require"
    ubuntu/lirc/lirc_atiusb/…/kcompat.h:246:2: error: #error " ‘Loadable module support —> Module unloading’"
    ubuntu/lirc/lirc_atiusb/…/kcompat.h:247:2: error: #error "to be enabled in the kernel"
    make[3]: *** [ubuntu/lirc/lirc_atiusb/lirc_atiusb.o] Error 1
    make[2]: *** [ubuntu/lirc/lirc_atiusb] Error 2
    make[1]: *** [ubuntu/lirc] Error 2
    make: *** [ubuntu] Error 2
    root@AusFog01:/usr/src/linux-source-2.6.32#

    Still tracking this. Figured I’d post my findings in case I’m not alone.



  • more of the error, still googling…

    root@AusFog01:/usr/src/linux-source-2.6.32# make bzImage
    scripts/kconfig/conf -s arch/x86/Kconfig
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    CALL scripts/checksyscalls.sh
    CHK include/linux/compile.h
    VDSOSYM arch/x86/vdso/vdso-syms.lds
    LD arch/x86/vdso/built-in.o
    LD arch/x86/built-in.o
    CC drivers/net/dl2k.o
    drivers/net/dl2k.c: In function ‘rio_ioctl’:
    drivers/net/dl2k.c:1294: error: implicit declaration of function 'capable’
    drivers/net/dl2k.c:1294: error: ‘CAP_NET_ADMIN’ undeclared (first use in this function)
    drivers/net/dl2k.c:1294: error: (Each undeclared identifier is reported only once
    drivers/net/dl2k.c:1294: error: for each function it appears in.)
    make[2]: *** [drivers/net/dl2k.o] Error 1
    make[1]: *** [drivers/net] Error 2
    make: *** [drivers] Error 2
    root@AusFog01:/usr/src/linux-source-2.6.32#


Log in to reply
 

483
Online

39003
Users

10718
Topics

101766
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.