* [patch 4/9] lguest: the asm offsets
@ 2007-05-09 9:51 akpm
2007-05-09 20:46 ` Sam Ravnborg
0 siblings, 1 reply; 11+ messages in thread
From: akpm @ 2007-05-09 9:51 UTC (permalink / raw)
To: linux-kernel; +Cc: virtualization, akpm, rusty, ak
From: Rusty Russell <rusty@rustcorp.com.au>
This is the structure offsets required by lg.ko's switcher.S.
Unfortunately we don't have infrastructure for private asm-offsets
creation.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/i386/kernel/asm-offsets.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff -puN arch/i386/kernel/asm-offsets.c~lguest-the-asm-offsets arch/i386/kernel/asm-offsets.c
--- a/arch/i386/kernel/asm-offsets.c~lguest-the-asm-offsets
+++ a/arch/i386/kernel/asm-offsets.c
@@ -17,6 +17,10 @@
#include <asm/pgtable.h>
#include <asm/thread_info.h>
#include <asm/elf.h>
+#ifdef CONFIG_LGUEST_GUEST
+#include <linux/lguest.h>
+#include "../../../drivers/lguest/lg.h"
+#endif
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -116,4 +120,19 @@ void foo(void)
OFFSET(PARAVIRT_iret, paravirt_ops, iret);
OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0);
#endif
+
+#ifdef CONFIG_LGUEST_GUEST
+ BLANK();
+ OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled);
+ OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
+ OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
+ OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3);
+ OFFSET(LGUEST_PAGES_host_sp, lguest_pages, state.host_sp);
+ OFFSET(LGUEST_PAGES_guest_gdt_desc, lguest_pages,state.guest_gdt_desc);
+ OFFSET(LGUEST_PAGES_guest_idt_desc, lguest_pages,state.guest_idt_desc);
+ OFFSET(LGUEST_PAGES_guest_gdt, lguest_pages, state.guest_gdt);
+ OFFSET(LGUEST_PAGES_regs_trapnum, lguest_pages, regs.trapnum);
+ OFFSET(LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode);
+ OFFSET(LGUEST_PAGES_regs, lguest_pages, regs);
+#endif
}
_
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [patch 4/9] lguest: the asm offsets 2007-05-09 9:51 [patch 4/9] lguest: the asm offsets akpm @ 2007-05-09 20:46 ` Sam Ravnborg 2007-05-10 0:09 ` Rusty Russell 0 siblings, 1 reply; 11+ messages in thread From: Sam Ravnborg @ 2007-05-09 20:46 UTC (permalink / raw) To: akpm; +Cc: linux-kernel, virtualization, rusty, ak On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote: > From: Rusty Russell <rusty@rustcorp.com.au> > > This is the structure offsets required by lg.ko's switcher.S. > > Unfortunately we don't have infrastructure for private asm-offsets > creation. Someone maybe it was Oleg? did an OK job to abstract out asm-offset generation. I asked to have it rebased but never heard anything back. I would like to get this generic approach in and then let lguest use it. But I do not see this as a reason to hold back inclusion in -linus. But could we please get rid of the "../../../" in the include.... Sam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 4/9] lguest: the asm offsets 2007-05-09 20:46 ` Sam Ravnborg @ 2007-05-10 0:09 ` Rusty Russell 2007-06-11 12:49 ` Oleg Verych 0 siblings, 1 reply; 11+ messages in thread From: Rusty Russell @ 2007-05-10 0:09 UTC (permalink / raw) To: Sam Ravnborg; +Cc: akpm, linux-kernel, virtualization, ak On Wed, 2007-05-09 at 22:46 +0200, Sam Ravnborg wrote: > On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote: > > From: Rusty Russell <rusty@rustcorp.com.au> > > > > This is the structure offsets required by lg.ko's switcher.S. > > > > Unfortunately we don't have infrastructure for private asm-offsets > > creation. > Someone maybe it was Oleg? did an OK job to abstract out asm-offset > generation. I asked to have it rebased but never heard anything back. > > I would like to get this generic approach in and then let lguest use it. > But I do not see this as a reason to hold back inclusion in -linus. Hi Sam, Yeah, I never heard back either. And I'm reluctant to try to fix it myself: I've never managed to patch the build system without causing you to rewrite it better 8) > But could we please get rid of the "../../../" in the include.... Sure: but how? It's a private internal include for the lg.ko module. Thanks! Rusty. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 4/9] lguest: the asm offsets 2007-05-10 0:09 ` Rusty Russell @ 2007-06-11 12:49 ` Oleg Verych 2007-06-11 12:59 ` Sam Ravnborg 0 siblings, 1 reply; 11+ messages in thread From: Oleg Verych @ 2007-06-11 12:49 UTC (permalink / raw) To: Rusty Russell, Sam Ravnborg; +Cc: akpm, linux-kernel, virtualization, ak * Date: Thu, 10 May 2007 10:09:39 +1000 > > On Wed, 2007-05-09 at 22:46 +0200, Sam Ravnborg wrote: >> On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote: >> > From: Rusty Russell <rusty@rustcorp.com.au> >> > >> > This is the structure offsets required by lg.ko's switcher.S. >> > >> > Unfortunately we don't have infrastructure for private asm-offsets >> > creation. >> Someone maybe it was Oleg? did an OK job to abstract out asm-offset >> generation. I asked to have it rebased but never heard anything back. >> >> I would like to get this generic approach in and then let lguest use it. >> But I do not see this as a reason to hold back inclusion in -linus. > > Hi Sam, > > Yeah, I never heard back either. And I'm reluctant to try to fix it > myself: I've never managed to patch the build system without causing you > to rewrite it better 8) If it's still open, i can try, after getting back from RL and 28k LKML backlog ;) ____ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 4/9] lguest: the asm offsets 2007-06-11 12:49 ` Oleg Verych @ 2007-06-11 12:59 ` Sam Ravnborg 2007-06-12 10:31 ` [patch] kbuild: remember ARCH in the object directory Oleg Verych 0 siblings, 1 reply; 11+ messages in thread From: Sam Ravnborg @ 2007-06-11 12:59 UTC (permalink / raw) To: Oleg Verych; +Cc: Rusty Russell, akpm, linux-kernel, virtualization, ak On Mon, Jun 11, 2007 at 02:49:32PM +0200, Oleg Verych wrote: > * Date: Thu, 10 May 2007 10:09:39 +1000 > > > > On Wed, 2007-05-09 at 22:46 +0200, Sam Ravnborg wrote: > >> On Wed, May 09, 2007 at 02:51:36AM -0700, akpm@linux-foundation.org wrote: > >> > From: Rusty Russell <rusty@rustcorp.com.au> > >> > > >> > This is the structure offsets required by lg.ko's switcher.S. > >> > > >> > Unfortunately we don't have infrastructure for private asm-offsets > >> > creation. > >> Someone maybe it was Oleg? did an OK job to abstract out asm-offset > >> generation. I asked to have it rebased but never heard anything back. > >> > >> I would like to get this generic approach in and then let lguest use it. > >> But I do not see this as a reason to hold back inclusion in -linus. > > > > Hi Sam, > > > > Yeah, I never heard back either. And I'm reluctant to try to fix it > > myself: I've never managed to patch the build system without causing you > > to rewrite it better 8) > > If it's still open, i can try, after getting back from RL and 28k LKML > backlog ;) Hi Olg. Please do so. Thanks, Sam ^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch] kbuild: remember ARCH in the object directory 2007-06-11 12:59 ` Sam Ravnborg @ 2007-06-12 10:31 ` Oleg Verych 2007-06-12 15:04 ` Randy Dunlap 2007-06-12 16:12 ` Randy Dunlap 0 siblings, 2 replies; 11+ messages in thread From: Oleg Verych @ 2007-06-12 10:31 UTC (permalink / raw) To: Sam Ravnborg; +Cc: Rusty Russell, LKML, kbuild-devel [patch] kbuild: remember ARCH in the object directory - rephrase some related (misspelled) comments, - remove all trailing whitespace in the top Makefile, * remember ARCH in the output directory, thus making build of i386 on amd64 *actually* convenient, - harmless refactoring of the Makefile generating. Signed-off-by: Oleg Verych <olecom@flower.upol.cz> --- -o--=O`C /. .\ #oo'L O o <___=E M ^-- Just lazy typing `make ARCH=i386` every time i want to check lguest. Makefile | 17 ++++++++--------- scripts/mkmakefile | 42 ++++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 27 deletions(-) Index: linux-2.6.22-rc4-mm2/scripts/mkmakefile =================================================================== --- linux-2.6.22-rc4-mm2.orig/scripts/mkmakefile 2007-06-12 11:21:27.755466250 +0200 +++ linux-2.6.22-rc4-mm2/scripts/mkmakefile 2007-06-12 12:04:13.675826250 +0200 @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/sh -e # Generates a small Makefile used in the root of the output -# directory, to allow make to be started from there. -# The Makefile also allow for more convinient build of external modules +# directory, to allow kernel build to be started from there. +# External modules can't built with it as well. # Usage @@ -9,28 +9,34 @@ # $3 - version # $4 - patchlevel +# $5 - ARCH +set -e -test ! -r $2/Makefile -o -O $2/Makefile || exit 0 echo " GEN $2/Makefile" +echo "# +# Automatically generated by +# $0 +# +VERSION = $3 +PATCHLEVEL = $4 + +KERNELSRC = $1 +KERNELOUTPUT = $2 +ARCH = $5 +" >$2/Makefile -cat << EOF > $2/Makefile -# Automatically generated by $0: don't edit +cat << "EOF" >> $2/Makefile +MAKEFLAGS += -rR --no-print-directory -VERSION = $3 -PATCHLEVEL = $4 +export ARCH -KERNELSRC := $1 -KERNELOUTPUT := $2 - -MAKEFLAGS += --no-print-directory +all: + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) -.PHONY: all \$(MAKECMDGOALS) +$(filter-out all Makefile,$(MAKECMDGOALS)) %/: + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $@ -all: - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) +.PHONY: all $(MAKECMDGOALS) Makefile:; - -\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/: - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@ EOF Index: linux-2.6.22-rc4-mm2/Makefile =================================================================== --- linux-2.6.22-rc4-mm2.orig/Makefile 2007-06-12 11:35:20.559513250 +0200 +++ linux-2.6.22-rc4-mm2/Makefile 2007-06-12 11:51:10.438877000 +0200 @@ -156,5 +156,5 @@ export srctree objtree VPATH TOPDIR # first, and if a usermode build is happening, the "ARCH=um" on the command # line overrides the setting of ARCH below. If a native build is happening, -# then ARCH is assigned, getting whatever value it gets normally, and +# then ARCH is assigned, getting whatever value it gets normally, and # SUBARCH is subsequently ignored. @@ -242,5 +242,5 @@ export KBUILD_CHECKSRC KBUILD_SRC KBUILD # # If $(quiet) is empty, the whole command will be printed. -# If it is set to "quiet_", only the short version will be printed. +# If it is set to "quiet_", only the short version will be printed. # If it is set to "silent_", nothing will be printed at all, since # the variable $(silent_cmd_cc_o_c) doesn't exist. @@ -352,11 +352,10 @@ scripts/basic/%: scripts_basic ; PHONY += outputmakefile -# outputmakefile generates a Makefile in the output directory, if using a -# separate output directory. This allows convenient use of make in the -# output directory. outputmakefile: +# generate a Makefile in the output directory, if using a +# separate output directory; allows convenient use of make there ifneq ($(KBUILD_SRC),) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) + $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) $(ARCH) endif @@ -699,5 +698,5 @@ endef cmd_ksym_ld = $(cmd_vmlinux__) define rule_ksym_ld - : + : +$(call cmd,vmlinux_version) $(call cmd,vmlinux__) @@ -750,5 +749,5 @@ endif $(Q)rm -f .old_version -# The actual objects are generated when descending, +# The actual objects are generated when descending, # make sure no implicit rule kicks in $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; @@ -1454,5 +1453,5 @@ endif $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost -# FIXME Should go into a make.lib or something +# FIXME Should go into a make.lib or something # =========================================================================== ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] kbuild: remember ARCH in the object directory 2007-06-12 10:31 ` [patch] kbuild: remember ARCH in the object directory Oleg Verych @ 2007-06-12 15:04 ` Randy Dunlap 2007-06-12 16:12 ` Randy Dunlap 1 sibling, 0 replies; 11+ messages in thread From: Randy Dunlap @ 2007-06-12 15:04 UTC (permalink / raw) To: Oleg Verych; +Cc: Sam Ravnborg, Rusty Russell, LKML, kbuild-devel On Tue, 12 Jun 2007 12:31:56 +0200 Oleg Verych wrote: > [patch] kbuild: remember ARCH in the object directory > > - rephrase some related (misspelled) comments, > - remove all trailing whitespace in the top Makefile, > > * remember ARCH in the output directory, thus making build of i386 > on amd64 *actually* convenient, > > - harmless refactoring of the Makefile generating. > > Signed-off-by: Oleg Verych <olecom@flower.upol.cz> > --- > > Just lazy typing `make ARCH=i386` every time i want to check lguest. Hi Oleg, So does this only work when O= is used? I had tried to modify Makefile(s) to use the include/asm symlink if it exists, so that 'make ARCH=i386' is not needed after the symlink is created, but I never got that to work. Thanks, this is useful in any case (not yet tested though). > Makefile | 17 ++++++++--------- > scripts/mkmakefile | 42 ++++++++++++++++++++++++------------------ > 2 files changed, 32 insertions(+), 27 deletions(-) > > Index: linux-2.6.22-rc4-mm2/scripts/mkmakefile > =================================================================== > --- linux-2.6.22-rc4-mm2.orig/scripts/mkmakefile 2007-06-12 11:21:27.755466250 +0200 > +++ linux-2.6.22-rc4-mm2/scripts/mkmakefile 2007-06-12 12:04:13.675826250 +0200 > @@ -1,6 +1,6 @@ > -#!/bin/sh > +#!/bin/sh -e > # Generates a small Makefile used in the root of the output > -# directory, to allow make to be started from there. > -# The Makefile also allow for more convinient build of external modules > +# directory, to allow kernel build to be started from there. > +# External modules can't built with it as well. > > # Usage > @@ -9,28 +9,34 @@ > # $3 - version > # $4 - patchlevel > +# $5 - ARCH > > +set -e > > -test ! -r $2/Makefile -o -O $2/Makefile || exit 0 > echo " GEN $2/Makefile" > +echo "# > +# Automatically generated by > +# $0 > +# > +VERSION = $3 > +PATCHLEVEL = $4 > + > +KERNELSRC = $1 > +KERNELOUTPUT = $2 > +ARCH = $5 > +" >$2/Makefile > > -cat << EOF > $2/Makefile > -# Automatically generated by $0: don't edit > +cat << "EOF" >> $2/Makefile > +MAKEFLAGS += -rR --no-print-directory > > -VERSION = $3 > -PATCHLEVEL = $4 > +export ARCH > > -KERNELSRC := $1 > -KERNELOUTPUT := $2 > - > -MAKEFLAGS += --no-print-directory > +all: > + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) > > -.PHONY: all \$(MAKECMDGOALS) > +$(filter-out all Makefile,$(MAKECMDGOALS)) %/: > + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $@ > > -all: > - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) > +.PHONY: all $(MAKECMDGOALS) > > Makefile:; > - > -\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/: > - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@ > EOF --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] kbuild: remember ARCH in the object directory 2007-06-12 10:31 ` [patch] kbuild: remember ARCH in the object directory Oleg Verych 2007-06-12 15:04 ` Randy Dunlap @ 2007-06-12 16:12 ` Randy Dunlap 2007-06-12 17:19 ` Oleg Verych 1 sibling, 1 reply; 11+ messages in thread From: Randy Dunlap @ 2007-06-12 16:12 UTC (permalink / raw) To: Oleg Verych; +Cc: Sam Ravnborg, Rusty Russell, LKML, kbuild-devel On Tue, 12 Jun 2007 12:31:56 +0200 Oleg Verych wrote: > [patch] kbuild: remember ARCH in the object directory > > - rephrase some related (misspelled) comments, > - remove all trailing whitespace in the top Makefile, > > * remember ARCH in the output directory, thus making build of i386 > on amd64 *actually* convenient, > > - harmless refactoring of the Makefile generating. > > Signed-off-by: Oleg Verych <olecom@flower.upol.cz> > --- > > Just lazy typing `make ARCH=i386` every time i want to check lguest. > > Makefile | 17 ++++++++--------- > scripts/mkmakefile | 42 ++++++++++++++++++++++++------------------ > 2 files changed, 32 insertions(+), 27 deletions(-) I did: # build a linux-2.6.22-rc4-git4 kernel source tree & cd into it # mkdir BLD $ make ARCH=i386 O=BLD defconfig $ make -j4 O=BLD all >BLD/bld.out 2>&1 and it cried to me: GEN /scsi/linsrc/linux-2.6.22-rc4-git4/BLD/Makefile scripts/kconfig/conf -s arch/x86_64/Kconfig #... many config warning lines * * Restart config... * * * Processor type and features * Subarchitecture Type > 1. PC-compatible (X86_PC) 2. Support for ScaleMP vSMP (X86_VSMP) (NEW) choice[1-2]: aborted! Console input/output is redirected. Run 'make oldconfig' to update configuration. make[3]: *** [silentoldconfig] Error 1 make[2]: *** [silentoldconfig] Error 2 make[1]: *** [include/config/auto.conf] Error 2 make: *** [all] Error 2 I.e., see the line above that says: scripts/kconfig/conf -s arch/x86_64/Kconfig It defaulted to ARCH=x86_64 even though BLD/Makefile contained: ARCH = i386 What did I do wrong?? > Index: linux-2.6.22-rc4-mm2/scripts/mkmakefile > =================================================================== > --- linux-2.6.22-rc4-mm2.orig/scripts/mkmakefile 2007-06-12 11:21:27.755466250 +0200 > +++ linux-2.6.22-rc4-mm2/scripts/mkmakefile 2007-06-12 12:04:13.675826250 +0200 > @@ -1,6 +1,6 @@ > -#!/bin/sh > +#!/bin/sh -e > # Generates a small Makefile used in the root of the output > -# directory, to allow make to be started from there. > -# The Makefile also allow for more convinient build of external modules > +# directory, to allow kernel build to be started from there. > +# External modules can't built with it as well. > > # Usage > @@ -9,28 +9,34 @@ > # $3 - version > # $4 - patchlevel > +# $5 - ARCH > > +set -e > > -test ! -r $2/Makefile -o -O $2/Makefile || exit 0 > echo " GEN $2/Makefile" > +echo "# > +# Automatically generated by > +# $0 > +# > +VERSION = $3 > +PATCHLEVEL = $4 > + > +KERNELSRC = $1 > +KERNELOUTPUT = $2 > +ARCH = $5 > +" >$2/Makefile > > -cat << EOF > $2/Makefile > -# Automatically generated by $0: don't edit > +cat << "EOF" >> $2/Makefile > +MAKEFLAGS += -rR --no-print-directory > > -VERSION = $3 > -PATCHLEVEL = $4 > +export ARCH > > -KERNELSRC := $1 > -KERNELOUTPUT := $2 > - > -MAKEFLAGS += --no-print-directory > +all: > + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) > > -.PHONY: all \$(MAKECMDGOALS) > +$(filter-out all Makefile,$(MAKECMDGOALS)) %/: > + $(MAKE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $@ > > -all: > - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) > +.PHONY: all $(MAKECMDGOALS) > > Makefile:; > - > -\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/: > - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@ > EOF > Index: linux-2.6.22-rc4-mm2/Makefile > =================================================================== > --- linux-2.6.22-rc4-mm2.orig/Makefile 2007-06-12 11:35:20.559513250 +0200 > +++ linux-2.6.22-rc4-mm2/Makefile 2007-06-12 11:51:10.438877000 +0200 > @@ -156,5 +156,5 @@ export srctree objtree VPATH TOPDIR > # first, and if a usermode build is happening, the "ARCH=um" on the command > # line overrides the setting of ARCH below. If a native build is happening, > -# then ARCH is assigned, getting whatever value it gets normally, and > +# then ARCH is assigned, getting whatever value it gets normally, and > # SUBARCH is subsequently ignored. > > @@ -242,5 +242,5 @@ export KBUILD_CHECKSRC KBUILD_SRC KBUILD > # > # If $(quiet) is empty, the whole command will be printed. > -# If it is set to "quiet_", only the short version will be printed. > +# If it is set to "quiet_", only the short version will be printed. > # If it is set to "silent_", nothing will be printed at all, since > # the variable $(silent_cmd_cc_o_c) doesn't exist. > @@ -352,11 +352,10 @@ scripts/basic/%: scripts_basic ; > > PHONY += outputmakefile > -# outputmakefile generates a Makefile in the output directory, if using a > -# separate output directory. This allows convenient use of make in the > -# output directory. > outputmakefile: > +# generate a Makefile in the output directory, if using a > +# separate output directory; allows convenient use of make there > ifneq ($(KBUILD_SRC),) > $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ > - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) > + $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) $(ARCH) > endif > > @@ -699,5 +698,5 @@ endef > cmd_ksym_ld = $(cmd_vmlinux__) > define rule_ksym_ld > - : > + : > +$(call cmd,vmlinux_version) > $(call cmd,vmlinux__) > @@ -750,5 +749,5 @@ endif > $(Q)rm -f .old_version > > -# The actual objects are generated when descending, > +# The actual objects are generated when descending, > # make sure no implicit rule kicks in > $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; > @@ -1454,5 +1453,5 @@ endif > $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost > > -# FIXME Should go into a make.lib or something > +# FIXME Should go into a make.lib or something > # =========================================================================== > --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] kbuild: remember ARCH in the object directory 2007-06-12 16:12 ` Randy Dunlap @ 2007-06-12 17:19 ` Oleg Verych 2007-06-12 18:09 ` Sam Ravnborg 0 siblings, 1 reply; 11+ messages in thread From: Oleg Verych @ 2007-06-12 17:19 UTC (permalink / raw) To: Randy Dunlap; +Cc: Sam Ravnborg, Rusty Russell, LKML, kbuild-devel On Tue, Jun 12, 2007 at 09:12:09AM -0700, Randy Dunlap wrote: [] > I did: > > # build a linux-2.6.22-rc4-git4 kernel source tree & cd into it > # mkdir BLD > $ make ARCH=i386 O=BLD defconfig > $ make -j4 O=BLD all >BLD/bld.out 2>&1 > > and it cried to me: > > GEN /scsi/linsrc/linux-2.6.22-rc4-git4/BLD/Makefile > scripts/kconfig/conf -s arch/x86_64/Kconfig > #... many config warning lines > * > * Restart config... > * > * > * Processor type and features > * > Subarchitecture Type > > 1. PC-compatible (X86_PC) > 2. Support for ScaleMP vSMP (X86_VSMP) (NEW) > choice[1-2]: aborted! > > Console input/output is redirected. Run 'make oldconfig' to update configuration. > > make[3]: *** [silentoldconfig] Error 1 > make[2]: *** [silentoldconfig] Error 2 > make[1]: *** [include/config/auto.conf] Error 2 > make: *** [all] Error 2 > [] > What did I do wrong?? That Makefile is used only, if you are *in* that obj. directory. Thus `cd BLD` is what you've forget. There must be a better way to have this kind of choice be saved, but it's chicken-and-egg issue from the kconfig POV. As i'm always try to use separate obj. dir., i've made life easier *in* it. ____ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch] kbuild: remember ARCH in the object directory 2007-06-12 17:19 ` Oleg Verych @ 2007-06-12 18:09 ` Sam Ravnborg 2007-06-13 2:12 ` [kbuild-devel] " H. Peter Anvin 0 siblings, 1 reply; 11+ messages in thread From: Sam Ravnborg @ 2007-06-12 18:09 UTC (permalink / raw) To: Oleg Verych; +Cc: Randy Dunlap, Rusty Russell, LKML, kbuild-devel On Tue, Jun 12, 2007 at 07:19:22PM +0200, Oleg Verych wrote: > On Tue, Jun 12, 2007 at 09:12:09AM -0700, Randy Dunlap wrote: > [] > > I did: > > > > # build a linux-2.6.22-rc4-git4 kernel source tree & cd into it > > # mkdir BLD > > $ make ARCH=i386 O=BLD defconfig > > $ make -j4 O=BLD all >BLD/bld.out 2>&1 > > > > and it cried to me: > > > > GEN /scsi/linsrc/linux-2.6.22-rc4-git4/BLD/Makefile > > scripts/kconfig/conf -s arch/x86_64/Kconfig > > #... many config warning lines > > * > > * Restart config... > > * > > * > > * Processor type and features > > * > > Subarchitecture Type > > > 1. PC-compatible (X86_PC) > > 2. Support for ScaleMP vSMP (X86_VSMP) (NEW) > > choice[1-2]: aborted! > > > > Console input/output is redirected. Run 'make oldconfig' to update configuration. > > > > make[3]: *** [silentoldconfig] Error 1 > > make[2]: *** [silentoldconfig] Error 2 > > make[1]: *** [include/config/auto.conf] Error 2 > > make: *** [all] Error 2 > > > [] > > > What did I do wrong?? > > That Makefile is used only, if you are *in* that obj. directory. > Thus `cd BLD` is what you've forget. > > There must be a better way to have this kind of choice be saved, > but it's chicken-and-egg issue from the kconfig POV. > > As i'm always try to use separate obj. dir., i've made life easier > *in* it. I fully agree with the intent of the patch. But it fails exactly because it introduce different behaviour dependent of actual usage. For non O= build ARCH is not saved and does not work For make O= it does not work For make in the output dir it works For external modules it does not work This will greatly confuse people. If we go the "save important parts of the config" I prefer something along the suggestion by hpa with a config file. The config file should though be named along the lines of Kbuild.config and the syntax should be future proof. I like the syntax of the .git/config file and it should be along these lines. And the bahavior should be exactly the same for all uses listed above. Sam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [kbuild-devel] [patch] kbuild: remember ARCH in the object directory 2007-06-12 18:09 ` Sam Ravnborg @ 2007-06-13 2:12 ` H. Peter Anvin 0 siblings, 0 replies; 11+ messages in thread From: H. Peter Anvin @ 2007-06-13 2:12 UTC (permalink / raw) To: Sam Ravnborg; +Cc: Oleg Verych, Randy Dunlap, Rusty Russell, kbuild-devel, LKML Sam Ravnborg wrote: > > If we go the "save important parts of the config" I prefer > something along the suggestion by hpa with a config file. > The config file should though be named along the lines > of Kbuild.config and the syntax should be future proof. > I like the syntax of the .git/config file and > it should be along these lines. > It's actually derived from the Windows 3.x config file. I think it's massive overkill for this purpose; since the variables can be set on the command line we're not dealing with multiple namespaces, and it would be better to have a make-like syntax. -hpa ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-06-13 2:12 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-05-09 9:51 [patch 4/9] lguest: the asm offsets akpm 2007-05-09 20:46 ` Sam Ravnborg 2007-05-10 0:09 ` Rusty Russell 2007-06-11 12:49 ` Oleg Verych 2007-06-11 12:59 ` Sam Ravnborg 2007-06-12 10:31 ` [patch] kbuild: remember ARCH in the object directory Oleg Verych 2007-06-12 15:04 ` Randy Dunlap 2007-06-12 16:12 ` Randy Dunlap 2007-06-12 17:19 ` Oleg Verych 2007-06-12 18:09 ` Sam Ravnborg 2007-06-13 2:12 ` [kbuild-devel] " H. Peter Anvin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox