]> www.infradead.org Git - users/rw/ppcboot.git/commitdiff
Make PPCBoot build in Cygwin environment
authorwdenk <wdenk>
Sun, 16 Dec 2001 01:59:51 +0000 (01:59 +0000)
committerwdenk <wdenk>
Sun, 16 Dec 2001 01:59:51 +0000 (01:59 +0000)
Patch by Davide Viti, 5 Dec 2001
Plus a few fixes for newly introduced bugs

CHANGELOG
board/evb64260/eth.c
board/mbx8xx/mbx8xx.c
cpu/mpc824x/cpu.c
include/config_sbc8260.h
include/elf.h
include/image.h
tools/Makefile
tools/bmp_logo.c

index 1d7ab4d47ce886ea8582071f5d1302fadbd2abf2..e2e234d3379fb7874cf5edd60e0800a06c1ffe28 100644 (file)
--- 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).
 
index 42aaf9c41606fed615d18c108414551d3babeb62..74f28ed732050840ea1914d7411f892affcb3dc1 100644 (file)
@@ -24,6 +24,7 @@ Skeleton NIC driver for Etherboot
 #include <malloc.h>
 #include <galileo/gt64260R.h>
 #include <galileo/core.h>
+#include <net.h>
 #include "eth.h"
 
 /* globals */
index a3f0aae310655c9638d660d51cf94f3f0a446602..efdcd9f69e5438fbb63edb18264befc4438caeff 100644 (file)
@@ -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++) {
index 0c0d12ade4415f5fe307ae796236ced0df1a5090..6dabb592f196fde3d08668b98785cf3307bfba5c 100644 (file)
@@ -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 */
index a49c52060f401f12a91070be5e82a7ed8241fad2..5d193846b1fd7dadddffa6bc815cbab764c02129 100644 (file)
 #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
 
 /*****************************************************************************
  *
index 7e11be1d536d9c012f38a5b66b0f1f972b037a2c..9dff9bf1300bc797b28fa7d068b925a678f04f74 100644 (file)
 #include <stdint.h>
 #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.
  */
index 70b878421a777cc6035f95405c36c6128e3d7258..93bd18bf7713060d359a68e3fc2e0f9dfb4cb7ae 100644 (file)
 #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)
  */
index e1cb24307ce900c0ab09d5c7313253ff2fbd2e96..37335be42266b921b68ef4eee4309b877a04acdd 100644 (file)
@@ -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) $@
 
index 0810457aa65764c28e3bd1b309878f7db6bf3d9e..bd19414ba07ff4f3e102651a79d7b7d695b6a6de 100755 (executable)
@@ -7,6 +7,11 @@
 #include <inttypes.h>
 #endif
 
+#ifdef __CYGWIN__
+typedef unsigned short ushort;
+#endif /* __CYGWIN__ */
+
+
 typedef struct bitmap_s {              /* bitmap description */
        uint16_t width;
        uint16_t height;