diff --git a/CHANGELOG b/CHANGELOG index 69ddff983847f5f9d13972f6d2da1cdb61801b51..a0c3660e179fb116c330a3ac75953dc46e63a849 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,18 @@ Changes since U-Boot 1.0.0: ====================================================================== +* Use "-fPIC" instead of "-mrelocatable" to prevent problems with + recent tools + +* Add checksum verification to 'imls' command + +* Add bd_info fields needed for 4xx Linux I2C driver + +* Patch by Martin Krause, 4 Nov. 2003: + Fix error in cmd_vfd.c (TRAB board: "vfd /1" shows now only one Bitmap) + +* Print used network interface when CONFIG_NET_MULTI is set + * Patch by Bernhard Kuhn, 28 Oct 2003: Add low boot support for MPC5200 diff --git a/board/MAI/bios_emulator/scitech/src/x86emu/makefile.cross b/board/MAI/bios_emulator/scitech/src/x86emu/makefile.cross index 56f3cd766d0d33b711570d8388278411a6814188..0bce9a96e5e68beee1551afc5e05fe957dd485d6 100644 --- a/board/MAI/bios_emulator/scitech/src/x86emu/makefile.cross +++ b/board/MAI/bios_emulator/scitech/src/x86emu/makefile.cross @@ -63,7 +63,7 @@ $(TARGETDEBUGLIB): $(DEBUGOBJS) $(AR) rv $(TARGETDEBUGLIB) $(DEBUGOBJS) INCS = -I. -Ix86emu -I../../include -CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -mrelocatable -ffixed-r14 -meabi -mrelocatable -ffixed-r14 -meabi +CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -fPIC -ffixed-r14 -meabi CDEBUGFLAGS = -DDEBUG .c.o: diff --git a/board/MAI/bios_emulator/scitech/src/x86emu/makefile.uboot b/board/MAI/bios_emulator/scitech/src/x86emu/makefile.uboot index d011cf5f67346fec1175f0c25c302372cceb7f98..af9ae1f5895a92cbcaebaf28c893d8e3996d7264 100644 --- a/board/MAI/bios_emulator/scitech/src/x86emu/makefile.uboot +++ b/board/MAI/bios_emulator/scitech/src/x86emu/makefile.uboot @@ -61,7 +61,7 @@ $(TARGETDEBUGLIB): $(DEBUGOBJS) $(AR) rv $(TARGETDEBUGLIB) $(DEBUGOBJS) INCS = -I. -Ix86emu -I../../include -CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -mrelocatable -ffixed-r14 -meabi -mrelocatable -ffixed-r14 -meabi +CFLAGS = -D__DRIVER__ -DFORCE_POST -D_CEXPORT= -DNO_LONG_LONG -Dprintk=printf -fsigned-char -fomit-frame-pointer -fPIC -ffixed-r14 -meabi CDEBUGFLAGS = -DDEBUG .c.o: diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index e30d212b0c9be94ac7927cd47eae121969f059f1..c4a8685ce33ce65ecc2680be2b03777558274287 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1056,7 +1056,7 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) flash_info_t *info; int i, j; image_header_t *hdr; - ulong checksum; + ulong data, len, checksum; for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) { if (info->flash_id == FLASH_UNKNOWN) @@ -1079,7 +1079,15 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("Image at %08lX:\n", (ulong)hdr); print_image_hdr( hdr ); - putc ('\n'); + + data = (ulong)hdr + sizeof(image_header_t); + len = ntohl(hdr->ih_size); + + printf (" Verifying Checksum ... "); + if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) { + printf (" Bad Data CRC\n"); + } + printf ("OK\n"); next_sector: ; } next_bank: ; diff --git a/common/cmd_vfd.c b/common/cmd_vfd.c index 118c50dcbc0591e48d45967bdb468db7781b836e..5e623a2705377af48f1ee4d2c5d9b0c4b1c550b3 100644 --- a/common/cmd_vfd.c +++ b/common/cmd_vfd.c @@ -90,8 +90,6 @@ int trab_vfd (ulong bitmap) } break; case VFD_REMOTE_LOGO_BMPNR: - transfer_pic(3, &vfd_remote_logo_bitmap[0], - VFD_LOGO_HEIGHT, VFD_LOGO_WIDTH); if ((s = getenv ("bitmap1")) != NULL) { addr = (uchar *)simple_strtoul (s, NULL, 16); } else { diff --git a/cpu/74xx_7xx/config.mk b/cpu/74xx_7xx/config.mk index 5623c461b4c76935fcc362e4ad92e514d04177ae..d65b506730db759926a42b14351594e69ee0a6fb 100644 --- a/cpu/74xx_7xx/config.mk +++ b/cpu/74xx_7xx/config.mk @@ -21,7 +21,6 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -ffixed-r29 -mstring -##PLATFORM_CPPFLAGS += -DCONFIG_74xx_7xx -ffixed-r2 -mstring diff --git a/cpu/mpc5xx/config.mk b/cpu/mpc5xx/config.mk index cfed4994ce7dde38077168064bfa7c3ee17fb227..5b26a76b3e8f4530d48fc13c89dea67a6bd80941 100644 --- a/cpu/mpc5xx/config.mk +++ b/cpu/mpc5xx/config.mk @@ -28,6 +28,6 @@ # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -PLATFORM_CPPFLAGS += -DCONFIG_5xx -ffixed-r2 -ffixed-r29 -mpowerpc -msoft-float +PLATFORM_CPPFLAGS += -DCONFIG_5xx -ffixed-r2 -ffixed-r29 -mpowerpc -msoft-float diff --git a/cpu/mpc5xxx/config.mk b/cpu/mpc5xxx/config.mk index f84b098cae292210449bd4690460253f44b97177..0bee6d1347f0d04370941255f7c2068206d4da3b 100644 --- a/cpu/mpc5xxx/config.mk +++ b/cpu/mpc5xxx/config.mk @@ -21,7 +21,7 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_MPC5XXX -ffixed-r2 -ffixed-r29 \ -mstring -mcpu=603e -mmultiple diff --git a/cpu/mpc824x/config.mk b/cpu/mpc824x/config.mk index 07648989581d696b5236e4c50849c23859ee7b19..5011ddb52f0bbe6296457ede81961182b30e82b1 100644 --- a/cpu/mpc824x/config.mk +++ b/cpu/mpc824x/config.mk @@ -21,7 +21,6 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -msoft-float -##PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -mstring -mcpu=603e -msoft-float diff --git a/cpu/mpc8260/config.mk b/cpu/mpc8260/config.mk index 2ebed5b28aa69caa0d616afe07ffdc3debd7b1ff..3b2892481db01de7b794bfe5e3df70f43459371d 100644 --- a/cpu/mpc8260/config.mk +++ b/cpu/mpc8260/config.mk @@ -21,7 +21,7 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_8260 -ffixed-r2 -ffixed-r29 \ -mstring -mcpu=603e -mmultiple diff --git a/cpu/mpc85xx/config.mk b/cpu/mpc85xx/config.mk index c12e9230668fa16c3b1cbc72bc4387c4779f4a83..4b11fc7378d4e29fcdf7e96bef357d626928f8fc 100644 --- a/cpu/mpc85xx/config.mk +++ b/cpu/mpc85xx/config.mk @@ -21,6 +21,6 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float diff --git a/cpu/mpc8xx/config.mk b/cpu/mpc8xx/config.mk index 45fd00c0cfa7633d4d669d7e177302de529d56ca..94c68db638f7fb683c6ef08778059e292fd85c66 100644 --- a/cpu/mpc8xx/config.mk +++ b/cpu/mpc8xx/config.mk @@ -21,7 +21,6 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -ffixed-r29 -mstring -mcpu=860 -msoft-float -##PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float diff --git a/cpu/ppc4xx/config.mk b/cpu/ppc4xx/config.mk index ffcc24f4389d40b2d39876cdcf94c6f94549b992..bbbf8c2be8e816bd06e055b575a308537db5c57e 100644 --- a/cpu/ppc4xx/config.mk +++ b/cpu/ppc4xx/config.mk @@ -21,7 +21,6 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -ffixed-r29 -mstring -Wa,-m405 -mcpu=405 -msoft-float -##PLATFORM_CPPFLAGS += -DCONFIG_4xx -ffixed-r2 -mstring -mcpu=403 -msoft-float diff --git a/include/asm-ppc/u-boot.h b/include/asm-ppc/u-boot.h index f8cbeede5d0260585c6edf250e6a2d98da511166..a442003ccb623d9ea2bd7903e1245523bb3095b1 100644 --- a/include/asm-ppc/u-boot.h +++ b/include/asm-ppc/u-boot.h @@ -92,6 +92,10 @@ typedef struct bd_info { /* third onboard ethernet port */ unsigned char bi_enet2addr[6]; #endif +#if defined(CONFIG_405GP) || defined(CONFIG_405EP) + unsigned int bi_opbfreq; /* OPB clock in Hz */ + int bi_iic_fast[2]; /* Use fast i2c mode */ +#endif #if defined(CONFIG_NX823) unsigned char bi_sernum[8]; #endif diff --git a/include/configs/PPChameleonEVB.h b/include/configs/PPChameleonEVB.h index b480114373b9cda84e4cd53e217a04e0db23729c..78ae6ba9c057561d8c759786c33b68d7e48881d8 100644 --- a/include/configs/PPChameleonEVB.h +++ b/include/configs/PPChameleonEVB.h @@ -691,4 +691,6 @@ #endif #endif +#define CFG_OPB_FREQ 50000000 + #endif /* __CONFIG_H */ diff --git a/include/net.h b/include/net.h index 98d59e73c273d235434092c5210c9b1073feca2e..39debc673d6aa53a0f3d00f5c3c8dfbe4053f736 100644 --- a/include/net.h +++ b/include/net.h @@ -117,6 +117,7 @@ extern int eth_init(bd_t *bis); /* Initialize the device */ extern int eth_send(volatile void *packet, int length); /* Send a packet */ extern int eth_rx(void); /* Check for received packets */ extern void eth_halt(void); /* stop SCC */ +extern char *eth_get_name(void); /* get name of current device */ /**********************************************************************/ diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 35a8276f1f8eb697234cf2093ebc92d2d9080b52..ea8adb91e055d05a68ebdd0794acc8e983d3b8d3 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -501,6 +501,14 @@ void board_init_f (ulong bootflag) bd->bi_plb_busfreq = gd->bus_clk; #if defined(CONFIG_405GP) || defined(CONFIG_405EP) bd->bi_pci_busfreq = get_PCI_freq (); + +#ifdef CFG_OPB_FREQ + bd->bi_opbfreq = CFG_OPB_FREQ; +#else + bd->bi_opbfreq = 50000000; +#endif + bd->bi_iic_fast[0] = 0; + bd->bi_iic_fast[1] = 0; #endif #endif diff --git a/net/eth.c b/net/eth.c index 012158b7dc056c96f21e9f6b204da4a754a00d73..eabbf631b3978f1b177f57fb2e56427bc9f6301a 100644 --- a/net/eth.c +++ b/net/eth.c @@ -324,4 +324,8 @@ void eth_try_another(int first_restart) } } +char *eth_get_name (void) +{ + return (eth_current ? eth_current->name : "unknown"); +} #endif diff --git a/net/tftp.c b/net/tftp.c index 049df6830a0f79f6021aa2ee5b559cfc12f01faa..d1a30d6643923548998c7fb20821794f2a2c406a 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -294,6 +294,9 @@ TftpStart (void) tftp_filename = BootFile; } +#if defined(CONFIG_NET_MULTI) + printf ("Using %s device\n", eth_get_name()); +#endif puts ("TFTP from server "); print_IPaddr (NetServerIP); puts ("; our IP address is "); print_IPaddr (NetOurIP); diff --git a/tools/mkimage.c b/tools/mkimage.c index 0e83546550e1c9d5757bfb1080234e5f66567464..9ec02ce2b876d8c5a6e54e4be65cd173f6cd440c 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -291,7 +291,7 @@ NXTARG: ; exit (EXIT_FAILURE); } - if (sbuf.st_size < sizeof(image_header_t)) { + if ((unsigned)sbuf.st_size < sizeof(image_header_t)) { fprintf (stderr, "%s: Bad size: \"%s\" is no valid image\n", cmdname, imagefile); @@ -530,7 +530,7 @@ copy_file (int ifd, const char *datafile, int pad) * reserved for it. */ - if (sbuf.st_size < sizeof(image_header_t)) { + if ((unsigned)sbuf.st_size < sizeof(image_header_t)) { fprintf (stderr, "%s: Bad size: \"%s\" is too small for XIP\n", cmdname, datafile);