]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
xen: Enabled HVM support and disabled external downloads.
authorBen Schweikert <trikolon@ipfire.org>
Sun, 11 Dec 2011 18:38:44 +0000 (19:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Dec 2011 09:28:09 +0000 (10:28 +0100)
xen/patches/00-xen-detect.patch [deleted file]
xen/patches/02-patch.patch0 [new file with mode: 0644]
xen/patches/xen-ipxe.patch0 [new file with mode: 0644]
xen/xen.nm

diff --git a/xen/patches/00-xen-detect.patch b/xen/patches/00-xen-detect.patch
deleted file mode 100644 (file)
index 0b485f7..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -r 23c068b10923 tools/misc/xen-detect.c
---- a/tools/misc/xen-detect.c  Wed Jun 15 16:16:41 2011 +0100
-+++ b/tools/misc/xen-detect.c  Wed Jun 15 20:14:30 2011 +0100
-@@ -33,43 +33,46 @@
- #include <unistd.h>
- #include <getopt.h>
--static void cpuid(uint32_t idx,
--                  uint32_t *eax,
--                  uint32_t *ebx,
--                  uint32_t *ecx,
--                  uint32_t *edx,
--                  int pv_context)
-+static void cpuid(uint32_t idx, uint32_t *regs, int pv_context)
- {
-     asm volatile (
--        "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid"
--        : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
--        : "0" (idx), "1" (pv_context) );
-+#ifdef __i386__
-+#define R(x) "%%e"#x"x"
-+#else
-+#define R(x) "%%r"#x"x"
-+#endif
-+        "push "R(a)"; push "R(b)"; push "R(c)"; push "R(d)"\n\t"
-+        "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid\n\t"
-+        "mov %%eax,(%2); mov %%ebx,4(%2)\n\t"
-+        "mov %%ecx,8(%2); mov %%edx,12(%2)\n\t"
-+        "pop "R(d)"; pop "R(c)"; pop "R(b)"; pop "R(a)"\n\t"
-+        : : "a" (idx), "c" (pv_context), "S" (regs) : "memory" );
- }
- static int check_for_xen(int pv_context)
- {
--    uint32_t eax, ebx, ecx, edx;
-+    uint32_t regs[4];
-     char signature[13];
-     uint32_t base;
-     for ( base = 0x40000000; base < 0x40010000; base += 0x100 )
-     {
--        cpuid(base, &eax, &ebx, &ecx, &edx, pv_context);
-+        cpuid(base, regs, pv_context);
--        *(uint32_t *)(signature + 0) = ebx;
--        *(uint32_t *)(signature + 4) = ecx;
--        *(uint32_t *)(signature + 8) = edx;
-+        *(uint32_t *)(signature + 0) = regs[1];
-+        *(uint32_t *)(signature + 4) = regs[2];
-+        *(uint32_t *)(signature + 8) = regs[3];
-         signature[12] = '\0';
--        if ( !strcmp("XenVMMXenVMM", signature) && (eax >= (base + 2)) )
-+        if ( !strcmp("XenVMMXenVMM", signature) && (regs[0] >= (base + 2)) )
-             goto found;
-     }
-     return 0;
-  found:
--    cpuid(base + 1, &eax, &ebx, &ecx, &edx, pv_context);
--    return eax;
-+    cpuid(base + 1, regs, pv_context);
-+    return regs[0];
- }
- static jmp_buf sigill_jmp;
diff --git a/xen/patches/02-patch.patch0 b/xen/patches/02-patch.patch0
new file mode 100644 (file)
index 0000000..75d565d
--- /dev/null
@@ -0,0 +1,23 @@
+diff -duNrH tools/firmware/etherboot/patches~/gentoo-hardened.patch xen-4.1.0/tools/firmware/etherboot/patches/gentoo-hardened.patch
+--- tools/firmware/etherboot~/patches/gentoo-hardened.patch    1970-01-01 01:00:00.000000000 +0100
++++ tools/firmware/etherboot/patches/gentoo-hardened.patch     2011-03-27 17:45:13.929697782 +0200
+@@ -0,0 +1,11 @@
++--- ipxe/src/Makefile~        2011-03-27 17:41:52.000000000 +0200
+++++ ipxe/src/Makefile 2011-03-27 17:43:20.869446433 +0200
++@@ -4,7 +4,7 @@
++ #
++ 
++ CLEANUP              :=
++-CFLAGS               :=
+++CFLAGS               := -nopie
++ ASFLAGS              :=
++ LDFLAGS              :=
++ MAKEDEPS     := Makefile
+diff -duNrH tools/firmware/etherboot~/patches/series xen-4.1.0/tools/firmware/etherboot/patches/series
+--- tools/firmware/etherboot~/patches/series   2011-03-25 11:42:50.000000000 +0100
++++ tools/firmware/etherboot/patches/series    2011-03-27 17:45:45.140446216 +0200
+@@ -1,3 +1,4 @@
+ boot_prompt_option.patch
+ gpxe-git-0edf2405b457
+ gpxe-git-a803ef3dfeac
++gentoo-hardened.patch
diff --git a/xen/patches/xen-ipxe.patch0 b/xen/patches/xen-ipxe.patch0
new file mode 100644 (file)
index 0000000..d544c78
--- /dev/null
@@ -0,0 +1,23 @@
+--- tools/firmware/etherboot/Makefile  2011-12-11 16:57:04.609076813 +0100
++++ tools/firmware/etherboot/Makefile  2011-12-11 16:54:16.211074495 +0100
+@@ -35,13 +35,13 @@
+       mv -f $@.new $@
+ $T:
+-      if ! wget -O _$T $(IPXE_TARBALL_URL); then \
+-              $(GIT) clone $(IPXE_GIT_URL) $D.git; \
+-              (cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
+-              $(IPXE_GIT_TAG) | gzip >../_$T); \
+-              rm -rf $D.git; \
+-      fi
+-      mv _$T $T
++#     if ! wget -O _$T $(IPXE_TARBALL_URL); then \
++#             $(GIT) clone $(IPXE_GIT_URL) $D.git; \
++#             (cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
++#             $(IPXE_GIT_TAG) | gzip >../_$T); \
++#             rm -rf $D.git; \
++#     fi
++#     mv _$T $T
+ $D/src/arch/i386/Makefile: $T Config
+       rm -rf $D
index ab414456913a8fcfe8b7f2f745f9ace8c143db80..fed6a816f16e0268ec418f0376493690d1bf341c 100644 (file)
@@ -4,8 +4,8 @@
 ###############################################################################
 
 name       = xen
-version    = 4.1.1
-release    = 4
+version    = 4.1.2
+release    = 2
 
 maintainer = Ben Schweikert <ben.schweikert@ipfire.org>
 groups     = Applications/Virtualization
@@ -20,18 +20,22 @@ description
 end
 
 source_dl  =
-sources    = %{thisapp}.tar.gz
+sources    = %{thisapp}.tar.gz xen-utils-0.1.tar.bz2
 
 build
        requires
+               chrpath
+               dev86
                gettext-devel
+               iasl
                kernel-headers
                libuuid-devel
                ncurses-devel
                openssl-devel
                python
                python-devel
-               sdl-devel
+               SDL
+               SDL-devel
                texinfo
                xorg-x11-proto-devel
                wget
@@ -39,12 +43,9 @@ build
        end
 
        prepare_cmds
-               # Following two lines are disabling HVM. HVM does not work because \
-               # of some PIE errors we get when we try to build the firmware part \
-               # needed for different architektures.
-               sed -i -e '/^CONFIG_IOEMU := y$/d' config/*.mk
-               sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' tools/Makefile
-
+               tar -xvf %{DIR_DL}/xen-utils-0.1.tar.bz2
+               mv tools/firmware/etherboot/ipxe-git-v1.0.0.tar.gz tools/firmware/etherboot/ipxe.tar.gz
+               mv extras/mini-os/newlib-1.16.0.tar.gz stubdom/
                rm -f Config.mk~
        end
 
@@ -52,10 +53,11 @@ build
                xen tools
 
        make_install_targets +=\
-               xen install-tools
+               install-xen install-tools
 
        install_cmds
                rm -R %{BUILDROOT}/etc/init.d
+               chrpath --delete %{BUILDROOT}/usr/lib/xen/bin/qemu-dm
        end
 end