Browse Source

xen-tools: Updated (4.1.0 -> 4.5.0) See Note!

For now there are some issues with crosscompilation, namingly we do not cross compile
the stubdom target. I am not sure that this is even possible at current stage die to
the fact that i think stubdomains are pretty much x86 only (Karasz).
master
Nagy Karoly Gabriel 10 years ago
parent
commit
9364ea7ff7
  1. 32
      base/xen-tools/compile.patch
  2. 58
      base/xen-tools/qemu-xen-musl-openpty.patch
  3. 71
      base/xen-tools/xen-tools.conf
  4. 8
      base/xen-tools/xen-tools.desc
  5. 108
      base/xen-tools/xen-tools_tinfo.patch

32
base/xen-tools/compile.patch

@ -1,32 +0,0 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../xen-tools/compile.patch
# Copyright (C) 2009 - 2010 The OpenSDE Project
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
diff -Nur xen-3.4.2-orig/tools/xenstat/xentop/Makefile xen-3.4.2/tools/xenstat/xentop/Makefile
--- xen-3.4.2-orig/tools/xenstat/xentop/Makefile 2010-01-14 13:16:35.000000000 +0000
+++ xen-3.4.2/tools/xenstat/xentop/Makefile 2010-01-15 18:06:31.000000000 +0000
@@ -19,8 +19,8 @@
else
CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
-LDFLAGS += -L$(XEN_LIBXENSTAT)
-LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS)
+LDFLAGS += -L$(XEN_LIBXENSTAT) -L$(XEN_XENSTORE) -L../../libxc
+LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS) -lxenstore -lxenctrl
CFLAGS += -DHOST_$(XEN_OS)
.PHONY: all

58
base/xen-tools/qemu-xen-musl-openpty.patch

@ -0,0 +1,58 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../xen-tools/qemu-xen-musl-openpty.patch
# Copyright (C) 2015 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From 828ca41769f5070bec903db348647a47d2e0515e Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 29 Apr 2014 10:14:57 +0200
Subject: [PATCH] util/qemu-openpty: fix build with musl libc by include
termios.h as fallback
Include termios.h as POSIX fallback when not glibc, bsd or solaris.
POSIX says that termios.h should define struct termios and TCAFLUSH.
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html
This fixes the following compile errors with musl libc:
util/qemu-openpty.c: In function 'qemu_openpty_raw':
util/qemu-openpty.c:112:20: error: storage size of 'tty' isn't known
struct termios tty;
^
...
util/qemu-openpty.c:128:24: error: 'TCSAFLUSH' undeclared (first use in this function)
tcsetattr(*aslave, TCSAFLUSH, &tty);
^
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
util/qemu-openpty.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/qemu-openpty.c b/util/qemu-openpty.c
index 4febfe9..4c53211 100644
--- a/tools/qemu-xen/util/qemu-openpty.c
+++ b/tools/qemu-xen/util/qemu-openpty.c
@@ -47,6 +47,8 @@
#elif defined CONFIG_SOLARIS
# include <termios.h>
# include <stropts.h>
+#else
+# include <termios.h>
#endif
#ifdef __sun__
--
2.1.2

71
base/xen-tools/xen-tools.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../xen-tools/xen-tools.conf
# Copyright (C) 2010 - 2011 The OpenSDE Project
# Copyright (C) 2010 - 2015 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
@ -13,6 +13,71 @@
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
custmain="make xen tools; make install-xen install-tools"
# Kill -Werror with deadly fire.
hook_add preconf 7 "find . -name '*.mk' -o -name 'Make*' | xargs sed -i -e 's/-Werror//g'"
hook_add preconf 9 'autoreconf -vfi'
# Werror removal first part.
var_append confopt ' ' '--disable-werror'
# disable stuff we do not need
var_append confopt ' ' '--disable-docs'
var_append confopt ' ' '--disable-ocamltools'
var_append confopt ' ' '--disable-qemu-traditional'
# for now we only support system seabios build by us.
pkginstalled seabios && var_append confopt ' ' '--with-system-seabios=$root/usr/share/seabios/bios.bin'
# help a bit the cross compile
if atstage cross; then
export XEN_TARGET_ARCH=$arch_machine
export CROSS_COMPILE=$arch_target-
export EXTRA_CFLAGS_XEN_TOOLS="-I$root/usr/include -I $root/include"
export APPEND_LDFLAGS="-L$root/usr/lib -L$root/lib"
export CONFIG_TEST=n
# we do not support crossbuild of stubdoms (yet?) 11/02/2015 karasz
var_append confopt ' ' '--disable-stubdom'
fi
drop_flags() {
unset CFLAGS
unset LDFLAGS
unset LANG
unset LC_ALL
}
build_hypervisor() {
drop_flags
echo_warning "Building hypervisor..."
make xen
}
build_tools() {
drop_flags
echo_warning "Building tools..."
make tools V=1
}
build_stubdom() {
drop_flags
echo_warning "Building stub domains..."
make stubdom
}
build() {
build_hypervisor
build_tools
# we do not support crossbuild of stubdoms (yet?) 11/02/2015 karasz
if ! atstage cross; then
build_stubdom
var_append makeinstopt ' ' 'install-stubdom'
fi
}
hook_add premake 9 'build'
makeopt=
var_append makeinstopt ' ' 'install-xen install-tools'
var_append CC_WRAPPER_REMOVE " " "-Werror"

8
base/xen-tools/xen-tools.desc

@ -2,7 +2,7 @@
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY]
[COPY] Filename: package/.../xen-tools/xen-tools.desc
[COPY] Copyright (C) 2006 - 2011 The OpenSDE Project
[COPY] Copyright (C) 2006 - 2015 The OpenSDE Project
[COPY] Copyright (C) 2004 - 2006 The T2 SDE Project
[COPY]
[COPY] More information can be found in the files COPYING and README.
@ -33,7 +33,7 @@
[L] GPL
[S] Stable
[V] 4.1.0
[P] X -----5---9 179.300
[V] 4.5.0
[P] X -?---5---9 179.300
[D] 1070740950 xen-4.1.0.tar.gz http://bits.xensource.com/oss-xen/release/4.1.0/
[D] 2481838105 xen-4.5.0.tar.gz http://bits.xensource.com/oss-xen/release/4.5.0/

108
base/xen-tools/xen-tools_tinfo.patch

@ -0,0 +1,108 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../xen-tools/xen-tools_tinfo.patch
# Copyright (C) 2015 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- a/m4/curses.m4
+++ b/m4/curses.m4
@@ -4,13 +4,14 @@
], [curses="n"])
AC_CHECK_HEADER([ncurses.h], [
AC_CHECK_LIB([ncurses], [clear], [ncurses="y"], [ncurses="n"])
+ AC_SEARCH_LIBS([curs_set], tinfo ncurses, [CURSES_LIBS="$CURSES_LIBS $ac_res"])
], [ncurses="n"])
AS_IF([test "$curses" = "n" && test "$ncurses" = "n"], [
AC_MSG_ERROR([Unable to find a suitable curses library])
])
# Prefer ncurses over curses if both are present
AS_IF([test "$ncurses" = "y"], [
- CURSES_LIBS="-lncurses"
+ CURSES_LIBS="$CURSES_LIBS -lncurses"
AC_DEFINE([INCLUDE_CURSES_H], [<ncurses.h>], [Define curses header to use])
], [
CURSES_LIBS="-lcurses"
--- a/tools/configure
+++ a/tools/configure
@@ -7136,6 +7136,62 @@
ncurses="n"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing curs_set" >&5
+$as_echo_n "checking for library containing curs_set... " >&6; }
+if ${ac_cv_search_curs_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char curs_set ();
+int
+main ()
+{
+return curs_set ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' tinfo ncurses; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_curs_set=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_curs_set+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_curs_set+:} false; then :
+
+else
+ ac_cv_search_curs_set=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_curs_set" >&5
+$as_echo "$ac_cv_search_curs_set" >&6; }
+ac_res=$ac_cv_search_curs_set
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ CURSES_LIBS="$CURSES_LIBS $ac_res"
+fi
+
else
ncurses="n"
@@ -7150,7 +7206,7 @@
# Prefer ncurses over curses if both are present
if test "$ncurses" = "y"; then :
- CURSES_LIBS="-lncurses"
+ CURSES_LIBS="$CURSES_LIBS -lncurses"
$as_echo "#define INCLUDE_CURSES_H <ncurses.h>" >>confdefs.h
Loading…
Cancel
Save