All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergio Luis <sergio@larces.uece.br>
To: Christian Kujau <lists@nerdbynature.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [build bug] lguest build failure: drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): undefined reference to `LGUEST_PAGES_regs_trapnum'
Date: Sun, 17 Feb 2008 22:31:04 -0300	[thread overview]
Message-ID: <47B8DFD8.6040602@larces.uece.br> (raw)
In-Reply-To: <47B8D99A.3020202@larces.uece.br>

Sergio Luis wrote:
> Christian Kujau wrote:
>> On Sun, 17 Feb 2008, Sergio Luis wrote:
>>> It doesn't fix the problem totally. If we select
>>> Virtualization->Linux hypervisor example code (CONFIG_LGUEST)
>>> as a module, we will get the same build errors,
>> Confirmed, the build errors persist with CONFIG_LGUEST=m and Rusty's
>> patch applied.
>>
>> thanks,
>> Christian.
> 
> This will make sure CONFIG_LGUEST is set when building the linux hypervisor example code as both module and built-in,
> so that the LGUEST_* offsets will be generated for both cases in asm-offset.h.
> I am sure you guys will have a better way to fix this, but anyway... 
> -sergio
> 
> --- linux-2.6.25-rc2.orig/drivers/lguest/Kconfig	2008-02-16 23:21:29.000000000 -0300
> +++ linux-2.6.25-rc2/drivers/lguest/Kconfig	2008-02-17 21:44:57.000000000 -0300
> @@ -1,7 +1,17 @@
>  config LGUEST
> -	tristate "Linux hypervisor example code"
> +	bool "Linux hypervisor"
>  	depends on X86_32 && EXPERIMENTAL && !X86_PAE && FUTEX && !(X86_VISWS || X86_VOYAGER)
> +	default y 
> +	---help---
> +	  This allows you to select the linux hypervisor example code.
> +
> +if LGUEST
> +
> +config LGUEST_HYPERVISOR
> +	tristate "Linux hypervisor example code"
> +	depends on LGUEST
>  	select HVC_DRIVER
> +	default m
>  	---help---
>  	  This is a very simple module which allows you to run
>  	  multiple instances of the same Linux kernel, using the
> @@ -10,3 +20,5 @@
>  	  not "rustyvisor".  See Documentation/lguest/lguest.txt.
>  
>  	  If unsure, say N.  If curious, say M.  If masochistic, say Y.
> +
> +endif # LGUEST
> 
oops. sorry, I just realized I missed the makefile part. I changed the config symbol to CONFIG_LGUEST_HYPERVISOR so I should change it on the makefile as well.
reposting an updated patch for testing:
-sergio


lguest: makes sure CONFIG_LGUEST is defined when building it as a module and built-in into the kernel.
 
This will make sure CONFIG_LGUEST is set when building the linux hypervisor example code as both module and built-in,
so that the LGUEST_* offsets will be generated for both cases in asm-offset.h.

Signed-off-by: Sergio Luis <sergio@larces.uece.br>


 Kconfig  |   14 +++++++++++++-
 Makefile |    2 +-
 2 files changed, 14 insertions(+), 2 deletions(-)


diff -urN linux-2.6.25-rc2.orig/drivers/lguest/Kconfig linux-2.6.25-rc2/drivers/lguest/Kconfig
--- linux-2.6.25-rc2.orig/drivers/lguest/Kconfig	2008-02-16 23:21:29.000000000 -0300
+++ linux-2.6.25-rc2/drivers/lguest/Kconfig	2008-02-17 21:44:57.000000000 -0300
@@ -1,7 +1,17 @@
 config LGUEST
-	tristate "Linux hypervisor example code"
+	bool "Linux hypervisor"
 	depends on X86_32 && EXPERIMENTAL && !X86_PAE && FUTEX && !(X86_VISWS || X86_VOYAGER)
+	default y 
+	---help---
+	  This allows you to select the linux hypervisor example code.
+
+if LGUEST
+
+config LGUEST_HYPERVISOR
+	tristate "Linux hypervisor example code"
+	depends on LGUEST
 	select HVC_DRIVER
+	default m
 	---help---
 	  This is a very simple module which allows you to run
 	  multiple instances of the same Linux kernel, using the
@@ -10,3 +20,5 @@
 	  not "rustyvisor".  See Documentation/lguest/lguest.txt.
 
 	  If unsure, say N.  If curious, say M.  If masochistic, say Y.
+
+endif # LGUEST
diff -urN linux-2.6.25-rc2.orig/drivers/lguest/Makefile linux-2.6.25-rc2/drivers/lguest/Makefile
--- linux-2.6.25-rc2.orig/drivers/lguest/Makefile	2008-02-16 23:21:29.000000000 -0300
+++ linux-2.6.25-rc2/drivers/lguest/Makefile	2008-02-17 22:21:53.000000000 -0300
@@ -2,7 +2,7 @@
 obj-$(CONFIG_LGUEST_GUEST) += lguest_device.o
 
 # Host requires the other files, which can be a module.
-obj-$(CONFIG_LGUEST)	+= lg.o
+obj-$(CONFIG_LGUEST_HYPERVISOR)	+= lg.o
 lg-y = core.o hypercalls.o page_tables.o interrupts_and_traps.o \
 	segments.o lguest_user.o
 




  reply	other threads:[~2008-02-18  1:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 12:45 [build bug] lguest build failure: drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): undefined reference to `LGUEST_PAGES_regs_trapnum' Ingo Molnar
2008-02-01 17:05 ` Ingo Molnar
2008-02-02 12:25   ` Rusty Russell
2008-02-03 20:11   ` Rusty Russell
2008-02-17 13:51     ` Thomas Gleixner
2008-02-17 14:07       ` Sergio Luis
2008-02-17 20:11         ` Christian Kujau
2008-02-18  1:04           ` Sergio Luis
2008-02-18  1:31             ` Sergio Luis [this message]
2008-02-18 22:14               ` Christian Kujau
2008-02-18 22:19                 ` Sergio Luis
2008-02-19 21:20                   ` Christian Kujau
2008-02-19  3:44     ` [PATCH] Fix building lguest as module Tony Breeds
2008-02-19  7:32       ` Ingo Molnar
2008-02-19 13:54         ` Ingo Molnar
2008-02-19 23:35           ` Tony Breeds
2008-02-20  9:33             ` Ingo Molnar
2008-02-20 10:01             ` Ingo Molnar
2008-02-22  5:58               ` Tony Breeds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B8DFD8.6040602@larces.uece.br \
    --to=sergio@larces.uece.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@nerdbynature.de \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.