+++ /dev/null
-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;
--- /dev/null
+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
--- /dev/null
+--- 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
###############################################################################
name = xen
-version = 4.1.1
-release = 4
+version = 4.1.2
+release = 2
maintainer = Ben Schweikert <ben.schweikert@ipfire.org>
groups = Applications/Virtualization
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
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
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