Hi, I'm providing an updated version of this patch for upstream CVS. There's also replacement of the -mcpu=pentium flag to -march=i686, which is the optimal for Xbox's celeron AFAIK, and also shuts up a gcc4 warning.
-- Robert Millan
diff -ur cromwell.old/Makefile cromwell/Makefile --- cromwell.old/Makefile 2005-07-26 21:19:27.000000000 +0200 +++ cromwell/Makefile 2005-12-04 09:20:11.128975304 +0100 @@ -14,7 +14,7 @@ CROM_CFLAGS=$(INCLUDE) #You can override these if you wish. -CFLAGS= -O2 -g -mcpu=pentium -Werror -pipe -fomit-frame-pointer -Wstrict-prototypes +CFLAGS= -Os -g -march=i686 -pipe -fomit-frame-pointer -Wstrict-prototypes # add the option for gcc 3.3 only, again, non-overridable ifeq ($(GCC_3.3), 1) @@ -33,7 +33,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 -march=i686 $(ETH_INCLUDE) -Wstrict-prototypes -fomit-frame-pointer -pipe -Ui386 endif LDFLAGS-ROM = -s -S -T $(TOPDIR)/scripts/ldscript-crom.ld diff -ur cromwell.old/Rules.make cromwell/Rules.make --- cromwell.old/Rules.make 2004-12-20 19:59:21.000000000 +0100 +++ cromwell/Rules.make 2005-12-04 09:19:24.787020352 +0100 @@ -7,7 +7,7 @@ # .PHONY: dummy -CFLAGSBR = -Wall -Werror +CFLAGSBR = -Wall # # Special variables which should not be exported diff -ur cromwell.old/lib/gzip/misc.c cromwell/lib/gzip/misc.c --- cromwell.old/lib/gzip/misc.c 2005-02-27 19:42:02.000000000 +0100 +++ cromwell/lib/gzip/misc.c 2005-12-04 09:19:24.582051512 +0100 @@ -21,6 +21,10 @@ #define OF(args) args #define STATIC static +// 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 -ur cromwell.old/menu/actions/VideoMenuActions.c cromwell/menu/actions/VideoMenuActions.c --- cromwell.old/menu/actions/VideoMenuActions.c 2005-06-12 18:59:55.000000000 +0200 +++ cromwell/menu/actions/VideoMenuActions.c 2005-12-04 09:19:24.691034944 +0100 @@ -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 -ur cromwell.old/menu/iconmenu/IconMenuInit.c cromwell/menu/iconmenu/IconMenuInit.c --- cromwell.old/menu/iconmenu/IconMenuInit.c 2005-02-23 00:29:28.000000000 +0100 +++ cromwell/menu/iconmenu/IconMenuInit.c 2005-12-04 09:19:24.785020656 +0100 @@ -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) {