* Re: HOWTO build modules in 2.6.0 ...
2003-11-17 19:00 HOWTO build modules in 2.6.0 Wojciech 'Sas' Cieciwa
@ 2003-11-17 18:05 ` Randy.Dunlap
2003-11-17 18:28 ` David T Hollis
2003-11-17 20:33 ` Sam Ravnborg
2 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2003-11-17 18:05 UTC (permalink / raw)
To: Wojciech 'Sas' Cieciwa; +Cc: linux-kernel
On Mon, 17 Nov 2003 20:00:50 +0100 (CET) "Wojciech 'Sas' Cieciwa" <cieciwa@alpha.zarz.agh.edu.pl> wrote:
|
| Hi,
|
| How can I build kernel modele from other package without root, or copying
| all from /usr/scr/linux/ ??
| When I try build kernel module from user i got error,
|
| [...]
| make[1]: Leaving directory `/users/cieciwa/rpm/BUILD/eagle-1.0.4/driver'
| /usr/bin/make -C /usr/src/linux SUBDIRS=`pwd` modules;
| make[1]: Entering directory `/usr/src/linux-2.6.0'
| HOSTCC scripts/fixdep
| cc1: Permission denied: opening dependency file scripts/.fixdep.d
| make[2]: *** [scripts/fixdep] Error 1
| make[1]: *** [scripts] Error 2
| make[1]: Leaving directory `/usr/src/linux-2.6.0'
| make: *** [adiusbadsl.o] Error 2
| make: Leaving directory `/users/cieciwa/rpm/BUILD/eagle-1.0.4/driver'
|
| How can I solve this problem ??
Current kernel build requires a kernel source tree.
Given that, follow directions in linux/Documentation/kbuild/modules.txt
and .../makefiles.txt.
I have some working examples if you want pointers to them.
--
~Randy
MOTD: Always include version info.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HOWTO build modules in 2.6.0 ...
2003-11-17 19:00 HOWTO build modules in 2.6.0 Wojciech 'Sas' Cieciwa
2003-11-17 18:05 ` Randy.Dunlap
@ 2003-11-17 18:28 ` David T Hollis
2003-11-17 20:33 ` Sam Ravnborg
2 siblings, 0 replies; 8+ messages in thread
From: David T Hollis @ 2003-11-17 18:28 UTC (permalink / raw)
To: Wojciech 'Sas' Cieciwa; +Cc: linux-kernel
On Mon, 2003-11-17 at 14:00, Wojciech 'Sas' Cieciwa wrote:
> Hi,
>
> How can I build kernel modele from other package without root, or copying
> all from /usr/scr/linux/ ??
> When I try build kernel module from user i got error,
>
> [...]
> make[1]: Leaving directory `/users/cieciwa/rpm/BUILD/eagle-1.0.4/driver'
> /usr/bin/make -C /usr/src/linux SUBDIRS=`pwd` modules;
> make[1]: Entering directory `/usr/src/linux-2.6.0'
> HOSTCC scripts/fixdep
> cc1: Permission denied: opening dependency file scripts/.fixdep.d
> make[2]: *** [scripts/fixdep] Error 1
> make[1]: *** [scripts] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.6.0'
> make: *** [adiusbadsl.o] Error 2
> make: Leaving directory `/users/cieciwa/rpm/BUILD/eagle-1.0.4/driver'
>
> How can I solve this problem ??
>
> Thanx,
> Sas.
Here's what I have used that works quite well. Taken from the lwn.net
articles on porting to 2.5/2.6:
ifneq ($(KERNELRELEASE),)
obj-m := usbnet.o
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif
The only item to change would be the 'obj-m := usbnet.o'. That's the
module that you want built.
^ permalink raw reply [flat|nested] 8+ messages in thread
* HOWTO build modules in 2.6.0 ...
@ 2003-11-17 19:00 Wojciech 'Sas' Cieciwa
2003-11-17 18:05 ` Randy.Dunlap
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Wojciech 'Sas' Cieciwa @ 2003-11-17 19:00 UTC (permalink / raw)
To: linux-kernel
Hi,
How can I build kernel modele from other package without root, or copying
all from /usr/scr/linux/ ??
When I try build kernel module from user i got error,
[...]
make[1]: Leaving directory `/users/cieciwa/rpm/BUILD/eagle-1.0.4/driver'
/usr/bin/make -C /usr/src/linux SUBDIRS=`pwd` modules;
make[1]: Entering directory `/usr/src/linux-2.6.0'
HOSTCC scripts/fixdep
cc1: Permission denied: opening dependency file scripts/.fixdep.d
make[2]: *** [scripts/fixdep] Error 1
make[1]: *** [scripts] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.0'
make: *** [adiusbadsl.o] Error 2
make: Leaving directory `/users/cieciwa/rpm/BUILD/eagle-1.0.4/driver'
How can I solve this problem ??
Thanx,
Sas.
--
{Wojciech 'Sas' Cieciwa} {Member of PLD Team }
{e-mail: cieciwa@alpha.zarz.agh.edu.pl, http://www2.zarz.agh.edu.pl/~cieciwa}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HOWTO build modules in 2.6.0 ...
2003-11-17 19:00 HOWTO build modules in 2.6.0 Wojciech 'Sas' Cieciwa
2003-11-17 18:05 ` Randy.Dunlap
2003-11-17 18:28 ` David T Hollis
@ 2003-11-17 20:33 ` Sam Ravnborg
2003-11-17 23:59 ` John Levon
2 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2003-11-17 20:33 UTC (permalink / raw)
To: Wojciech 'Sas' Cieciwa; +Cc: linux-kernel
On Mon, Nov 17, 2003 at 08:00:50PM +0100, Wojciech 'Sas' Cieciwa wrote:
>
> Hi,
>
> How can I build kernel modele from other package without root, or copying
> all from /usr/scr/linux/ ??
> When I try build kernel module from user i got error,
>
> [...]
> make[1]: Leaving directory `/users/cieciwa/rpm/BUILD/eagle-1.0.4/driver'
> /usr/bin/make -C /usr/src/linux SUBDIRS=`pwd` modules;
> make[1]: Entering directory `/usr/src/linux-2.6.0'
> HOSTCC scripts/fixdep
> cc1: Permission denied: opening dependency file scripts/.fixdep.d
Hi Sas.
What you really need is the possibility to specify an alternate location
for output files.
Use the following:
make -C /usr/src/linux SUBDIRS=`pwd` O=/users/cieciwa/rpm/BUILD/eagle-1.0.4/linux modules
O=/users/cieciwa/rpm/BUILD/eagle-1.0.4/linux
tell kbuild to locate all files in the specified directory, which must exist.
This is also the location of .config, so make sure to copy that one over.
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HOWTO build modules in 2.6.0 ...
2003-11-17 20:33 ` Sam Ravnborg
@ 2003-11-17 23:59 ` John Levon
2003-11-18 5:50 ` Sam Ravnborg
0 siblings, 1 reply; 8+ messages in thread
From: John Levon @ 2003-11-17 23:59 UTC (permalink / raw)
To: Wojciech 'Sas' Cieciwa, linux-kernel
On Mon, Nov 17, 2003 at 09:33:36PM +0100, Sam Ravnborg wrote:
> Use the following:
> make -C /usr/src/linux SUBDIRS=`pwd` O=/users/cieciwa/rpm/BUILD/eagle-1.0.4/linux modules
>
This requires a kernel source tree empty of built files though, so it's
really not a great solution ...
regards
john
--
Khendon's Law:
If the same point is made twice by the same person, the thread is over.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HOWTO build modules in 2.6.0 ...
2003-11-17 23:59 ` John Levon
@ 2003-11-18 5:50 ` Sam Ravnborg
2003-11-18 7:11 ` Ian Kent
2003-11-18 13:39 ` John Levon
0 siblings, 2 replies; 8+ messages in thread
From: Sam Ravnborg @ 2003-11-18 5:50 UTC (permalink / raw)
To: John Levon; +Cc: Wojciech 'Sas' Cieciwa, linux-kernel
On Mon, Nov 17, 2003 at 11:59:27PM +0000, John Levon wrote:
> On Mon, Nov 17, 2003 at 09:33:36PM +0100, Sam Ravnborg wrote:
>
> > Use the following:
> > make -C /usr/src/linux SUBDIRS=`pwd` O=/users/cieciwa/rpm/BUILD/eagle-1.0.4/linux modules
> >
>
> This requires a kernel source tree empty of built files though, so it's
> really not a great solution ...
Correct - but why keep kernel trees around full of build files, when
there is a proper solution to keep them out of the src.
The problem was generated files. If a generated file were present in
the kernel source tree, it would not be built again.
This resulted in a few suprises during development, and I therefore
added the check for a kernel source tree with no built-files.
It can be avoided, but that required too much surgery in various
makefiles and include statements. So that part is 2.7 material.
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HOWTO build modules in 2.6.0 ...
2003-11-18 5:50 ` Sam Ravnborg
@ 2003-11-18 7:11 ` Ian Kent
2003-11-18 13:39 ` John Levon
1 sibling, 0 replies; 8+ messages in thread
From: Ian Kent @ 2003-11-18 7:11 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel
On Tue, 18 Nov 2003, Sam Ravnborg wrote:
> On Mon, Nov 17, 2003 at 11:59:27PM +0000, John Levon wrote:
> > On Mon, Nov 17, 2003 at 09:33:36PM +0100, Sam Ravnborg wrote:
> >
> > > Use the following:
> > > make -C /usr/src/linux SUBDIRS=`pwd` O=/users/cieciwa/rpm/BUILD/eagle-1.0.4/linux modules
> > >
> >
> > This requires a kernel source tree empty of built files though, so it's
> > really not a great solution ...
>
> Correct - but why keep kernel trees around full of build files, when
> there is a proper solution to keep them out of the src.
>
> The problem was generated files. If a generated file were present in
> the kernel source tree, it would not be built again.
> This resulted in a few suprises during development, and I therefore
> added the check for a kernel source tree with no built-files.
> It can be avoided, but that required too much surgery in various
> makefiles and include statements. So that part is 2.7 material.
And this method works for versioned kernels as well without having to
build a new kernel?
--
,-._|\ Ian Kent
/ \ Perth, Western Australia
*_.--._/ E-mail: raven@themaw.net
v Web: http://themaw.net/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HOWTO build modules in 2.6.0 ...
2003-11-18 5:50 ` Sam Ravnborg
2003-11-18 7:11 ` Ian Kent
@ 2003-11-18 13:39 ` John Levon
1 sibling, 0 replies; 8+ messages in thread
From: John Levon @ 2003-11-18 13:39 UTC (permalink / raw)
To: Wojciech 'Sas' Cieciwa, linux-kernel
On Tue, Nov 18, 2003 at 06:50:07AM +0100, Sam Ravnborg wrote:
> > This requires a kernel source tree empty of built files though, so it's
> > really not a great solution ...
>
> Correct - but why keep kernel trees around full of build files, when
> there is a proper solution to keep them out of the src.
Because people *will* have build trees that are in the source directory.
You're effectively requiring everybody to rebuild their kernel using
some new syntax the first time they want to compile an external module.
External modules were compilable fine (if somewhat clumsily) in 2.4
without any special setup; it's a pity that 2.6 regresses in this given
how superior the build system is in every other way.
> It can be avoided, but that required too much surgery in various
> makefiles and include statements. So that part is 2.7 material.
Would allowing non-O= builds to work again be 2.7 too ? It worked up
until very recently.
regards
john
--
Khendon's Law:
If the same point is made twice by the same person, the thread is over.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-11-18 13:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-17 19:00 HOWTO build modules in 2.6.0 Wojciech 'Sas' Cieciwa
2003-11-17 18:05 ` Randy.Dunlap
2003-11-17 18:28 ` David T Hollis
2003-11-17 20:33 ` Sam Ravnborg
2003-11-17 23:59 ` John Levon
2003-11-18 5:50 ` Sam Ravnborg
2003-11-18 7:11 ` Ian Kent
2003-11-18 13:39 ` John Levon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox