From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
virtualization@lists.osdl.org
Subject: [PATCH 1/2] Makefile for common loader
Date: Mon, 2 Apr 2007 16:46:10 -0300 [thread overview]
Message-ID: <20070402194610.GB7711@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
This patch moves lguest's loader Makefile one level bellow, and adds
arch-specific code to arch directories
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
--
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
[-- Attachment #2: lgmake.patch --]
[-- Type: text/plain, Size: 1562 bytes --]
--- i386/Makefile 2007-04-02 16:11:56.000000000 -0300
+++ Makefile 2007-04-02 16:11:56.000000000 -0300
@@ -1,12 +1,13 @@
# This creates the demonstration utility "lguest" which runs a Linux guest.
-# We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary.
-# Some shells (dash - ubunu) can't handle numbers that big so we cheat.
-include ../../../.config
-LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000)
-CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \
- -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds
+#we could uname -i, but it seems to return unknown on a bunch locations
+ARCH:=$(shell uname -m | sed s/i[3456]86/i386/)
+
+include $(ARCH)/defines
+
+CFLAGS:=-g -Wall -Wmissing-declarations -Wmissing-prototypes -O3 \
+ -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds -I$(ARCH)
LDLIBS:=-lz
all: lguest.lds lguest
--- /dev/null 2007-04-02 15:35:49.510433377 -0300
+++ i386/defines 2007-04-02 16:13:43.000000000 -0300
@@ -0,0 +1,4 @@
+# We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary.
+# Some shells (dash - ubunu) can't handle numbers that big so we cheat.
+include ../../.config
+LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000)
--- /dev/null 2007-04-02 15:35:49.510433377 -0300
+++ x86_64/defines 2007-04-02 16:11:56.000000000 -0300
@@ -0,0 +1,4 @@
+# For now on x86_64 we'll hard code the location of the lguest binary loader.
+# But when we can get a relocatable kernel, we'll have to work to make this
+# dynamic.
+LGUEST_GUEST_TOP := 0x7f000000
reply other threads:[~2007-04-02 21:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070402194610.GB7711@redhat.com \
--to=gcosta@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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
all inboxes | Powered by JetHome®