tags 318567 patch
thanks

I've attatched a patch that fixes the build problems. I've removed
-Werror from the CFLAGS, since there are loads of warnings with
gcc-4.0, mostly about signed/unsigned conflicts at assignments.

Futhermore -Os is used instead of -O2, since there is an error about
a too large image otherwise.

Several minor changes were also done.

The patch works fine when thrown into debian/patches. The build
works afterwords, but since I don't have an xbox ready I can't test
the product.

HTH,
Christian Aichinger
diff -Nur build-tree/cromwell/lib/gzip/misc.c btree/cromwell/lib/gzip/misc.c
--- build-tree/cromwell/lib/gzip/misc.c 2004-06-06 16:27:26.000000000 +0200
+++ btree/cromwell/lib/gzip/misc.c      2005-08-06 18:29:18.000000000 +0200
@@ -24,6 +24,10 @@
 #undef memset
 #undef memcpy
 
+// Work around clash with previous non-static declaration
+#define memset memset_miscc
+#define memcpy memcpy_miscc
+
 /*
  * Why do we do this? Don't ask me..
  *
diff -Nur build-tree/cromwell/Makefile btree/cromwell/Makefile
--- build-tree/cromwell/Makefile        2005-08-06 18:27:56.000000000 +0200
+++ btree/cromwell/Makefile     2005-08-06 18:30:31.000000000 +0200
@@ -11,7 +11,8 @@
        -I$(TOPDIR)/lib/jpeg/ -I$(TOPDIR)/menu/actions 
-I$(TOPDIR)/menu/textmenu -I$(TOPDIR)/menu/iconmenu
 
 #These are intended to be non-overridable.
-CROM_CFLAGS=-O2 -mcpu=pentium -Werror -pipe -fomit-frame-pointer 
-Wstrict-prototypes $(INCLUDE)
+#We need -Os, since the image is too large otherwise
+CROM_CFLAGS=-Os -mcpu=pentium -pipe -fomit-frame-pointer -Wstrict-prototypes 
$(INCLUDE)
 
 # add the option for gcc 3.3 only, again, non-overridable
 ifeq ($(GCC_3.3), 1)
@@ -30,7 +31,7 @@
 ETH_SUBDIRS = etherboot
 CROM_CFLAGS    += -DETHERBOOT
 ETH_INCLUDE =  -I$(TOPDIR)/etherboot/include 
-I$(TOPDIR)/etherboot/arch/i386/include   
-ETH_CFLAGS  =  -O2 -mcpu=pentium -Werror $(ETH_INCLUDE) -Wstrict-prototypes 
-fomit-frame-pointer -pipe -Ui386
+ETH_CFLAGS  =  -Os -mcpu=pentium $(ETH_INCLUDE) -Wstrict-prototypes 
-fomit-frame-pointer -pipe -Ui386
 endif
 
 LDFLAGS-ROM     = -s -S -T $(TOPDIR)/scripts/ldscript-crom.ld
diff -Nur build-tree/cromwell/menu/actions/VideoMenuActions.c 
btree/cromwell/menu/actions/VideoMenuActions.c
--- build-tree/cromwell/menu/actions/VideoMenuActions.c 2004-11-30 
02:23:48.000000000 +0100
+++ btree/cromwell/menu/actions/VideoMenuActions.c      2005-08-06 
18:25:29.000000000 +0200
@@ -13,6 +13,20 @@
 #include "VideoInitialization.h"
 #include "BootEEPROM.h"
 
+int
+strcmp (const char *s1, const char *s2)
+{
+       while (*s1 || *s2) {
+               if (*s1 < *s2)
+                       return -1;
+               else if (*s1 > *s2)
+                       return 1;
+               s1 ++;
+               s2 ++;
+       }
+       return 0;
+}
+
 void SetWidescreen(void *menuItemText) {
        char *text = (char *)menuItemText;
        if (!strcmp(text, "Display Size: Widescreen")) {
diff -Nur build-tree/cromwell/menu/iconmenu/IconMenuInit.c 
btree/cromwell/menu/iconmenu/IconMenuInit.c
--- build-tree/cromwell/menu/iconmenu/IconMenuInit.c    2004-12-01 
00:42:06.000000000 +0100
+++ btree/cromwell/menu/iconmenu/IconMenuInit.c 2005-08-06 18:03:25.000000000 
+0200
@@ -104,7 +104,7 @@
                        //See if there is an MBR - no MBR means no native boot 
options.
                        if( !(ba[0x1fe]==0x55) || !(ba[0x1ff]==0xaa)) return;
        
-                       (volatile u8 *)pb=&ba[0x1be];
+                       pb=&ba[0x1be];
                        //Check the primary partitions
                        for (n=0; n<4; n++,pb+=16) {
                                if(pb[0]&0x80) {
diff -Nur build-tree/cromwell/Rules.make btree/cromwell/Rules.make
--- build-tree/cromwell/Rules.make      2004-09-10 19:32:25.000000000 +0200
+++ btree/cromwell/Rules.make   2005-08-06 18:03:25.000000000 +0200
@@ -9,7 +9,7 @@
 #
 .PHONY: dummy
 
-CFLAGSBR = -Wall -Werror 
+CFLAGSBR = -Wall 
 
 #
 # Special variables which should not be exported

Attachment: signature.asc
Description: Digital signature

Reply via email to