* Check handling of kernel build output directory
@ 2007-10-26 17:31 Markus Elfring
2007-10-26 17:36 ` Vegard Nossum
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Markus Elfring @ 2007-10-26 17:31 UTC (permalink / raw)
To: linux-kernel
Hello,
Two ways are mentioned in the Makefile for the Linux kernel 2.6.31.1 to specify output
diretories. The description of the environment variable "KBUILD_OUTPUT" is missing from
the file "README".
I am trying to generate all executable files for the current stable kernel release on my
openSUSE 10.3 system.
Sonne:/usr/src/linux # make mrproper
Sonne:/usr/src/linux # cp -p /boot/config-2.6.23.1-0-adjusted .config
[reactivate backup copy]
Sonne:/usr/src/linux # export KBUILD_OUTPUT=/usr/src/obj/linux/2.6.23.1/x86_64/adjusted
Sonne:/usr/src/linux # make silentoldconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86_64/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel .config file)
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** [silentoldconfig] Error 2
Another try:
Sonne:/usr/src/linux # make oldconfig
[...]
#
# configuration written to .config
#
Sonne:/usr/src/linux # date && echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make -j4
&& echo YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && make -j4 modules_install install &&
echo ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ && date
Fri Oct 26 18:38:18 CEST 2007
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
scripts/kconfig/conf -s arch/x86_64/Kconfig
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86_64
Using /usr/src/linux-2.6.23.1 as source for kernel
/usr/src/linux-2.6.23.1 is not clean, please run 'make mrproper'
in the '/usr/src/linux-2.6.23.1' directory.
make[1]: *** [prepare3] Error 1
make: *** [_all] Error 2
make: INTERNAL: Exiting with 5 jobserver tokens available; should be 4!
Does this error message correspond to the open issue that was described in the bug report
"make randomly fails with interrupted system call on slower filesystems with parallel builds"?
http://savannah.gnu.org/bugs/?14853
When this happens, there is always one more token available than I've specified by the
parameter "-j". If I ommit it, I get the following result.
Sonne:/usr/src/linux # date && echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make &&
echo YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && make modules_install install && echo
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ && date
Fri Oct 26 19:17:18 CEST 2007
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Using /usr/src/linux-2.6.23.1 as source for kernel
/usr/src/linux-2.6.23.1 is not clean, please run 'make mrproper'
in the '/usr/src/linux-2.6.23.1' directory.
make[1]: *** [prepare3] Error 1
make: *** [_all] Error 2
The option to build into a specific output diretory is unusable on my system so far. Would
you like to share any ideas to resolve this unpleasant situation?
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 17:31 Check handling of kernel build output directory Markus Elfring
@ 2007-10-26 17:36 ` Vegard Nossum
2007-10-26 18:40 ` Markus Elfring
2007-10-26 19:05 ` Sam Ravnborg
2007-10-27 11:33 ` Jan Engelhardt
2 siblings, 1 reply; 15+ messages in thread
From: Vegard Nossum @ 2007-10-26 17:36 UTC (permalink / raw)
To: Markus Elfring; +Cc: linux-kernel, kbuild devel list
On 10/26/07, Markus Elfring <Markus.Elfring@web.de> wrote:
> Hello,
>
> Two ways are mentioned in the Makefile for the Linux kernel 2.6.31.1 to specify output
> diretories. The description of the environment variable "KBUILD_OUTPUT" is missing from
> the file "README".
Aren't you supposed to use O= as described by "make help"?
Vegard
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 17:36 ` Vegard Nossum
@ 2007-10-26 18:40 ` Markus Elfring
2007-10-26 19:05 ` Markus Elfring
0 siblings, 1 reply; 15+ messages in thread
From: Markus Elfring @ 2007-10-26 18:40 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-kbuild
> Aren't you supposed to use O= as described by "make help"?
I expect that both ways should work. I find it easier to use the environment variable
"KBUILD_OUTPUT" because the command line parameter does not need to be repeated on each
make invocation.
Anyway - How do you think about my following test result?
Sonne:/usr/src/linux # MY_OUTDIR=/usr/src/obj/linux/2.6.23.1/x86_64/adjusted && rm -rf
$MY_OUTDIR/*
Sonne:/usr/src/linux # unset KBUILD_OUTPUT && make mrproper
CLEAN .config
Sonne:/usr/src/linux # cp -p /boot/config-2.6.23.1-0-adjusted .config
Sonne:/usr/src/linux # make O=$MY_OUTDIR oldconfig && date && echo
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make -j3 O=$MY_OUTDIR && echo
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && make -j3 O=$MY_OUTDIR modules_install install
&& echo ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ && date
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -o arch/x86_64/Kconfig
*
* Linux Kernel Configuration
*
[...]
#
# configuration written to .config
#
Fri Oct 26 20:30:39 CEST 2007
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
scripts/kconfig/conf -s arch/x86_64/Kconfig
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86_64
Using /usr/src/linux-2.6.23.1 as source for kernel
/usr/src/linux-2.6.23.1 is not clean, please run 'make mrproper'
in the '/usr/src/linux-2.6.23.1' directory.
make[1]: *** [prepare3] Error 1
make: *** [_all] Error 2
make: INTERNAL: Exiting with 4 jobserver tokens available; should be 3!
How does any internal status information get inconsistent here?
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 17:31 Check handling of kernel build output directory Markus Elfring
2007-10-26 17:36 ` Vegard Nossum
@ 2007-10-26 19:05 ` Sam Ravnborg
2007-10-26 19:25 ` Markus Elfring
2007-10-27 11:33 ` Jan Engelhardt
2 siblings, 1 reply; 15+ messages in thread
From: Sam Ravnborg @ 2007-10-26 19:05 UTC (permalink / raw)
To: Markus Elfring; +Cc: linux-kernel
Hi Markus.
> Two ways are mentioned in the Makefile for the Linux kernel 2.6.31.1 to specify output
> diretories. The description of the environment variable "KBUILD_OUTPUT" is missing from
> the file "README".
It is on purpose left out - README contains only the most typical stuff.
And no-one has written a "everything you possible want to know about building the kernel"
text yet for some reason :-(
>
> I am trying to generate all executable files for the current stable kernel release on my
> openSUSE 10.3 system.
>
> Sonne:/usr/src/linux # make mrproper
> Sonne:/usr/src/linux # cp -p /boot/config-2.6.23.1-0-adjusted .config
> [reactivate backup copy]
>
> Sonne:/usr/src/linux # export KBUILD_OUTPUT=/usr/src/obj/linux/2.6.23.1/x86_64/adjusted
> Sonne:/usr/src/linux # make silentoldconfig
> HOSTCC scripts/basic/fixdep
> HOSTCC scripts/basic/docproc
> GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
> HOSTCC scripts/kconfig/conf.o
> HOSTCC scripts/kconfig/kxgettext.o
> SHIPPED scripts/kconfig/zconf.tab.c
> SHIPPED scripts/kconfig/lex.zconf.c
> SHIPPED scripts/kconfig/zconf.hash.c
> HOSTCC scripts/kconfig/zconf.tab.o
> HOSTLD scripts/kconfig/conf
> scripts/kconfig/conf -s arch/x86_64/Kconfig
> ***
> *** You have not yet configured your kernel!
> *** (missing kernel .config file)
> ***
> *** Please run some configurator (e.g. "make oldconfig" or
> *** "make menuconfig" or "make xconfig").
> ***
> make[2]: *** [silentoldconfig] Error 1
> make[1]: *** [silentoldconfig] Error 2
> make: *** [silentoldconfig] Error 2
>
So here you do not have a .config file in the directory: /usr/src/obj/linux/2.6.23.1/x86_64/adjusted
So you are told to create one using some of the available methods.
> Another try:
> Sonne:/usr/src/linux # make oldconfig
> [...]
> #
> # configuration written to .config
> #
> Sonne:/usr/src/linux # date && echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make -j4
> && echo YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && make -j4 modules_install install &&
> echo ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ && date
> Fri Oct 26 18:38:18 CEST 2007
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
> scripts/kconfig/conf -s arch/x86_64/Kconfig
> GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
> CHK include/linux/version.h
> UPD include/linux/version.h
> CHK include/linux/utsrelease.h
> UPD include/linux/utsrelease.h
> SYMLINK include/asm -> include/asm-x86_64
> Using /usr/src/linux-2.6.23.1 as source for kernel
> /usr/src/linux-2.6.23.1 is not clean, please run 'make mrproper'
> in the '/usr/src/linux-2.6.23.1' directory.
> make[1]: *** [prepare3] Error 1
> make: *** [_all] Error 2
Here kbuild tells you that "/usr/src/linux-2.6.23.1 is not clean".
This is another way to tell you that the kernel source you are using contains
files that will cause your build to fail later on.
The suggested way to fix it is to run "make mrproper" but in your case you
would then delete all the output files of your vendor supplied kernel.
What you should do in your case is to:
1) Take a full copy of the kernel tree
2) run "make mrproper" in the tree
3) Copy over your adjusted .config
4) make
Then a few minutes later you have a kernel and maybe a few modules.
To install them either use sudo or do so as root:
sudo make modules_install
sudo make install
> make: INTERNAL: Exiting with 5 jobserver tokens available; should be 4!
> Does this error message correspond to the open issue that was described in the bug report
> "make randomly fails with interrupted system call on slower filesystems with parallel builds"?
> http://savannah.gnu.org/bugs/?14853
This is something internal make stuff that is irrelevant in this case.
Sam
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 18:40 ` Markus Elfring
@ 2007-10-26 19:05 ` Markus Elfring
2007-10-27 11:32 ` Jan Engelhardt
0 siblings, 1 reply; 15+ messages in thread
From: Markus Elfring @ 2007-10-26 19:05 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-kbuild
>> Aren't you supposed to use O= as described by "make help"?
>
> I expect that both ways should work. I find it easier to use the environment variable
> "KBUILD_OUTPUT" because the command line parameter does not need to be repeated on each
> make invocation.
A wording correction:
I expect that both ways should work. I find it easier to use the environment variable
"KBUILD_OUTPUT" because it does not need to be repeated on each make invocation like it
must happen with the command line parameter "O=".
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 19:05 ` Sam Ravnborg
@ 2007-10-26 19:25 ` Markus Elfring
2007-10-26 19:47 ` Sam Ravnborg
0 siblings, 1 reply; 15+ messages in thread
From: Markus Elfring @ 2007-10-26 19:25 UTC (permalink / raw)
To: linux-kernel
> So here you do not have a .config file in the directory: /usr/src/obj/linux/2.6.23.1/x86_64/adjusted
> So you are told to create one using some of the available methods.
The README contains the following description.
"...
"make oldconfig" Default all questions based on the contents of
your existing ./.config file and asking about
new config symbols.
"make silentoldconfig"
Like above, but avoids cluttering the screen
with questions already answered.
..."
I did not expect that there are more differences besides the "silence".
> The suggested way to fix it is to run "make mrproper"
I did that clean-up step.
> but in your case you would then delete all the output files of your vendor supplied kernel.
I hope not because I've setup symbolic links to point to the current release as far I know
instead of the release "2.6.22.9-0.4-default" that I am using at the moment.
> This is something internal make stuff that is irrelevant in this case.
It is relevant in my case if I want to use different output directories for parallel
builds from the same source directory.
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 19:25 ` Markus Elfring
@ 2007-10-26 19:47 ` Sam Ravnborg
2007-10-27 5:07 ` Markus Elfring
0 siblings, 1 reply; 15+ messages in thread
From: Sam Ravnborg @ 2007-10-26 19:47 UTC (permalink / raw)
To: Markus Elfring; +Cc: linux-kernel
>
> I did that clean-up step.
You did it in your output directory I assume.
kbuild complains that the source directory is not clean - which
is what you need to clean up.
Sam
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 19:47 ` Sam Ravnborg
@ 2007-10-27 5:07 ` Markus Elfring
2007-10-27 7:23 ` Sam Ravnborg
0 siblings, 1 reply; 15+ messages in thread
From: Markus Elfring @ 2007-10-27 5:07 UTC (permalink / raw)
To: linux-kernel
> You did it in your output directory I assume.
No.
> kbuild complains that the source directory is not clean - which
> is what you need to clean up.
I am looking for the real reasons for the occuring error messages. Let us look at another
test example ...
Sonne:~ # ls -ld /usr/src/linux
lrwxrwxrwx 1 root root 23 Oct 13 10:11 /usr/src/linux -> /usr/src/linux-2.6.23.1
Sonne:~ # cd /usr/src/linux-2.6.23.1
Sonne:/usr/src/linux-2.6.23.1 # unset KBUILD_OUTPUT && make mrproper && cp -p
/boot/config-2.6.23.1-0-adjusted .config && export
KBUILD_OUTPUT=/usr/src/obj/linux/2.6.23.1/x86_64/adjusted && rm -rf $KBUILD_OUTPUT/*
CLEAN .config
Sonne:/usr/src/linux-2.6.23.1 # make oldconfig && date && echo
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make -j2 && echo
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && make -j2 modules_install install && echo
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ && date
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -o arch/x86_64/Kconfig
*
* Linux Kernel Configuration
*
*
* General setup
*
[...]
#
# configuration written to .config
#
Sat Oct 27 06:43:24 CEST 2007
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
scripts/kconfig/conf -s arch/x86_64/Kconfig
GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86_64
Using /usr/src/linux-2.6.23.1 as source for kernel
/usr/src/linux-2.6.23.1 is not clean, please run 'make mrproper'
in the '/usr/src/linux-2.6.23.1' directory.
make[1]: *** [prepare3] Error 1
make: *** [_all] Error 2
make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
Which files are not clean in my situation after the command "make mrproper" was executed
at the beginning?
Which results do you or other software developers get by such test runs on kernel releases
since "2.6.22.9-0.4-default" like it is published by SUSE now?
( I can build the current Linux kernel into my source directory successfully.)
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-27 5:07 ` Markus Elfring
@ 2007-10-27 7:23 ` Sam Ravnborg
2007-10-27 12:30 ` Markus Elfring
2007-10-27 16:00 ` Markus Elfring
0 siblings, 2 replies; 15+ messages in thread
From: Sam Ravnborg @ 2007-10-27 7:23 UTC (permalink / raw)
To: Markus Elfring; +Cc: linux-kernel
Hi Markus.
Please do not edit cc: and to: - it is easy to miss out a mail on lkml.
On Sat, Oct 27, 2007 at 07:07:55AM +0200, Markus Elfring wrote:
> > You did it in your output directory I assume.
>
> No.
>
>
> > kbuild complains that the source directory is not clean - which
> > is what you need to clean up.
>
> I am looking for the real reasons for the occuring error messages. Let us look at another
> test example ...
>
> Sonne:~ # ls -ld /usr/src/linux
> lrwxrwxrwx 1 root root 23 Oct 13 10:11 /usr/src/linux -> /usr/src/linux-2.6.23.1
> Sonne:~ # cd /usr/src/linux-2.6.23.1
> Sonne:/usr/src/linux-2.6.23.1 # unset KBUILD_OUTPUT && make mrproper && cp -p
> /boot/config-2.6.23.1-0-adjusted .config && export
> KBUILD_OUTPUT=/usr/src/obj/linux/2.6.23.1/x86_64/adjusted && rm -rf $KBUILD_OUTPUT/*
> CLEAN .config
> Sonne:/usr/src/linux-2.6.23.1 # make oldconfig && date && echo
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make -j2 && echo
> YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && make -j2 modules_install install && echo
> ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ && date
> HOSTCC scripts/basic/fixdep
> HOSTCC scripts/basic/docproc
> GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
> HOSTCC scripts/kconfig/conf.o
> HOSTCC scripts/kconfig/kxgettext.o
> SHIPPED scripts/kconfig/zconf.tab.c
> SHIPPED scripts/kconfig/lex.zconf.c
> SHIPPED scripts/kconfig/zconf.hash.c
> HOSTCC scripts/kconfig/zconf.tab.o
> HOSTLD scripts/kconfig/conf
> scripts/kconfig/conf -o arch/x86_64/Kconfig
> *
> * Linux Kernel Configuration
> *
> *
> * General setup
> *
> [...]
> #
> # configuration written to .config
> #
> Sat Oct 27 06:43:24 CEST 2007
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
> scripts/kconfig/conf -s arch/x86_64/Kconfig
> GEN /usr/src/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
>From the above we can see that two make's are running in parallel here
where only one should run.
I have seen this before but only in cases where you specified several targets
on the make commandline - which you do not do in the make invocation.
Just to check it you could do a:
$(warning CMD=$(MAKECMDFLAGS)) around the place where SUBARCH is assigned in the
top-level Makefile.
Does the issue by any chance go away if you refrain from the
command && command && command && command && command && command
way of doing things?
The shell _shall_ serialize it - but..
> CHK include/linux/version.h
> UPD include/linux/version.h
> CHK include/linux/utsrelease.h
> UPD include/linux/utsrelease.h
> SYMLINK include/asm -> include/asm-x86_64
> Using /usr/src/linux-2.6.23.1 as source for kernel
> /usr/src/linux-2.6.23.1 is not clean, please run 'make mrproper'
> in the '/usr/src/linux-2.6.23.1' directory.
> make[1]: *** [prepare3] Error 1
> make: *** [_all] Error 2
> make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
>
>
> Which files are not clean in my situation after the command "make mrproper" was executed
> at the beginning?
If you look at the top-level Makefile you will see:
@echo ' Using $(srctree) as source for kernel'
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
echo " $(srctree) is not clean, please run 'make mrproper'";\
echo " in the '$(srctree)' directory.";\
/bin/false; \
fi;
So you either a .config file or the config directory. Older kernels also tested
that the asm symlink in include/ was not present.
You should check that all these indeed are gone when you do "make mrproper" - you
can have been hit by a privilige issue too. But that should not be the case if
you copied the full tree to another place (and of course did not use cp -a).
You did this - yes? And the result?
>
> Which results do you or other software developers get by such test runs on kernel releases
> since "2.6.22.9-0.4-default" like it is published by SUSE now?
> ( I can build the current Linux kernel into my source directory successfully.)
If you now say this is a SUSE specific problem then I suggest asking SUSE for help.
At least I have not built a distribution kernel the last year or more - and I
do not follow what kind of patches they apply.
Sam
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 19:05 ` Markus Elfring
@ 2007-10-27 11:32 ` Jan Engelhardt
2007-10-27 12:21 ` Sam Ravnborg
0 siblings, 1 reply; 15+ messages in thread
From: Jan Engelhardt @ 2007-10-27 11:32 UTC (permalink / raw)
To: Markus Elfring; +Cc: linux-kernel, linux-kbuild
On Oct 26 2007 21:05, Markus Elfring wrote:
>>> Aren't you supposed to use O= as described by "make help"?
>>
>> I expect that both ways should work. I find it easier to use the environment variable
>> "KBUILD_OUTPUT" because the command line parameter does not need to be repeated on each
>> make invocation.
>
>A wording correction:
>I expect that both ways should work. I find it easier to use the environment variable
>"KBUILD_OUTPUT" because it does not need to be repeated on each make invocation like it
>must happen with the command line parameter "O=".
So why not just...
export O=/foo/bar
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-26 17:31 Check handling of kernel build output directory Markus Elfring
2007-10-26 17:36 ` Vegard Nossum
2007-10-26 19:05 ` Sam Ravnborg
@ 2007-10-27 11:33 ` Jan Engelhardt
2007-10-27 12:41 ` Markus Elfring
2 siblings, 1 reply; 15+ messages in thread
From: Jan Engelhardt @ 2007-10-27 11:33 UTC (permalink / raw)
To: Markus Elfring; +Cc: linux-kernel
On Oct 26 2007 19:31, Markus Elfring wrote:
>
>Two ways are mentioned in the Makefile for the Linux kernel 2.6.31.1 to specify output
>diretories. The description of the environment variable "KBUILD_OUTPUT" is missing from
>the file "README".
>
>I am trying to generate all executable files for the current stable kernel release on my
>openSUSE 10.3 system.
>
>Sonne:/usr/src/linux # make mrproper
>Sonne:/usr/src/linux # cp -p /boot/config-2.6.23.1-0-adjusted .config
>[reactivate backup copy]
.config should be copied to the output directory.
>Sonne:/usr/src/linux # export KBUILD_OUTPUT=/usr/src/obj/linux/2.6.23.1/x86_64/adjusted
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-27 11:32 ` Jan Engelhardt
@ 2007-10-27 12:21 ` Sam Ravnborg
0 siblings, 0 replies; 15+ messages in thread
From: Sam Ravnborg @ 2007-10-27 12:21 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Markus Elfring, linux-kernel, linux-kbuild
On Sat, Oct 27, 2007 at 01:32:54PM +0200, Jan Engelhardt wrote:
>
> On Oct 26 2007 21:05, Markus Elfring wrote:
> >>> Aren't you supposed to use O= as described by "make help"?
> >>
> >> I expect that both ways should work. I find it easier to use the environment variable
> >> "KBUILD_OUTPUT" because the command line parameter does not need to be repeated on each
> >> make invocation.
> >
> >A wording correction:
> >I expect that both ways should work. I find it easier to use the environment variable
> >"KBUILD_OUTPUT" because it does not need to be repeated on each make invocation like it
> >must happen with the command line parameter "O=".
>
> So why not just...
> export O=/foo/bar
When introducing the make O=...
I was a bit anal about where the definition of O came from so you will see
that in the top-level Makefile we check if O= is defined at the commandline:
ifdef O
ifeq ("$(origin O)", "command line")
KBUILD_OUTPUT := $(O)
endif
endif
"O" is just too vague to be picked up from the environment.
Sam
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-27 7:23 ` Sam Ravnborg
@ 2007-10-27 12:30 ` Markus Elfring
2007-10-27 16:00 ` Markus Elfring
1 sibling, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2007-10-27 12:30 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-kbuild
> From the above we can see that two make's are running in parallel here
> where only one should run.
Is this a problem here? - I can omit the parameter "-j".
> I have seen this before but only in cases where you specified several targets
> on the make commandline - which you do not do in the make invocation.
> Just to check it you could do a:
> $(warning CMD=$(MAKECMDFLAGS)) around the place where SUBARCH is assigned in the
> top-level Makefile.
elfring@Sonne:~/Projekte/Linux/Kernel/2.6.23.1> unset KBUILD_OUTPUT && make mrproper && cp
-p /boot/config-2.6.23.1-0-adjusted .config && export
KBUILD_OUTPUT=~/Projekte/Linux/Kernel/obj/2.6.23.1/x86_64/adjusted && rm -rf $KBUILD_OUTPUT/*
Makefile:165: CMD=
CLEAN .config
elfring@Sonne:~/Projekte/Linux/Kernel/2.6.23.1> make oldconfig && date && echo
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make && echo
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && date
/home/elfring/Projekte/Linux/Kernel/2.6.23.1/Makefile:165: CMD=
GEN /home/elfring/Projekte/Linux/Kernel/obj/linux/2.6.23.1/x86_64/adjusted/Makefile
scripts/kconfig/conf -o arch/x86_64/Kconfig
*
* Linux Kernel Configuration
*
*
* General setup
*
[...]
#
# configuration written to .config
#
Sa 27. Okt 14:23:51 CEST 2007
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
/home/elfring/Projekte/Linux/Kernel/2.6.23.1/Makefile:165: CMD=
/home/elfring/Projekte/Linux/Kernel/2.6.23.1/Makefile:165: CMD=
GEN /home/elfring/Projekte/Linux/Kernel/obj/2.6.23.1/x86_64/adjusted/Makefile
scripts/kconfig/conf -s arch/x86_64/Kconfig
/home/elfring/Projekte/Linux/Kernel/2.6.23.1/Makefile:165: CMD=
Using /home/elfring/Projekte/Linux/Kernel/2.6.23.1 as source for kernel
/home/elfring/Projekte/Linux/Kernel/2.6.23.1 is not clean, please run 'make mrproper'
in the '/home/elfring/Projekte/Linux/Kernel/2.6.23.1' directory.
make[1]: *** [prepare3] Fehler 1
make: *** [_all] Fehler 2
Are any more steps needed to perform safe Makefile debugging now?
Is the specific number of (recursive) make calls interesting?
elfring@Sonne:~/Projekte/Linux/Kernel/2.6.23.1> unset KBUILD_OUTPUT && make mrproper && cp
-p /boot/config-2.6.23.1-0-adjusted .config && export
KBUILD_OUTPUT=~/Projekte/Linux/Kernel/obj/2.6.23.1/x86_64/adjusted && rm -rf $KBUILD_OUTPUT/*
Makefile:165: CMD=
CLEAN .config
elfring@Sonne:~/Projekte/Linux/Kernel/2.6.23.1> make silentoldconfig && date && echo
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make && echo
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && date
/home/elfring/Projekte/Linux/Kernel/2.6.23.1/Makefile:165: CMD=
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
GEN /home/elfring/Projekte/Linux/Kernel/obj/2.6.23.1/x86_64/adjusted/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86_64/Kconfig
Sa 27. Okt 14:26:53 CEST 2007
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
/home/elfring/Projekte/Linux/Kernel/2.6.23.1/Makefile:165: CMD=
Using /home/elfring/Projekte/Linux/Kernel/2.6.23.1 as source for kernel
/home/elfring/Projekte/Linux/Kernel/2.6.23.1 is not clean, please run 'make mrproper'
in the '/home/elfring/Projekte/Linux/Kernel/2.6.23.1' directory.
make[1]: *** [prepare3] Fehler 1
make: *** [_all] Fehler 2
> Does the issue by any chance go away if you refrain from the
> command && command && command && command && command && command
> way of doing things?
I want to ensure that every command was successfully executed. The return values will be
ignored if the commands are concatenated by the metacharacter ";". I prefer to use "AND
lists" here.
> So you either a .config file or the config directory.
I would expect that both will be generated in my output directory by a command like "make
silentoldconfig". Why is the cleanliness check additionally performed on my source
directory? Should it really matter if I want to concentrate on "objtree"?
> If you now say this is a SUSE specific problem then I suggest asking SUSE for help.
I don't want to say that. I indicated a bit about my runtime environment. Is it more
likely that the Makefile will need an update?
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-27 11:33 ` Jan Engelhardt
@ 2007-10-27 12:41 ` Markus Elfring
0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2007-10-27 12:41 UTC (permalink / raw)
To: linux-kernel
> .config should be copied to the output directory.
This copy will usually happen by a command like "make
O=/usr/src/obj/linux/2.6.23.1/x86_64/adjusted silentoldconfig". It seems that something
runs unusual on my openSUSE 10.3 system when an extra output directory was specified.
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Check handling of kernel build output directory
2007-10-27 7:23 ` Sam Ravnborg
2007-10-27 12:30 ` Markus Elfring
@ 2007-10-27 16:00 ` Markus Elfring
1 sibling, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2007-10-27 16:00 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-kbuild
>> Which files are not clean in my situation after the command "make mrproper" was executed
>> at the beginning?
> If you look at the top-level Makefile you will see:
>
> @echo ' Using $(srctree) as source for kernel'
> $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
> echo " $(srctree) is not clean, please run 'make mrproper'";\
> echo " in the '$(srctree)' directory.";\
> /bin/false; \
> fi;
>
> So you either a .config file or the config directory.
Well, I've thought about another viewpoint. The Makefile insists on the detail that no
configuration files are allowed in the source directory if an output directory was specified.
Original wording:
"...
# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
# 1) Check that make has not been executed in the kernel src $(srctree)
..."
I seems now that my troubles came from the missing decision when to move or delete the
.config file from my source directory. So the following command sequence works for a
completely clean build. (It can be adjusted to support parallel configurations for
debug/release situations as usual.)
elfring@Sonne:~/Projekte/Linux/Kernel/2.6.23.1> unset KBUILD_OUTPUT && make mrproper && cp
-p /boot/config-2.6.23.1-0-adjusted .config && export
KBUILD_OUTPUT=~/Projekte/Linux/Kernel/obj/2.6.23.1/x86_64/adjusted && rm -rf
$KBUILD_OUTPUT/* && make silentoldconfig && rm .config && date && echo
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX && make -j4 && echo
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY && date
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
GEN /home/elfring/Projekte/Linux/Kernel/obj/2.6.23.1/x86_64/adjusted/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86_64/Kconfig
Sa 27. Okt 17:37:38 CEST 2007
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GEN /home/elfring/Projekte/Linux/Kernel/obj/2.6.23.1/x86_64/adjusted/Makefile
[...]
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Sa 27. Okt 17:55:09 CEST 2007
Regards,
Markus
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-10-27 16:00 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 17:31 Check handling of kernel build output directory Markus Elfring
2007-10-26 17:36 ` Vegard Nossum
2007-10-26 18:40 ` Markus Elfring
2007-10-26 19:05 ` Markus Elfring
2007-10-27 11:32 ` Jan Engelhardt
2007-10-27 12:21 ` Sam Ravnborg
2007-10-26 19:05 ` Sam Ravnborg
2007-10-26 19:25 ` Markus Elfring
2007-10-26 19:47 ` Sam Ravnborg
2007-10-27 5:07 ` Markus Elfring
2007-10-27 7:23 ` Sam Ravnborg
2007-10-27 12:30 ` Markus Elfring
2007-10-27 16:00 ` Markus Elfring
2007-10-27 11:33 ` Jan Engelhardt
2007-10-27 12:41 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox