• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Trying to build my first bzImage or custom kernel

    Scheduled Pinned Locked Moved
    General
    2
    10
    5.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      ahachenberg
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • A
        ahachenberg
        last edited by

        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#

        1 Reply Last reply Reply Quote 0
        • A
          ahachenberg
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • A
            ahachenberg
            last edited by

            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 symbol debug’ 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.

            1 Reply Last reply Reply Quote 0
            • A
              ahachenberg
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • D
                dvlsg
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • A
                  ahachenberg
                  last edited by

                  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!

                  1 Reply Last reply Reply Quote 0
                  • A
                    ahachenberg
                    last edited by

                    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]

                    1 Reply Last reply Reply Quote 0
                    • D
                      dvlsg
                      last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • A
                        ahachenberg
                        last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        151

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project