From: wdenk Date: Sun, 16 Dec 2001 01:59:51 +0000 (+0000) Subject: Make PPCBoot build in Cygwin environment X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=95663a8ce8a2640db14136ec9af28da612b91a1a;p=users%2Frw%2Fppcboot.git Make PPCBoot build in Cygwin environment Patch by Davide Viti, 5 Dec 2001 Plus a few fixes for newly introduced bugs --- diff --git a/CHANGELOG b/CHANGELOG index 1d7ab4d..e2e234d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -56,6 +56,9 @@ To do: Modifications for 1.1.3: ====================================================================== +* Make PPCBoot build in Cygwin environment + Patch by Davide Viti, 5 Dec 2001 + * Add CFG_USE_OSCCLK option to handle OCSM clock mode problem on MBX8xx (Based on email by Erik Theisen, 07 Dec 2001). diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c index 42aaf9c..74f28ed 100644 --- a/board/evb64260/eth.c +++ b/board/evb64260/eth.c @@ -24,6 +24,7 @@ Skeleton NIC driver for Etherboot #include #include #include +#include #include "eth.h" /* globals */ diff --git a/board/mbx8xx/mbx8xx.c b/board/mbx8xx/mbx8xx.c index a3f0aae..efdcd9f 100644 --- a/board/mbx8xx/mbx8xx.c +++ b/board/mbx8xx/mbx8xx.c @@ -244,7 +244,7 @@ int checkboard (void) vpd_packet_t *packet; int i; const char *const fmt = - "\n *** Warning: Low Battery Status - %s Battery ***"); + "\n *** Warning: Low Battery Status - %s Battery ***"; packet = vpd_find_packet (VPD_PID_PID); for (i = 0; i < packet->size; i++) { diff --git a/cpu/mpc824x/cpu.c b/cpu/mpc824x/cpu.c index 0c0d12a..6dabb59 100644 --- a/cpu/mpc824x/cpu.c +++ b/cpu/mpc824x/cpu.c @@ -127,7 +127,7 @@ unsigned long get_tbclk (void) #if defined(CONFIG_MPC8245) tbclk = (CONFIG_SYS_CLK_FREQ + 3L) / 4L; -#elif defined(CONFIG_CU824); +#elif defined(CONFIG_CU824) tbclk = CONFIG_SYS_CLK_FREQ; #else /* Pointer to initial global data area */ diff --git a/include/config_sbc8260.h b/include/config_sbc8260.h index a49c520..5d19384 100644 --- a/include/config_sbc8260.h +++ b/include/config_sbc8260.h @@ -298,21 +298,27 @@ #define CFG_PROMPT "=> " /* What ppcboot subsytems do you want enabled? */ -#define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \ +#ifdef CONFIG_ETHER_USE_FCC2 +# define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \ CFG_CMD_ELF | \ CFG_CMD_ASKENV | \ CFG_CMD_ECHO | \ CFG_CMD_I2C | \ CFG_CMD_REGINFO | \ CFG_CMD_IMMAP | \ -#ifdef CONFIG_ETHER_USE_FCC2 - CFG_CMD_MII | \ -#endif - 0 ) - + CFG_CMD_MII ) +#else +# define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \ + CFG_CMD_ELF | \ + CFG_CMD_ASKENV | \ + CFG_CMD_ECHO | \ + CFG_CMD_I2C | \ + CFG_CMD_REGINFO | \ + CFG_CMD_IMMAP ) +#endif /* CONFIG_ETHER_USE_FCC2 */ /* Where do the internal registers live? */ -#define CFG_IMMR 0xf0000000 +#define CFG_IMMR 0xF0000000 /***************************************************************************** * diff --git a/include/elf.h b/include/elf.h index 7e11be1..9dff9bf 100644 --- a/include/elf.h +++ b/include/elf.h @@ -41,6 +41,13 @@ #include #endif +#ifdef __CYGWIN__ +typedef unsigned long int uint32_t; +typedef unsigned short uint16_t; +typedef unsigned char uint8_t; +typedef long int int32_t; +#endif /* __CYGWIN__ */ + /* * This version doesn't work for 64-bit ABIs - Erik. */ diff --git a/include/image.h b/include/image.h index 70b8784..93bd18b 100644 --- a/include/image.h +++ b/include/image.h @@ -119,6 +119,11 @@ #define IH_MAGIC 0x27051956 /* Image Magic Number */ #define IH_NMLEN 32 /* Image Name Length */ +#ifdef __CYGWIN__ +typedef unsigned long uint32_t; +typedef unsigned char uint8_t; +#endif /* __CYGWIN__ */ + /* * all data in network byte order (aka natural aka bigendian) */ diff --git a/tools/Makefile b/tools/Makefile index e1cb243..37335be 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -86,6 +86,16 @@ HOST_ENVIRO_CFLAGS = endif endif +# +# Cygwin needs .exe files :-( +# +ifeq ($(HOSTOS),cygwin) ## ????? +SFX = .exe +else +SFX = +endif + + # # Include this after HOSTOS HOSTARCH check # so that we can act intelligently. @@ -104,22 +114,22 @@ MAKEDEPEND = makedepend all: .depend $(BINS) $(LOGO_H) subdirs -envcrc: envcrc.o crc32.o environment.o +envcrc$(SFX): envcrc.o crc32.o environment.o $(CC) $(CFLAGS) -o $@ $^ -img2srec: img2srec.o +img2srec$(SFX): img2srec.o $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(STRIP) $@ -mkimage: mkimage.o crc32.o +mkimage$(SFX): mkimage.o crc32.o $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(STRIP) $@ -gen_eth_addr: gen_eth_addr.o +gen_eth_addr$(SFX): gen_eth_addr.o $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(STRIP) $@ -bmp_logo: bmp_logo.o +bmp_logo$(SFX): bmp_logo.o $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(STRIP) $@ diff --git a/tools/bmp_logo.c b/tools/bmp_logo.c index 0810457..bd19414 100755 --- a/tools/bmp_logo.c +++ b/tools/bmp_logo.c @@ -7,6 +7,11 @@ #include #endif +#ifdef __CYGWIN__ +typedef unsigned short ushort; +#endif /* __CYGWIN__ */ + + typedef struct bitmap_s { /* bitmap description */ uint16_t width; uint16_t height;