Build and bundle the patched xen 4.6.3 kernel

This commit is contained in:
Trammell Hudson 2016-08-03 18:10:44 -04:00
parent 24fc2bbc9a
commit a81a002abb
Failed to extract signature
5 changed files with 21 additions and 14 deletions

View File

@ -37,6 +37,9 @@ define define_module =
# that the files are all present # that the files are all present
$(build)/$($1_dir)/.canary: $(packages)/.$1_verify $(build)/$($1_dir)/.canary: $(packages)/.$1_verify
tar -xf "$(packages)/$($1_tar)" -C "$(build)" tar -xf "$(packages)/$($1_tar)" -C "$(build)"
if [ -r patches/$1-$($1_version).patch ]; then \
( cd $(build)/$($1_dir) ; patch -p1 ) < patches/$1-$($1_version).patch; \
fi
touch "$$@" touch "$$@"
# Copy our stored config file into the unpacked directory # Copy our stored config file into the unpacked directory
@ -78,6 +81,7 @@ endef
$(foreach _, $(call outputs,kexec), $(eval $(call initrd_bin,$_))) $(foreach _, $(call outputs,kexec), $(eval $(call initrd_bin,$_)))
$(foreach _, $(call outputs,tpmtotp), $(eval $(call initrd_bin,$_))) $(foreach _, $(call outputs,tpmtotp), $(eval $(call initrd_bin,$_)))
$(foreach _, $(call outputs,xen), $(eval $(call initrd_bin,$_)))
# hack to install busybox into the initrd # hack to install busybox into the initrd
initrd_bins += initrd/bin/busybox initrd_bins += initrd/bin/busybox

View File

@ -38,4 +38,5 @@ Notes:
* Building coreboot's cross compilers can take a while. * Building coreboot's cross compilers can take a while.
* Currently only tested in Qemu and on a Thinkpad x230 * Currently only tested in Qemu and on a Thinkpad x230
* Booting Qubes requires patching Xen's real mode startup code; * Booting Qubes requires patching Xen's real mode startup code;
see `patches/xen-4.6.3.patch` see `patches/xen-4.6.3.patch` and add `no-real-mode` to start
of the Xen command line.

1
config/xen.config Normal file
View File

@ -0,0 +1 @@
# Nothing

12
modules/xen Normal file
View File

@ -0,0 +1,12 @@
modules += xen
# We extract the entire Xen tree, but only use the xen/xen hypervisor
# portion since Qubes provides the rest of it.
xen_version := 4.6.3
xen_dir := xen-$(xen_version)/xen
xen_tar := xen-$(xen_version).tar.gz
xen_url := ineed-to-find-xen/$(xen_tar)
xen_hash := 02badfce9a037bd1bd4a94210c1f6b85467746216c71795805102b514bcf1fc4
xen_output := xen.gz
xen_configure :=

View File

@ -1,6 +1,6 @@
diff -u --recursive clean/xen-4.6.3/xen/arch/x86/boot/head.S xen-4.6.3/xen/arch/x86/boot/head.S diff -u --recursive clean/xen-4.6.3/xen/arch/x86/boot/head.S xen-4.6.3/xen/arch/x86/boot/head.S
--- clean/xen-4.6.3/xen/arch/x86/boot/head.S 2016-06-20 08:08:22.000000000 -0400 --- clean/xen-4.6.3/xen/arch/x86/boot/head.S 2016-06-20 08:08:22.000000000 -0400
+++ xen-4.6.3/xen/arch/x86/boot/head.S 2016-07-26 13:10:55.407297163 -0400 +++ xen/arch/x86/boot/head.S 2016-07-26 13:10:55.407297163 -0400
@@ -86,6 +86,8 @@ @@ -86,6 +86,8 @@
cmp $MULTIBOOT_BOOTLOADER_MAGIC,%eax cmp $MULTIBOOT_BOOTLOADER_MAGIC,%eax
jne not_multiboot jne not_multiboot
@ -23,20 +23,9 @@ diff -u --recursive clean/xen-4.6.3/xen/arch/x86/boot/head.S xen-4.6.3/xen/arch/
2: /* Reserve 64kb for the trampoline */ 2: /* Reserve 64kb for the trampoline */
sub $0x1000,%eax sub $0x1000,%eax
diff -u --recursive clean/xen-4.6.3/xen/arch/x86/boot/trampoline.S xen-4.6.3/xen/arch/x86/boot/trampoline.S
--- clean/xen-4.6.3/xen/arch/x86/boot/trampoline.S 2016-06-20 08:08:22.000000000 -0400
+++ xen-4.6.3/xen/arch/x86/boot/trampoline.S 2016-07-26 11:40:55.938940922 -0400
@@ -114,6 +114,7 @@
.code32
trampoline_boot_cpu_entry:
+ jmp .Lskip_realmode // always!
cmpb $0,bootsym_rel(skip_realmode,5)
jnz .Lskip_realmode
diff -u --recursive clean/xen-4.6.3/xen/drivers/video/vga.c xen-4.6.3/xen/drivers/video/vga.c diff -u --recursive clean/xen-4.6.3/xen/drivers/video/vga.c xen-4.6.3/xen/drivers/video/vga.c
--- clean/xen-4.6.3/xen/drivers/video/vga.c 2016-06-20 08:08:22.000000000 -0400 --- clean/xen-4.6.3/xen/drivers/video/vga.c 2016-06-20 08:08:22.000000000 -0400
+++ xen-4.6.3/xen/drivers/video/vga.c 2016-07-26 13:34:03.756108517 -0400 +++ xen/drivers/video/vga.c 2016-07-26 13:34:03.756108517 -0400
@@ -5,177 +5,691 @@ @@ -5,177 +5,691 @@
*/ */