Re: compile a kernel module statically into kernel ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello !

actually, i didn`t get replies to 2 former emails to lelik, so this was the reason the give it a ry for myself, though.(want to learn)

i actually was able to compile a user-mode-linux kernel with 0.2.6 version of vblade-kernel driver builtin (added some Kconfig stuff).

I did a "make allnoconfig", put CONFIG_KERNEL_VBLADE=y inside and had a successful compile.
At least the UML kernel booted and after adding some printk, i could see the driver initializing.
I also could compile a i386 kernel successfully and cat vmlinux|strings|grep vblade told me, that there was that driver inside.

unfortunately, something seems to have broken now - very strange.

it worked and now i`m not able to reproduce. it seems to fail at the linker stage. tried with 2.6.13 and 2.6.15.

does anybody know, where to look ?

thank you!
roland

vmhost:/usr/src/linux # make
  CHK     include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  CC      drivers/block/vblade/main.o
  CC      drivers/block/vblade/drive.o
  CC      drivers/block/vblade/aoe.o
  CC      drivers/block/vblade/ata.o
drivers/block/vblade/ata.c: In function `ata_execute':
drivers/block/vblade/ata.c:197: warning: long long unsigned int format, different type arg (arg 2)
  CC      drivers/block/vblade/cfg.o
  LD      drivers/block/vblade/vb.o
  LD      drivers/block/vblade/built-in.o
  LD      drivers/block/built-in.o
  LD      drivers/built-in.o
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
drivers/built-in.o(.text+0x259c6): In function `skb_new':
: undefined reference to `alloc_skb'
drivers/built-in.o(.text+0x25a39): In function `skb_new':
: undefined reference to `skb_over_panic'
drivers/built-in.o(.text+0x25a86): In function `packet':
: undefined reference to `__skb_linearize'
drivers/built-in.o(.text+0x25b5d): In function `packet':
: undefined reference to `__kfree_skb'
drivers/built-in.o(.text+0x25b78): In function `packet':
: undefined reference to `skb_clone'
drivers/built-in.o(.text+0x25b97): In function `packet':
: undefined reference to `__kfree_skb'
drivers/built-in.o(.text+0x25d23): In function `packet':
: undefined reference to `skb_under_panic'
drivers/built-in.o(.text+0x25d57): In function `packet':
: undefined reference to `__kfree_skb'
drivers/built-in.o(.text+0x25dc6): In function `packet':
: undefined reference to `__kfree_skb'
drivers/built-in.o(.text+0x25dfc): In function `module_destroy':
: undefined reference to `dev_remove_pack'
drivers/built-in.o(.text+0x25f99): In function `add_port':
: undefined reference to `dev_base'
drivers/built-in.o(.text+0x26824): In function `drive_announce':
: undefined reference to `__kfree_skb'
drivers/built-in.o(.text+0x26dda): In function `aoe_finish':
: undefined reference to `dev_queue_xmit'
drivers/built-in.o(.text+0x26dfe): In function `aoe_finish':
: undefined reference to `__kfree_skb'
drivers/built-in.o(.text+0x26e12): In function `aoe_finish':
: undefined reference to `___pskb_trim'
drivers/built-in.o(.init.text+0x1ae9): In function `module_new':
: undefined reference to `dev_add_pack'
make: *** [.tmp_vmlinux1] Error 1





pradeep singh <2500.pradeep@xxxxxxxxx> schrieb am 08.01.06 12:21:16:
> 
> 
> On 1/8/06, devzero@xxxxxx <devzero@xxxxxx> wrote: Hello !
> 
> i need to compile a kernel module statically into the linux kernel.
> 
> there is a new module "vblade-kernel" at http://lpk.com.price.ru/~lelik/AoE/ , which isn`t in mainline yet, so i cannot just download the kernel and do a xconfig/menuconfig.
> 
> can someone help me or give me some tips, what i need to do, to have vblade-kernel (vblade-kernel-0.2.6.tar.gz)  module linked statically inside the kernel, and not as a loadable module ?
>  AFAIK there is not any diff way of statically linking it other than compiling it with source, if u dont want it to be a loadable module.
>  
>  follow what Greg said.
>  
>  good luck
>  
> 
> -- 
> play the game 


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux