79 lines
2.4 KiB
Diff
79 lines
2.4 KiB
Diff
From 71eefb84cf695fc1f31b5e78c82ecf767c547997 Mon Sep 17 00:00:00 2001
|
|
From: Mark McLoughlin <markmc@redhat.com>
|
|
Date: Tue, 19 Feb 2008 15:34:32 +0000
|
|
Subject: [PATCH] xen: Add a vmlinuz target
|
|
|
|
Although patches are in progress to allow Xen boot
|
|
a DomU using a bzImage, support for booting a Dom0
|
|
using a bzImage is still a ways off.
|
|
|
|
For now, just add a target to build a gzip-ed ELF
|
|
file which Xen can use to boot both Dom0 and DomU.
|
|
|
|
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
|
|
---
|
|
arch/x86/Makefile | 9 +++++++++
|
|
arch/x86/boot/.gitignore | 1 +
|
|
arch/x86/boot/Makefile | 9 +++++++++
|
|
3 files changed, 19 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
|
|
index f1e739a..14a752e 100644
|
|
--- a/arch/x86/Makefile
|
|
+++ b/arch/x86/Makefile
|
|
@@ -206,6 +206,15 @@ boot := arch/x86/boot
|
|
PHONY += zImage bzImage compressed zlilo bzlilo \
|
|
zdisk bzdisk fdimage fdimage144 fdimage288 isoimage install
|
|
|
|
+ifdef CONFIG_XEN
|
|
+PHONY += vmlinuz
|
|
+all: vmlinuz
|
|
+
|
|
+vmlinuz: KBUILD_IMAGE := $(boot)/vmlinuz
|
|
+vmlinuz: vmlinux
|
|
+ $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
|
|
+endif
|
|
+
|
|
# Default kernel to build
|
|
all: bzImage
|
|
|
|
diff --git a/arch/x86/boot/.gitignore b/arch/x86/boot/.gitignore
|
|
index b1bdc4c..35e7956 100644
|
|
--- a/arch/x86/boot/.gitignore
|
|
+++ b/arch/x86/boot/.gitignore
|
|
@@ -6,3 +6,4 @@ setup.bin
|
|
setup
|
|
setup.bin
|
|
setup.elf
|
|
+vmlinuz
|
|
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
|
|
index f88458e..61bba92 100644
|
|
--- a/arch/x86/boot/Makefile
|
|
+++ b/arch/x86/boot/Makefile
|
|
@@ -26,6 +26,7 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
|
|
#RAMDISK := -DRAMDISK=512
|
|
|
|
targets := vmlinux.bin setup.bin setup.elf zImage bzImage
|
|
+targets += vmlinuz vmlinux-stripped
|
|
subdir- := compressed
|
|
|
|
setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
|
|
@@ -105,6 +106,14 @@ $(obj)/setup.bin: $(obj)/setup.elf FORCE
|
|
$(obj)/compressed/vmlinux: FORCE
|
|
$(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
|
|
|
|
+$(obj)/vmlinuz: $(obj)/vmlinux-stripped FORCE
|
|
+ $(call if_changed,gzip)
|
|
+ @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
|
|
+
|
|
+$(obj)/vmlinux-stripped: OBJCOPYFLAGS := -g --strip-unneeded
|
|
+$(obj)/vmlinux-stripped: vmlinux FORCE
|
|
+ $(call if_changed,objcopy)
|
|
+
|
|
# Set this if you want to pass append arguments to the zdisk/fdimage/isoimage kernel
|
|
FDARGS =
|
|
# Set this if you want an initrd included with the zdisk/fdimage/isoimage kernel
|
|
--
|
|
1.5.4.1
|
|
|