[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to build a single module in the tree?
04-09-2007, Robert P. J. Day:
>
> i swear, this just never seems to work for me. according to greg
> kh's book "linux kernel in a nutshell",
Heh, mr. Hartman...
While getting old, everybody tend to write something, but in this case
this and LDD3 is just making money, if any (IMHO).
So, lets study not what to think, but how to think :)
> the way to build a single module is simply (for example):
>
> $ make drivers/usb/serial/visor.ko
OK, building modules in src tree, O= tree, externally works for me, and
i guess, i've helped once in LKML to get this right.
> for the life of me, i can't get that to work. it *will* build a
> file visor.o, but that's not what i'm after, i want the final visor.ko
> module file.
>
> am i doing something exceedingly silly? thanks.
>
> rday
>
It's 2.6.18, but i doubt current mainline have any kbuild changes.
Don't know, what's wrong with `.tmp_versions', but anyway:
-*- shell -*-
<olecom@flower>debian/blinuz$ export LANG=C
<olecom@flower>debian/blinuz$
<olecom@flower>debian/blinuz$ make clean
make -C /mnt/work/root-fs/usr/src/linux-source-2.6.18 O=/mnt/work/pc/src-build/debian/linux-kernel/blinuz clean
CLEAN .tmp_versions
<olecom@flower>debian/blinuz$
<olecom@flower>debian/blinuz$ make modules_prepare
make -C /mnt/work/root-fs/usr/src/linux-source-2.6.18 O=/mnt/work/pc/src-build/debian/linux-kernel/blinuz modules_prepare
Using/mnt/work/root-fs/usr/src/linux-source-2.6.18assourceforkernel GEN /mnt/work/pc/src-build/debian/linux-kernel/blinuz/Makefile
CHK include/linux/version.h
CHK include/linux/utsrelease.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
CC arch/x86_64/kernel/asm-offsets.s
GEN include/asm-x86_64/asm-offsets.h
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.o
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
HOSTCC scripts/bin2c
<olecom@flower>debian/blinuz$
<olecom@flower>debian/blinuz$
<olecom@flower>debian/blinuz$ stat drivers/usb/serial/ti_usb_3410_5052.ko
stat: cannot stat `drivers/usb/serial/ti_usb_3410_5052.ko': No such file or directory
<olecom@flower>debian/blinuz$ make drivers/usb/serial/ti_usb_3410_5052.ko
make -C /mnt/work/root-fs/usr/src/linux-source-2.6.18 O=/mnt/work/pc/src-build/debian/linux-kernel/blinuz drivers/usb/serial/ti_usb_3410_5052.ko
Using/mnt/work/root-fs/usr/src/linux-source-2.6.18assourceforkernel GEN /mnt/work/pc/src-build/debian/linux-kernel/blinuz/Makefile
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CC [M] drivers/usb/serial/ti_usb_3410_5052.o
/bin/sh: cannot create .tmp_versions/ti_usb_3410_5052.mod: Directory nonexistent
make[3]: *** [drivers/usb/serial/ti_usb_3410_5052.o] Error 2
make[2]: *** [drivers/usb/serial/ti_usb_3410_5052.ko] Error 2
make[1]: *** [drivers/usb/serial/ti_usb_3410_5052.ko] Error 2
make: *** [drivers/usb/serial/ti_usb_3410_5052.ko] Error 2
<olecom@flower>debian/blinuz$ mkdir .tmp_versions
<olecom@flower>debian/blinuz$ make drivers/usb/serial/ti_usb_3410_5052.ko
make -C /mnt/work/root-fs/usr/src/linux-source-2.6.18 O=/mnt/work/pc/src-build/debian/linux-kernel/blinuz drivers/usb/serial/ti_usb_3410_5052.ko
Using/mnt/work/root-fs/usr/src/linux-source-2.6.18assourceforkernel GEN /mnt/work/pc/src-build/debian/linux-kernel/blinuz/Makefile
CHK include/linux/version.h
CHK include/linux/utsrelease.h
MODPOST
CC drivers/usb/serial/ti_usb_3410_5052.mod.o
LD [M] drivers/usb/serial/ti_usb_3410_5052.ko
<olecom@flower>debian/blinuz$ stat drivers/usb/serial/ti_usb_3410_5052.ko
File: `drivers/usb/serial/ti_usb_3410_5052.ko'
Size: 77641 Blocks: 152 IO Block: 4096 regular file
Device: 303h/771d Inode: 109144660 Links: 1
Access: (0640/-rw-r-----) Uid: (19810702/ olecom) Gid: ( 0/ root)
Access: 2007-09-04 22:01:45.778667500 +0200
Modify: 2007-09-04 22:01:45.778667500 +0200
Change: 2007-09-04 22:01:45.778667500 +0200
<olecom@flower>debian/blinuz$
--
-o--=O`C
#oo'L O
<___=E M
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ