3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #32 from peti/xen-update

Xen for Linux 3.2
This commit is contained in:
Peter Simons 2012-07-16 02:27:23 -07:00
commit fd749dd9bf
3 changed files with 20 additions and 45 deletions

View file

@ -6,7 +6,7 @@ with stdenv.lib;
let
version = "4.0.3";
version = "4.1.2";
libDir = if stdenv.is64bit then "lib64" else "lib";
@ -30,23 +30,24 @@ let
}
];
in
ipxeSrc =
{ url = http://xenbits.xensource.com/xen-extfiles/ipxe-git-v1.0.0.tar.gz;
sha256 = "d3128bfda9a1542049c278755f85bbcbb8441da7bfd702d511ce237fcf86a723";
};
in
stdenv.mkDerivation {
name = "xen-${version}";
src = fetchurl {
url = "http://bits.xensource.com/oss-xen/release/${version}/xen-${version}.tar.gz";
sha256 = "0p4i7mm8cdsr8i9z3dij6nriyvz6la2rhm7jkyk2n8h62nnxi1b5";
sha256 = "7d9c93057cf480d3f1efa792b19285a84fa3c06060ea5c5c453be00887389b0d";
};
patches =
[ # Xen looks for headers in /usr/include and for libraries using
# ldconfig. Don't do that.
./has-header.patch
# GCC 4.5 compatibility.
./gcc-4.5.patch
];
buildInputs =
@ -102,12 +103,18 @@ stdenv.mkDerivation {
--replace 'XENDOM_CONFIG=/etc/sysconfig/xendomains' "" \
--replace /bin/ls ls
grep -rl /etc/xen * | xargs sed -i 's|/etc/xen|$out/etc/xen|g'
# Xen's stubdoms need various sources that it usually fetches at
# build time using wget. We can't have that.
${flip concatMapStrings stubdomSrcs (x: let src = fetchurl x; in ''
cp ${src} stubdom/${src.name}
'')}
${let src = fetchurl ipxeSrc; in ''
cp ${src} tools/firmware/etherboot/ipxe.tar.gz
''}
# Hack to get `gcc -m32' to work without having 32-bit Glibc headers.
mkdir -p tools/include/gnu
touch tools/include/gnu/stubs-32.h

View file

@ -1,39 +0,0 @@
http://lists.xensource.com/archives/html/xen-devel/2010-07/msg01276.html
diff -ru -x '*~' xen-4.0.1-orig//extras/mini-os/arch/x86/mm.c xen-4.0.1//extras/mini-os/arch/x86/mm.c
--- xen-4.0.1-orig//extras/mini-os/arch/x86/mm.c 2010-08-25 12:22:07.000000000 +0200
+++ xen-4.0.1//extras/mini-os/arch/x86/mm.c 2010-12-22 20:10:05.000000000 +0100
@@ -281,7 +281,7 @@
/*
* Mark portion of the address space read only.
*/
-extern void shared_info;
+extern char shared_info[PAGE_SIZE];
static void set_readonly(void *text, void *etext)
{
unsigned long start_address =
diff -ru -x '*~' xen-4.0.1-orig//extras/mini-os/minios.mk xen-4.0.1//extras/mini-os/minios.mk
--- xen-4.0.1-orig//extras/mini-os/minios.mk 2010-08-25 12:22:07.000000000 +0200
+++ xen-4.0.1//extras/mini-os/minios.mk 2010-12-22 20:03:11.000000000 +0100
@@ -10,6 +10,7 @@
DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
+DEF_CFLAGS += -Wno-uninitialized
DEF_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
DEF_ASFLAGS += -D__ASSEMBLY__
diff -ru -x '*~' xen-4.0.1-orig//extras/mini-os/netfront.c xen-4.0.1//extras/mini-os/netfront.c
--- xen-4.0.1-orig//extras/mini-os/netfront.c 2010-08-25 12:22:07.000000000 +0200
+++ xen-4.0.1//extras/mini-os/netfront.c 2010-12-22 19:56:59.000000000 +0100
@@ -25,8 +25,8 @@
-#define NET_TX_RING_SIZE __RING_SIZE((struct netif_tx_sring *)0, PAGE_SIZE)
-#define NET_RX_RING_SIZE __RING_SIZE((struct netif_rx_sring *)0, PAGE_SIZE)
+#define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE)
+#define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE)
#define GRANT_INVALID_REF 0

View file

@ -5670,6 +5670,12 @@ let
];
};
linux_3_2_xen = linux_3_2.override {
extraConfig = ''
XEN_DOM0 y
'';
};
linux_3_3 = makeOverridable (import ../os-specific/linux/kernel/linux-3.3.nix) {
inherit fetchurl stdenv perl mktemp module_init_tools ubootChooser;
kernelPatches =
@ -5808,6 +5814,7 @@ let
linuxPackages_3_0 = recurseIntoAttrs (linuxPackagesFor linux_3_0 pkgs.linuxPackages_3_0);
linuxPackages_3_1 = recurseIntoAttrs (linuxPackagesFor linux_3_1 pkgs.linuxPackages_3_1);
linuxPackages_3_2 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_2 pkgs.linuxPackages_3_2);
linuxPackages_3_2_xen = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_2_xen pkgs.linuxPackages_3_2_xen);
linuxPackages_3_3 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_3 pkgs.linuxPackages_3_3);
linuxPackages_3_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_4 pkgs.linuxPackages_3_4);