public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* build system broken in 2.6.6rc1 for external modules?
@ 2004-04-19 17:56 Arkadiusz Miskiewicz
  2004-04-19 20:58 ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: Arkadiusz Miskiewicz @ 2004-04-19 17:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: zippel

On 2.6.5 this works fine (/usr/src/linux is read only and make mrproper'ed):

ln -sf %{_kernelsrcdir}/config-up .config
install -d include/{linux,config}
ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
ln -sf %{_kernelsrcdir}/include/asm-%{_arch} include/asm
touch include/config/MARKER
%{__make} -C %{_kernelsrcdir} scripts modules \
        SUBDIRS=$PWD \
        O=$PWD \
        V=1

I'm getting:
+ umask 022
+ cd /home/users/misiek/rpm/BUILD
+ cd slmodem-2.9.6
+ cp -r drivers drivers-smp
+ cd drivers
+ ln -sf /usr/src/linux/config-up .config
+ install -d include/linux include/config
+ ln -sf /usr/src/linux/include/linux/autoconf-up.h include/linux/autoconf.h
+ ln -sf /usr/src/linux/include/asm-i386 include/asm
+ touch include/config/MARKER
+ /usr/bin/make -C /usr/src/linux modules SUBDIRS=/home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers O=/home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers V=1
make: Wejście do katalogu `/usr/src/linux-2.6.5'
/usr/bin/make -C /home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers             \
KBUILD_SRC=/usr/src/linux-2.6.5 KBUILD_VERBOSE=1        \
KBUILD_CHECK= -f /usr/src/linux-2.6.5/Makefile modules
  Using /usr/src/linux-2.6.5 as source for kernel
if [ -h /usr/src/linux-2.6.5/include/asm -o -f /usr/src/linux-2.6.5/.config ]; then \
        echo "  /usr/src/linux-2.6.5 is not clean, please run 'make mrproper'";\
        echo "  in the '/usr/src/linux-2.6.5' directory.";\
        /bin/false; \
fi;
if [ ! -d include2 ]; then mkdir -p include2; fi;
ln -fsn /usr/src/linux-2.6.5/include/asm-i386 include2/asm
*** Warning: Overriding SUBDIRS on the command line can cause
***          inconsistencies
mkdir -p .tmp_versions
/usr/bin/make -f /usr/src/linux-2.6.5/scripts/Makefile.build obj=scripts/basic
  gcc -Wp,-MD,scripts/basic/.fixdep.d -Iscripts/basic                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/basic/fixdep /usr/src/linux-2.6.5/scripts/basic/fixdep.c
  gcc -Wp,-MD,scripts/basic/.split-include.d -Iscripts/basic                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/basic/split-include /usr/src/linux-2.6.5/scripts/basic/split-include.c
  gcc -Wp,-MD,scripts/basic/.docproc.d -Iscripts/basic                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/basic/docproc /usr/src/linux-2.6.5/scripts/basic/docproc.c
/usr/bin/make -f /usr/src/linux-2.6.5/scripts/Makefile.build obj=scripts
  gcc -Wp,-MD,scripts/.conmakehash.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/conmakehash /usr/src/linux-2.6.5/scripts/conmakehash.c
  gcc -Wp,-MD,scripts/.kallsyms.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/kallsyms /usr/src/linux-2.6.5/scripts/kallsyms.c
  gcc -Wp,-MD,scripts/.empty.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5/include -I/usr/src/linux-2.6.5/scripts -Iscripts -D__KERNEL__ -I/usr/src/linux-2.6.5/include -Iinclude -I/usr/src/linux-2.6.5/include2 -Iinclude2  -I/usr/src/linux-2.6.5/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -mregparm=3 -I/usr/src/linux-2.6.5/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -O2  -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o scripts/empty.o /usr/src/linux-2.6.5/scripts/empty.c
  gcc -Wp,-MD,scripts/.mk_elfconfig.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/mk_elfconfig /usr/src/linux-2.6.5/scripts/mk_elfconfig.c
  scripts/mk_elfconfig i386 < scripts/empty.o > scripts/elfconfig.h
  gcc -Wp,-MD,scripts/.file2alias.o.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o scripts/file2alias.o /usr/src/linux-2.6.5/scripts/file2alias.c
  gcc -Wp,-MD,scripts/.modpost.o.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o scripts/modpost.o /usr/src/linux-2.6.5/scripts/modpost.c
 gcc -Wp,-MD,scripts/.sumversion.o.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o scripts/sumversion.o /usr/src/linux-2.6.5/scripts/sumversion.c
  gcc  -o scripts/modpost scripts/modpost.o scripts/file2alias.o scripts/sumversion.o
  gcc -Wp,-MD,scripts/.pnmtologo.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/pnmtologo /usr/src/linux-2.6.5/scripts/pnmtologo.c
  gcc -Wp,-MD,scripts/.bin2c.d -Iscripts                 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -o scripts/bin2c /usr/src/linux-2.6.5/scripts/bin2c.c
/usr/bin/make -f /usr/src/linux-2.6.5/scripts/Makefile.build obj=arch/i386/kernel arch/i386/kernel/asm-offsets.s
  gcc -Wp,-MD,arch/i386/kernel/.asm-offsets.s.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5/include -I/usr/src/linux-2.6.5/arch/i386/kernel -Iarch/i386/kernel -D__KERNEL__ -I/usr/src/linux-2.6.5/include -Iinclude -I/usr/src/linux-2.6.5/include2 -Iinclude2  -I/usr/src/linux-2.6.5/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -mregparm=3 -I/usr/src/linux-2.6.5/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -O2  -DKBUILD_BASENAME=asm_offsets -DKBUILD_MODNAME=asm_offsets -S -o arch/i386/kernel/asm-offsets.s /usr/src/linux-2.6.5/arch/i386/kernel/asm-offsets.c
  CHK     include/asm-i386/asm_offsets.h
  UPD     include/asm-i386/asm_offsets.h
/usr/bin/make -f /usr/src/linux-2.6.5/scripts/Makefile.build obj=/home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers
  gcc -Wp,-MD,/home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers/.amrmo_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.5/include  -I/home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers -D__KERNEL__ -I/usr/src/linux-2.6.5/include -Iinclude -I/usr/src/linux-2.6.5/include2 -Iinclude2  -I/usr/src/linux-2.6.5/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -mregparm=3 -I/usr/src/linux-2.6.5/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -O2  -I/home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers  -I/home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers/../modem -DMODULE -DKBUILD_BASENAME=amrmo_init -DKBUILD_MODNAME=slamr -c -o /home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers/amrmo_init.o /home/users/misiek/rpm/BUILD/slmodem-2.9.6/drivers/amrmo_init.c
and so one

but on 2.6.6rc1
+ cd slmodem-2.9.6
+ cp -r drivers drivers-smp
+ cd drivers
+ ln -sf /usr/src/linux/config-up .config
+ install -d include/linux include/config
+ ln -sf /usr/src/linux/include/linux/autoconf-up.h include/linux/autoconf.h
+ ln -sf /usr/src/linux/include/asm-i386 include/asm
+ touch include/config/MARKER
+ /usr/bin/make -C /usr/src/linux modules SUBDIRS=/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers O=/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers V=1
make: Entering directory `/usr/src/linux-2.6.6'
/usr/bin/make -C /home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers              \
KBUILD_SRC=/usr/src/linux-2.6.6      KBUILD_VERBOSE=1   \
KBUILD_CHECK= KBUILD_EXTMOD=/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers     \
        -f /usr/src/linux-2.6.6/Makefile modules
mkdir -p /home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/.tmp_versions
/usr/bin/make -f /usr/src/linux-2.6.6/scripts/Makefile.build obj=/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers
  gcc -Wp,-MD,/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/.amrmo_init.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.6/include  -I/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -I/usr/src/linux-2.6.6/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -O2  -I/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers  -I/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/../modem -DMODULE -DKBUILD_BASENAME=amrmo_init -DKBUILD_MODNAME=slamr -c -o /home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/amrmo_init.o /home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/amrmo_init.c
/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/amrmo_init.c:48:27: linux/version.h: No such file or directory
/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/amrmo_init.c:58:40: missing binary operator before token "("
make[2]: *** [/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers/amrmo_init.o] Error 1
make[1]: *** [/home/users/arekm/rpm/BUILD/slmodem-2.9.6/drivers] Error 2
make: *** [modules] Error 2
make: Leaving directory `/usr/src/linux-2.6.6'

So what's new way of building external modules when sources are read only?

-- 
Arkadiusz Miśkiewicz     CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: build system broken in 2.6.6rc1 for external modules?
  2004-04-19 17:56 build system broken in 2.6.6rc1 for external modules? Arkadiusz Miskiewicz
@ 2004-04-19 20:58 ` Sam Ravnborg
  2004-04-19 21:07   ` Arkadiusz Miskiewicz
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2004-04-19 20:58 UTC (permalink / raw)
  To: Arkadiusz Miskiewicz; +Cc: linux-kernel, zippel

On Mon, Apr 19, 2004 at 07:56:52PM +0200, Arkadiusz Miskiewicz wrote:

[Please send kbuild related stuff to me. Roman is not kbuild maintainer].

> On 2.6.5 this works fine (/usr/src/linux is read only and make mrproper'ed):
> 
> ln -sf %{_kernelsrcdir}/config-up .config
> install -d include/{linux,config}
> ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
> ln -sf %{_kernelsrcdir}/include/asm-%{_arch} include/asm
> touch include/config/MARKER
> %{__make} -C %{_kernelsrcdir} scripts modules \
>         SUBDIRS=$PWD \
>         O=$PWD \
>         V=1

The way to build modules are now:

cd $KERNELSRCDIR
make
make clean

cd $MODULEDIR
make -C KERNELSRCDIR M=$PWD

This will work even with MODVERSIONING turned on.

There is currently a glitch that requires you to have defined
at least one module in the kernel. net/dummy for example.
When next round of patched are in you will not need to build the full kernel either.

If you do not want (cannot) build the kernel in the $KERNELSRCDIR
then you can use:

cd $KERNELSRCDIR
copy config-up ~/build
make O=~/build
make O=~/build clean

cd $MODULEDIR
make -C KERNELSRCDIR O=~/build M=$PWD


Hope this clarifies it.

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: build system broken in 2.6.6rc1 for external modules?
  2004-04-19 20:58 ` Sam Ravnborg
@ 2004-04-19 21:07   ` Arkadiusz Miskiewicz
  2004-04-21  8:45     ` Axel Weiß
  0 siblings, 1 reply; 5+ messages in thread
From: Arkadiusz Miskiewicz @ 2004-04-19 21:07 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

Dnia Monday 19 of April 2004 22:58, Sam Ravnborg napisał:

> There is currently a glitch that requires you to have defined
> at least one module in the kernel. net/dummy for example.
> When next round of patched are in you will not need to build the full
> kernel either.
Great but with 2.6.5 kernel (2.6.4, too. previous probably too) I was able to 
build modules without need to build the full kernel.

> If you do not want (cannot) build the kernel in the $KERNELSRCDIR
> then you can use:
>
> cd $KERNELSRCDIR
> copy config-up ~/build
> make O=~/build
This will start building kernel for me! I don't want that. I want only few 
external modules to be built.

I'll wait for ,,next round of patches'' anyway.

> cd $MODULEDIR
> make -C KERNELSRCDIR O=~/build M=$PWD
not
make -C KERNELSRCDIR O=~/build M=$PWD modules ?

> Hope this clarifies it.
> 	Sam

Would be nice if that ended in Documentation/modules.txt for example.

-- 
Arkadiusz Miśkiewicz     CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: build system broken in 2.6.6rc1 for external modules?
  2004-04-19 21:07   ` Arkadiusz Miskiewicz
@ 2004-04-21  8:45     ` Axel Weiß
  0 siblings, 0 replies; 5+ messages in thread
From: Axel Weiß @ 2004-04-21  8:45 UTC (permalink / raw)
  To: Arkadiusz Miskiewicz; +Cc: linux-kernel

Am Montag, 19. April 2004 23:07 schrieb Arkadiusz Miskiewicz:
> Dnia Monday 19 of April 2004 22:58, Sam Ravnborg napisał:
> > There is currently a glitch that requires you to have defined
> > at least one module in the kernel. net/dummy for example.
> > When next round of patched are in you will not need to build the full
> > kernel either.
>
> Great but with 2.6.5 kernel (2.6.4, too. previous probably too) I was able
> to build modules without need to build the full kernel.
>
> > If you do not want (cannot) build the kernel in the $KERNELSRCDIR
> > then you can use:
> >
> > cd $KERNELSRCDIR
> > copy config-up ~/build
> > make O=~/build
>
> This will start building kernel for me! I don't want that. I want only few
> external modules to be built.

If you are interested, I will send you a brief Makefile for compiling external 
modules. It works on a clean kernel source tree without compiling the whole 
kernel.

Regards,
Axel
-- 
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: build system broken in 2.6.6rc1 for external modules?
@ 2004-04-21 10:43 sam
  0 siblings, 0 replies; 5+ messages in thread
From: sam @ 2004-04-21 10:43 UTC (permalink / raw)
  To: Axel Weiß; +Cc: linux-kernel, Arkadiusz Miskiewicz

>> This will start building kernel for me! I don't want that. I want
>only few
>> external modules to be built.
>
>If you are interested, I will send you a brief Makefile for
>compiling external 
>modules. It works on a clean kernel source tree without compiling
>the whole 
>kernel.

With the patch that went into -rc2-mm1 there is no longer a need
to build the full kernel.
Previously kbuild required the Module.symvers file to be present,
but with the latest patch this requirement is relaxed.

   Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-21 10:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-19 17:56 build system broken in 2.6.6rc1 for external modules? Arkadiusz Miskiewicz
2004-04-19 20:58 ` Sam Ravnborg
2004-04-19 21:07   ` Arkadiusz Miskiewicz
2004-04-21  8:45     ` Axel Weiß
  -- strict thread matches above, loose matches on Subject: below --
2004-04-21 10:43 sam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox