From: "Christoph Egger" Subject: [PATCH] Make xen kernel build on NetBSD Date: Wed, 30 May 2007 10:14:53 +0200 Message-ID: <200705301014.54117.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_+JTXG+13HRfLQGw" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_+JTXG+13HRfLQGw Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! NetBSD is able to build xen itself for a long time, but it's time to make t= he=20 patches go upstream. The attached patch makes the xen-kernel itself buildable on NetBSD. The changes in xen/tools/symbol.c fixes this warning: warning: array subscript has type 'char' and the #include is needed to not break the build on Linux. The change in xen/arch/x86/shutdown.c fixes this: error: parameter name omitted Christoph =2D-=20 AMD Saxony, Dresden Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_+JTXG+13HRfLQGw Content-Type: text/x-diff; charset=iso-8859-1; name=netbsd.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=netbsd.diff diff -r 089696e0c603 config/NetBSD.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/NetBSD.mk Fri May 18 10:38:13 2007 +0000 @@ -0,0 +1,1 @@ +include $(XEN_ROOT)/config/StdGNU.mk diff -r 089696e0c603 xen/arch/x86/shutdown.c --- a/xen/arch/x86/shutdown.c Thu May 17 11:42:46 2007 +0100 +++ b/xen/arch/x86/shutdown.c Wed May 30 09:04:35 2007 +0000 @@ -197,7 +197,7 @@ static void machine_real_restart(const u #endif -void machine_restart(char * __unused) +void machine_restart(char *cmd) { int i; diff -r 089696e0c603 xen/tools/symbols.c --- a/xen/tools/symbols.c Thu May 17 11:42:46 2007 +0100 +++ b/xen/tools/symbols.c Wed May 30 10:00:18 2007 +0000 @@ -29,6 +29,7 @@ #include #include #include +#include #include #define KSYM_NAME_LEN 127 @@ -103,7 +104,7 @@ static int read_symbol(FILE *in, struct _sextratext = s->addr; else if (strcmp(sym, "_eextratext") == 0) _eextratext = s->addr; - else if (toupper(stype) == 'A') + else if (toupper((uint8_t)stype) == 'A') { /* Keep these useful absolute symbols */ if (strcmp(sym, "__kernel_syscall_via_break") && @@ -113,7 +114,7 @@ static int read_symbol(FILE *in, struct return -1; } - else if (toupper(stype) == 'U' || + else if (toupper((uint8_t)stype) == 'U' || is_arm_mapping_symbol(sym)) return -1; /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */ --Boundary-00=_+JTXG+13HRfLQGw Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_+JTXG+13HRfLQGw--