Makefile for common loader
Subsystems (2)
PATCH 1/2 Makefile for common loader
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 <[email protected]>
Signature · 3 lines
Glauber de Oliveira Costa Red Hat Inc. "Free as in Freedom"
Makefile +7 -6
@@ -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
defines new file +4 -0
@@ -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)
defines new file +4 -0
@@ -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
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization