Skip to contentSkip to conversation

kbuild updates

PATCH Peter Chubb 3 participants 3 messages Jun 22, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alistair" == Alistair John Strachan <[email protected]> writes:

Alistair> Sam, maybe if there was a way to easily detect whether a Alistair> kernel had been build with or without a different output Alistair> directory, it would be easier to have vendors take this Alistair> change on board. For example, I imagine in the typical case Alistair> whereby no change in build directory is made, you will have Alistair> something like this:

You can do this without any changes:

if [ -d /lib/modules/uname -r/build/include2 ]; then
kerndir=cd /lib/modules/uname -r/build/include2/asm; cd -P../..;/bin/pwd
else
kerndir=cd /lib/modules/uname -r/build; /bin/pwd
fi

But can the include2/asm symlink be made a relative one, please? I frequently build on one machine, then NFS-mount the build tree and run make modules_install somewhere else; I always at present have to convert that link to a relative symlink before doing so.

Signature · 2 lines
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
The technical we do immediately,  the political takes *forever*
#2 lore raw
Quoted 5 lines · Peter Chubb

But can the include2/asm symlink be made a relative one, please? I frequently build on one machine, then NFS-mount the build tree and run make modules_install somewhere else; I always at present have to convert that link to a relative symlink before doing so.

Patch is welcome. I recall having trouble with it when introducing it. But that can have been caused by other issues.

Sam

#3 lore raw
Quoted 8 lines · Sam Ravnborg
Quoted 4 lines · Peter Chubb

But can the include2/asm symlink be made a relative one, please? I frequently build on one machine, then NFS-mount the build tree and run make modules_install somewhere else; I always at present have to convert that link to a relative symlink before doing so.

Patch is welcome. I recall having trouble with it when introducing it. But that can have been caused by other issues.

The same issue exists with the KERNELSRC and KERNELOUTPUT paths in $(objtree)/Makefile: they would also better be relative to each other. In our case we have something like:

	KERNELSRC    := /usr/src/linux-2.6.5-7.79
	KERNELOUTPUT := /usr/src/linux-2.6.5-7.79-obj/i386/default

this would become:

	KERNELSRC    := ../../../linux-2.6.5-7.79
	KERNELOUTPUT := ../linux-2.6.5-7.79-obj/i386/default

I am currently regenerating $(objtree)/Makefile by hand by invoking mkmakefile with the appropriate parameters. The attached script could be used to automate this; it would work equally well for the asm symlink.

Regards,

Signature · 2 lines
Andreas Gruenbacher <[email protected]>
SUSE Labs, SUSE LINUX AG