From: Rusty Russell <rusty@rustcorp.com.au>
To: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@muc.de>, Andrew Morton <akpm@linux-foundation.org>,
virtualization <virtualization@lists.osdl.org>
Subject: [PATCH 7 of 7] lguest: Makefile
Date: Sat, 10 Feb 2007 02:21:37 +1100 [thread overview]
Message-ID: <1171034498.2718.187.camel@localhost.localdomain> (raw)
In-Reply-To: <1171034261.2718.182.camel@localhost.localdomain>
[ This has no changes since 6d/10. None! Andi tried to make me change
it, but I defended it. This one patch is unscathed. Bwaha! ]
Finally, we put in the Makefile, so it will build.
There's a small complexity in creating the switcher code
(hypervisor.S) ready to be copied into the top of memory, but
it's not too bad. Really. Stop looking at me like that, Andi.
It's fine as it is.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
===================================================================
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -108,6 +108,7 @@ drivers-$(CONFIG_PCI) += arch/i386/pci
# must be linked after kernel/
drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/
drivers-$(CONFIG_PM) += arch/i386/power/
+drivers-$(CONFIG_LGUEST_GUEST) += arch/i386/lguest/
CFLAGS += $(mflags-y)
AFLAGS += $(mflags-y)
===================================================================
--- /dev/null
+++ b/arch/i386/lguest/Makefile
@@ -0,0 +1,22 @@
+# Guest requires the paravirt_ops replacement and the bus driver.
+obj-$(CONFIG_LGUEST_GUEST) += lguest.o lguest_bus.o
+
+# Host requires the other files, which can be a module.
+obj-$(CONFIG_LGUEST) += lg.o
+lg-objs := core.o hypercalls.o page_tables.o interrupts_and_traps.o \
+ segments.o io.o lguest_user.o
+
+# We use top 4MB for guest traps page, then hypervisor. */
+HYPE_ADDR := (0xFFC00000+4096)
+# The data is only 1k (256 interrupt handler pointers)
+HYPE_DATA_SIZE := 1024
+CFLAGS += -DHYPE_ADDR="$(HYPE_ADDR)" -DHYPE_DATA_SIZE="$(HYPE_DATA_SIZE)"
+
+$(obj)/core.o: $(obj)/hypervisor-blob.c
+# This links the hypervisor in the right place and turns it into a C array.
+$(obj)/hypervisor-raw: $(obj)/hypervisor.o
+ @$(LD) -static -Tdata=`printf %#x $$(($(HYPE_ADDR)))` -Ttext=`printf %#x $$(($(HYPE_ADDR)+$(HYPE_DATA_SIZE)))` -o $@ $< && $(OBJCOPY) -O binary $@
+$(obj)/hypervisor-blob.c: $(obj)/hypervisor-raw
+ @od -tx1 -An -v $< | sed -e 's/^ /0x/' -e 's/$$/,/' -e 's/ /,0x/g' > $@
+
+clean-files := hypervisor-blob.c hypervisor-raw
next prev parent reply other threads:[~2007-02-09 15:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 14:59 [PATCH 0 of 7] lguest host code Rusty Russell
2007-02-09 15:03 ` [PATCH 1 of 7] lguest: Move mce_disabled to asm/mce.h so lguest can use it Rusty Russell
2007-02-09 15:03 ` [PATCH 2 of 7] lguest: Rename cpu_gdt_descr and remove extern declaration from smpboot.c Rusty Russell
2007-02-09 15:04 ` [PATCH 3 of 7] lguest: Remove extern declaration from mm/discontig.c, put in header Rusty Russell
2007-02-09 15:09 ` [PATCH 4 of 7] lguest: Config and headers Rusty Russell
2007-02-09 15:14 ` [PATCH 5 of 7] lguest: the host code (lg.ko) Rusty Russell
2007-02-09 15:17 ` [PATCH 6 of 7] lguest: Guest code Rusty Russell
2007-02-09 15:21 ` Rusty Russell [this message]
2007-02-09 18:15 ` [PATCH 4 of 7] lguest: Config and headers James Morris
2007-02-09 23:41 ` Rusty Russell
2007-02-10 3:45 ` James Morris
2007-02-10 9:33 ` Rusty Russell
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=1171034498.2718.187.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=ak@muc.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox