xen_pvh: Add build runes for grub-core

Add the modifications to the build system needed to build a xen_pvh
grub.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Hans van Kranenburg <hans@knorrie.org>
This commit is contained in:
Juergen Gross 2018-12-07 13:11:43 +01:00 committed by Daniel Kiper
parent 1d2473a024
commit 9c062ad42c
3 changed files with 49 additions and 2 deletions

View file

@ -28,7 +28,7 @@ import re
GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
"i386_multiboot", "i386_ieee1275", "x86_64_efi", "i386_multiboot", "i386_ieee1275", "x86_64_efi",
"i386_xen", "x86_64_xen", "i386_xen", "x86_64_xen", "i386_xen_pvh",
"mips_loongson", "sparc64_ieee1275", "mips_loongson", "sparc64_ieee1275",
"powerpc_ieee1275", "mips_arc", "ia64_efi", "powerpc_ieee1275", "mips_arc", "ia64_efi",
"mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi", "mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi",
@ -71,7 +71,7 @@ GROUPS["videomodules"] = GRUB_PLATFORMS[:];
for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i) for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
# Similar for terminfo # Similar for terminfo
GROUPS["terminfoinkernel"] = [ "emu", "mips_loongson", "mips_arc", "mips_qemu_mips" ] + GROUPS["xen"] + GROUPS["ieee1275"] + GROUPS["uboot"]; GROUPS["terminfoinkernel"] = [ "emu", "mips_loongson", "mips_arc", "mips_qemu_mips", "i386_xen_pvh" ] + GROUPS["xen"] + GROUPS["ieee1275"] + GROUPS["uboot"];
GROUPS["terminfomodule"] = GRUB_PLATFORMS[:]; GROUPS["terminfomodule"] = GRUB_PLATFORMS[:];
for i in GROUPS["terminfoinkernel"]: GROUPS["terminfomodule"].remove(i) for i in GROUPS["terminfoinkernel"]: GROUPS["terminfomodule"].remove(i)

View file

@ -101,6 +101,18 @@ KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
endif endif
if COND_i386_xen_pvh
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/xen.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/xen/hypercall.h
endif
if COND_i386_efi if COND_i386_efi
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h

View file

@ -79,6 +79,8 @@ kernel = {
i386_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0'; i386_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0';
x86_64_xen_ldflags = '$(TARGET_IMG_LDFLAGS)'; x86_64_xen_ldflags = '$(TARGET_IMG_LDFLAGS)';
x86_64_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0'; x86_64_xen_ldflags = '$(TARGET_IMG_BASE_LDOPT),0';
i386_xen_pvh_ldflags = '$(TARGET_IMG_LDFLAGS)';
i386_xen_pvh_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x100000';
mips_loongson_ldflags = '-Wl,-Ttext,0x80200000'; mips_loongson_ldflags = '-Wl,-Ttext,0x80200000';
powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000'; powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
@ -100,6 +102,7 @@ kernel = {
x86_64_efi_startup = kern/x86_64/efi/startup.S; x86_64_efi_startup = kern/x86_64/efi/startup.S;
i386_xen_startup = kern/i386/xen/startup.S; i386_xen_startup = kern/i386/xen/startup.S;
x86_64_xen_startup = kern/x86_64/xen/startup.S; x86_64_xen_startup = kern/x86_64/xen/startup.S;
i386_xen_pvh_startup = kern/i386/xen/startup_pvh.S;
i386_qemu_startup = kern/i386/qemu/startup.S; i386_qemu_startup = kern/i386/qemu/startup.S;
i386_ieee1275_startup = kern/i386/ieee1275/startup.S; i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
i386_coreboot_startup = kern/i386/coreboot/startup.S; i386_coreboot_startup = kern/i386/coreboot/startup.S;
@ -177,6 +180,7 @@ kernel = {
i386 = kern/i386/dl.c; i386 = kern/i386/dl.c;
i386_xen = kern/i386/dl.c; i386_xen = kern/i386/dl.c;
i386_xen_pvh = kern/i386/dl.c;
i386_coreboot = kern/i386/coreboot/init.c; i386_coreboot = kern/i386/coreboot/init.c;
i386_multiboot = kern/i386/coreboot/init.c; i386_multiboot = kern/i386/coreboot/init.c;
@ -222,6 +226,14 @@ kernel = {
xen = disk/xen/xendisk.c; xen = disk/xen/xendisk.c;
xen = commands/boot.c; xen = commands/boot.c;
i386_xen_pvh = commands/boot.c;
i386_xen_pvh = disk/xen/xendisk.c;
i386_xen_pvh = kern/i386/tsc.c;
i386_xen_pvh = kern/i386/xen/tsc.c;
i386_xen_pvh = kern/i386/xen/pvh.c;
i386_xen_pvh = kern/xen/init.c;
i386_xen_pvh = term/xen/console.c;
ia64_efi = kern/ia64/efi/startup.S; ia64_efi = kern/ia64/efi/startup.S;
ia64_efi = kern/ia64/efi/init.c; ia64_efi = kern/ia64/efi/init.c;
ia64_efi = kern/ia64/dl.c; ia64_efi = kern/ia64/dl.c;
@ -801,6 +813,7 @@ module = {
name = cpuid; name = cpuid;
common = commands/i386/cpuid.c; common = commands/i386/cpuid.c;
enable = x86; enable = x86;
enable = i386_xen_pvh;
enable = i386_xen; enable = i386_xen;
enable = x86_64_xen; enable = x86_64_xen;
}; };
@ -860,6 +873,7 @@ module = {
i386_coreboot = lib/i386/halt.c; i386_coreboot = lib/i386/halt.c;
i386_qemu = lib/i386/halt.c; i386_qemu = lib/i386/halt.c;
xen = lib/xen/halt.c; xen = lib/xen/halt.c;
i386_xen_pvh = lib/xen/halt.c;
efi = lib/efi/halt.c; efi = lib/efi/halt.c;
ieee1275 = lib/ieee1275/halt.c; ieee1275 = lib/ieee1275/halt.c;
emu = lib/emu/halt.c; emu = lib/emu/halt.c;
@ -877,6 +891,7 @@ module = {
mips_loongson = lib/mips/loongson/reboot.c; mips_loongson = lib/mips/loongson/reboot.c;
mips_qemu_mips = lib/mips/qemu_mips/reboot.c; mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
xen = lib/xen/reboot.c; xen = lib/xen/reboot.c;
i386_xen_pvh = lib/xen/reboot.c;
uboot = lib/uboot/reboot.c; uboot = lib/uboot/reboot.c;
arm_coreboot = lib/dummy/reboot.c; arm_coreboot = lib/dummy/reboot.c;
common = commands/reboot.c; common = commands/reboot.c;
@ -1571,12 +1586,18 @@ module = {
x86 = lib/i386/relocator16.S; x86 = lib/i386/relocator16.S;
x86 = lib/i386/relocator32.S; x86 = lib/i386/relocator32.S;
x86 = lib/i386/relocator64.S; x86 = lib/i386/relocator64.S;
i386_xen_pvh = lib/i386/relocator16.S;
i386_xen_pvh = lib/i386/relocator32.S;
i386_xen_pvh = lib/i386/relocator64.S;
i386 = lib/i386/relocator_asm.S; i386 = lib/i386/relocator_asm.S;
i386_xen_pvh = lib/i386/relocator_asm.S;
x86_64 = lib/x86_64/relocator_asm.S; x86_64 = lib/x86_64/relocator_asm.S;
i386_xen = lib/i386/relocator_asm.S; i386_xen = lib/i386/relocator_asm.S;
x86_64_xen = lib/x86_64/relocator_asm.S; x86_64_xen = lib/x86_64/relocator_asm.S;
x86 = lib/i386/relocator.c; x86 = lib/i386/relocator.c;
x86 = lib/i386/relocator_common_c.c; x86 = lib/i386/relocator_common_c.c;
i386_xen_pvh = lib/i386/relocator.c;
i386_xen_pvh = lib/i386/relocator_common_c.c;
ieee1275 = lib/ieee1275/relocator.c; ieee1275 = lib/ieee1275/relocator.c;
efi = lib/efi/relocator.c; efi = lib/efi/relocator.c;
mips = lib/mips/relocator_asm.S; mips = lib/mips/relocator_asm.S;
@ -1595,6 +1616,7 @@ module = {
enable = mips; enable = mips;
enable = powerpc; enable = powerpc;
enable = x86; enable = x86;
enable = i386_xen_pvh;
enable = xen; enable = xen;
}; };
@ -1609,6 +1631,7 @@ module = {
sparc64_ieee1275 = lib/ieee1275/cmos.c; sparc64_ieee1275 = lib/ieee1275/cmos.c;
powerpc_ieee1275 = lib/ieee1275/cmos.c; powerpc_ieee1275 = lib/ieee1275/cmos.c;
xen = lib/xen/datetime.c; xen = lib/xen/datetime.c;
i386_xen_pvh = lib/xen/datetime.c;
mips_arc = lib/arc/datetime.c; mips_arc = lib/arc/datetime.c;
enable = noemu; enable = noemu;
@ -1692,6 +1715,7 @@ module = {
common = loader/multiboot.c; common = loader/multiboot.c;
common = loader/multiboot_mbi2.c; common = loader/multiboot_mbi2.c;
enable = x86; enable = x86;
enable = i386_xen_pvh;
enable = mips; enable = mips;
}; };
@ -1699,8 +1723,10 @@ module = {
name = multiboot; name = multiboot;
common = loader/multiboot.c; common = loader/multiboot.c;
x86 = loader/i386/multiboot_mbi.c; x86 = loader/i386/multiboot_mbi.c;
i386_xen_pvh = loader/i386/multiboot_mbi.c;
extra_dist = loader/multiboot_elfxx.c; extra_dist = loader/multiboot_elfxx.c;
enable = x86; enable = x86;
enable = i386_xen_pvh;
}; };
module = { module = {
@ -1712,8 +1738,10 @@ module = {
module = { module = {
name = linux; name = linux;
x86 = loader/i386/linux.c; x86 = loader/i386/linux.c;
i386_xen_pvh = loader/i386/linux.c;
xen = loader/i386/xen.c; xen = loader/i386/xen.c;
i386_pc = lib/i386/pc/vesa_modes_table.c; i386_pc = lib/i386/pc/vesa_modes_table.c;
i386_xen_pvh = lib/i386/pc/vesa_modes_table.c;
mips = loader/mips/linux.c; mips = loader/mips/linux.c;
powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c; powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c; sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
@ -1801,6 +1829,8 @@ module = {
common = mmap/mmap.c; common = mmap/mmap.c;
x86 = mmap/i386/uppermem.c; x86 = mmap/i386/uppermem.c;
x86 = mmap/i386/mmap.c; x86 = mmap/i386/mmap.c;
i386_xen_pvh = mmap/i386/uppermem.c;
i386_xen_pvh = mmap/i386/mmap.c;
i386_pc = mmap/i386/pc/mmap.c; i386_pc = mmap/i386/pc/mmap.c;
i386_pc = mmap/i386/pc/mmap_helper.S; i386_pc = mmap/i386/pc/mmap_helper.S;
@ -1810,6 +1840,7 @@ module = {
mips = mmap/mips/uppermem.c; mips = mmap/mips/uppermem.c;
enable = x86; enable = x86;
enable = i386_xen_pvh;
enable = ia64_efi; enable = ia64_efi;
enable = arm_efi; enable = arm_efi;
enable = arm64_efi; enable = arm64_efi;
@ -2049,6 +2080,7 @@ module = {
name = legacy_password_test; name = legacy_password_test;
common = tests/legacy_password_test.c; common = tests/legacy_password_test.c;
enable = i386_pc; enable = i386_pc;
enable = i386_xen_pvh;
enable = i386_efi; enable = i386_efi;
enable = x86_64_efi; enable = x86_64_efi;
enable = emu; enable = emu;
@ -2247,6 +2279,7 @@ module = {
xen = lib/i386/pc/vesa_modes_table.c; xen = lib/i386/pc/vesa_modes_table.c;
enable = i386_pc; enable = i386_pc;
enable = i386_xen_pvh;
enable = i386_efi; enable = i386_efi;
enable = x86_64_efi; enable = x86_64_efi;
enable = emu; enable = emu;
@ -2290,10 +2323,12 @@ module = {
module = { module = {
name = backtrace; name = backtrace;
x86 = lib/i386/backtrace.c; x86 = lib/i386/backtrace.c;
i386_xen_pvh = lib/i386/backtrace.c;
i386_xen = lib/i386/backtrace.c; i386_xen = lib/i386/backtrace.c;
x86_64_xen = lib/i386/backtrace.c; x86_64_xen = lib/i386/backtrace.c;
common = lib/backtrace.c; common = lib/backtrace.c;
enable = x86; enable = x86;
enable = i386_xen_pvh;
enable = i386_xen; enable = i386_xen;
enable = x86_64_xen; enable = x86_64_xen;
}; };