[U-Boot-Users] [PATCH] update for CSB226
Robert Schwebel
robert at schwebel.de
Mon Nov 4 13:19:05 CET 2002
Hi,
here is an updated patch for the Cogent CSB226 board (PXA250). Some
details which might require discussion:
arminfrastructure
-----------------
- The "reset" code didn't work for me in the version which was in the
repository. I've added a reset routine which works on the PXA250, but
I suspect the old variant might have run on some other XScale
processor? If yes, we should sort it out to some processor specific
file, if no my code can simply go in.
- lib_arm/armlinux.c: progress callbacks added
csb226
------
- progress information added
- added a function to access the LEDs (which are used as progress
indicators during boot)
- fixed flash erase routine (works now); writing is still broken
general
-------
- cmd_bootm.c: more verbose error message
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Braunschweiger Str. 79, 31134 Hildesheim, Germany
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Phone: +49-5121-28619-0 | Fax: +49-5121-28619-4
Visit us at the SPS/IPC/Drives 2002 in Nuernberg!
Hall 5, Booth 154 +++ Please contact us for details.
-------------- next part --------------
Index: cpu/xscale/start.S
===================================================================
RCS file: /cvsroot/u-boot/u-boot/cpu/xscale/start.S,v
retrieving revision 1.2
diff -u -b -B -w -p -u -r1.2 start.S
--- cpu/xscale/start.S 3 Nov 2002 18:03:56 -0000 1.2
+++ cpu/xscale/start.S 4 Nov 2002 11:41:19 -0000
@@ -167,6 +167,12 @@ IC_BASE: .word 0x40d00000
RST_BASE: .word 0x40f00030
#define RCSR 0x00
+/* Operating System Timer */
+OSTIMER_BASE: .word 0x40a00000
+#define OSMR3 0x0C
+#define OSCR 0x10
+#define OWER 0x18
+#define OIER 0x1C
/* Clock Manager Registers */
CC_BASE: .word 0x41300000
@@ -394,18 +400,38 @@ fiq:
#endif
-/*
- * FIXME How do we reset??? Watchdog timeout??
- */
+
+/****************************************************************************/
+/* */
+/* Reset function: the PXA250 doesn't have a reset function, so we have to */
+/* perform a watchdog timeout for a soft reset. */
+/* */
+/****************************************************************************/
+
.align 5
.globl reset_cpu
+
+ /* FIXME: this code is PXA250 specific. How is this handled on */
+ /* other XScale processors? */
+
reset_cpu:
- /*
- ldr r0, RST_BASE
- mov r1, #0x0 @ set bit 3-0 ...
- str r1, [r0, #RCSR] @ ... to clear in RCSR
- mov r1, #0x1
- str r1, [r0, #RCSR] @ and perform reset
- */
- b reset_cpu @ silly, but repeat endlessly
+
+ /* We set OWE:WME (watchdog enable) and wait until timeout happens */
+
+ ldr r0, OSTIMER_BASE
+ ldr r1, [r0, #OWER]
+ orr r1, r1, #0x0001 /* bit0: WME */
+ str r1, [r0, #OWER]
+
+ /* OS timer does only wrap every 1165 seconds, so we have to set */
+ /* the match register as well. */
+
+ ldr r1, [r0, #OSCR] /* read OS timer */
+ add r1, r1, #0x800 /* let OSMR3 match after */
+ add r1, r1, #0x800 /* 4096*(1/3.6864MHz)=1ms */
+ str r1, [r0, #OSMR3]
+
+reset_endless:
+
+ b reset_endless
Index: lib_arm/board.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/lib_arm/board.c,v
retrieving revision 1.2
diff -u -b -B -w -p -u -r1.2 board.c
--- lib_arm/board.c 3 Nov 2002 18:03:56 -0000 1.2
+++ lib_arm/board.c 4 Nov 2002 11:41:25 -0000
@@ -194,6 +194,7 @@ void start_armboot (void)
gd->bd = &bd_data;
memset (gd->bd, 0, sizeof (bd_t));
+ /* Call all init_* functions */
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr)() != 0) {
hang ();
Index: lib_arm/armlinux.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/lib_arm/armlinux.c,v
retrieving revision 1.2
diff -u -b -B -w -p -u -r1.2 armlinux.c
--- lib_arm/armlinux.c 3 Nov 2002 18:03:56 -0000 1.2
+++ lib_arm/armlinux.c 4 Nov 2002 11:41:24 -0000
@@ -32,6 +32,12 @@
#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
#define tag_next(t) ((struct tag *)((u32 *)(t) + (t)->hdr.size))
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
+#else
+# define SHOW_BOOT_PROGRESS(arg)
+#endif
+
#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
defined (CONFIG_CMDLINE_TAG) || \
defined (CONFIG_INITRD_TAG) || \
@@ -80,6 +86,8 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in
* Check if there is an initrd image
*/
if (argc >= 3) {
+ SHOW_BOOT_PROGRESS (9);
+
addr = simple_strtoul(argv[2], NULL, 16);
printf ("## Loading Ramdisk Image at %08lx ...\n", addr);
@@ -89,6 +97,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in
if (ntohl(hdr->ih_magic) != IH_MAGIC) {
printf ("Bad Magic Number\n");
+ SHOW_BOOT_PROGRESS (-10);
do_reset (cmdtp, flag, argc, argv);
}
@@ -100,9 +109,12 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in
if (crc32 (0, (char *)data, len) != checksum) {
printf ("Bad Header Checksum\n");
+ SHOW_BOOT_PROGRESS (-11);
do_reset (cmdtp, flag, argc, argv);
}
+ SHOW_BOOT_PROGRESS (10);
+
print_image_hdr (hdr);
data = addr + sizeof(image_header_t);
@@ -115,15 +127,19 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in
csum = crc32 (0, (char *)data, len);
if (csum != ntohl(hdr->ih_dcrc)) {
printf ("Bad Data CRC\n");
+ SHOW_BOOT_PROGRESS (-12);
do_reset (cmdtp, flag, argc, argv);
}
printf ("OK\n");
}
+ SHOW_BOOT_PROGRESS (11);
+
if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_ARM) ||
(hdr->ih_type != IH_TYPE_RAMDISK) ) {
printf ("No Linux ARM Ramdisk Image\n");
+ SHOW_BOOT_PROGRESS (-13);
do_reset (cmdtp, flag, argc, argv);
}
@@ -134,6 +150,8 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in
ulong tail = ntohl(len_ptr[0]) % 4;
int i;
+ SHOW_BOOT_PROGRESS (13);
+
/* skip kernel length and terminator */
data = (ulong)(&len_ptr[2]);
/* skip any additional image length fields */
@@ -151,6 +169,8 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in
/*
* no initrd image
*/
+ SHOW_BOOT_PROGRESS (14);
+
data = 0;
}
@@ -167,6 +187,8 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, in
initrd_start = 0;
initrd_end = 0;
}
+
+ SHOW_BOOT_PROGRESS (15);
#ifdef DEBUG
printf ("## Transferring control to Linux (at address %08lx) ...\n",
-------------- next part --------------
Index: board/csb226/csb226.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/csb226/csb226.c,v
retrieving revision 1.2
diff -u -b -B -w -p -u -r1.2 csb226.c
--- board/csb226/csb226.c 3 Nov 2002 17:56:38 -0000 1.2
+++ board/csb226/csb226.c 4 Nov 2002 11:41:12 -0000
@@ -24,14 +24,25 @@
*/
#include <common.h>
+#include <asm/arch/pxa-regs.h>
-/* ------------------------------------------------------------------------- */
-
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
+#else
+# define SHOW_BOOT_PROGRESS(arg)
+#endif
/*
* Miscelaneous platform dependent initialisations
*/
+
+/**
+ * board_init: - setup some data structures
+ *
+ * @return: 0 in case of success
+ */
+
int board_init (void)
{
DECLARE_GLOBAL_DATA_PTR;
@@ -48,6 +59,13 @@ int board_init (void)
return 0;
}
+
+/**
+ * dram_init: - setup dynamic RAM
+ *
+ * @return: 0 in case of success
+ */
+
int dram_init (void)
{
DECLARE_GLOBAL_DATA_PTR;
@@ -57,3 +75,62 @@ int dram_init (void)
return 0;
}
+
+
+/**
+ * csb226_set_led: - switch LEDs on or off
+ *
+ * @param led: LED to switch (0,1,2)
+ * @param state: switch on (1) or off (0)
+ */
+
+void csb226_set_led(int led, int state)
+{
+ switch(led) {
+
+ case 0: if (state==1) {
+ GPCR0 |= CSB226_USER_LED0;
+ } else if (state==0) {
+ GPSR0 |= CSB226_USER_LED0;
+ }
+ break;
+
+ case 1: if (state==1) {
+ GPCR0 |= CSB226_USER_LED1;
+ } else if (state==0) {
+ GPSR0 |= CSB226_USER_LED1;
+ }
+ break;
+
+ case 2: if (state==1) {
+ GPCR0 |= CSB226_USER_LED2;
+ } else if (state==0) {
+ GPSR0 |= CSB226_USER_LED2;
+ }
+ break;
+ }
+
+ return;
+}
+
+
+/**
+ * show_boot_progress: - indicate state of the boot process
+ *
+ * @param status: Status number - see README for details.
+ *
+ * The CSB226 does only have 3 LEDs, so we switch them on at the most
+ * important states (1, 5, 15).
+ */
+
+void show_boot_progress (int status)
+{
+ switch(status) {
+ case 1: csb226_set_led(0,1); break;
+ case 5: csb226_set_led(1,1); break;
+ case 15: csb226_set_led(2,1); break;
+ }
+
+ return;
+}
+
Index: board/csb226/flash.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/csb226/flash.c,v
retrieving revision 1.1.1.1
diff -u -b -B -w -p -u -r1.1.1.1 flash.c
--- board/csb226/flash.c 3 Nov 2002 00:31:20 -0000 1.1.1.1
+++ board/csb226/flash.c 4 Nov 2002 11:41:12 -0000
@@ -6,6 +6,9 @@
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* Marius Groeger <mgroeger at sysgo.de>
*
+ * (C) Copyright 2002
+ * Robert Schwebel, Pengutronix, <r.schwebel at pengutronix.de>
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -26,6 +29,7 @@
*/
#include <common.h>
+#include <asm/arch/pxa-regs.h>
#define FLASH_BANK_SIZE 0x02000000
#define MAIN_SECT_SIZE 0x40000 /* 2x16 = 256k per sector */
@@ -33,7 +37,10 @@
flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
-/*-----------------------------------------------------------------------
+/**
+ * flash_init: - initialize data structures for flash chips
+ *
+ * @return: size of the flash
*/
ulong flash_init(void)
@@ -41,8 +48,7 @@ ulong flash_init(void)
int i, j;
ulong size = 0;
- for (i = 0; i < CFG_MAX_FLASH_BANKS; i++)
- {
+ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) {
ulong flashbase = 0;
flash_info[i].flash_id =
(INTEL_MANUFACT & FLASH_VENDMASK) |
@@ -51,8 +57,7 @@ ulong flash_init(void)
flash_info[i].sector_count = CFG_MAX_FLASH_SECT;
memset(flash_info[i].protect, 0, CFG_MAX_FLASH_SECT);
- switch (i)
- {
+ switch (i) {
case 0:
flashbase = PHYS_FLASH_1;
break;
@@ -60,15 +65,13 @@ ulong flash_init(void)
panic("configured to many flash banks!\n");
break;
}
- for (j = 0; j < flash_info[i].sector_count; j++)
- {
+ for (j = 0; j < flash_info[i].sector_count; j++) {
flash_info[i].start[j] = flashbase + j*MAIN_SECT_SIZE;
}
size += flash_info[i].size;
}
- /* Protect monitor and environment sectors
- */
+ /* Protect monitor and environment sectors */
flash_protect(FLAG_PROTECT_SET,
CFG_FLASH_BASE,
CFG_FLASH_BASE + _armboot_end_data - _armboot_start,
@@ -82,8 +85,13 @@ ulong flash_init(void)
return size;
}
-/*-----------------------------------------------------------------------
+
+/**
+ * flash_print_info: - print information about the flash situation
+ *
+ * @param info:
*/
+
void flash_print_info (flash_info_t *info)
{
int i, j;
@@ -88,10 +96,10 @@ void flash_print_info (flash_info_t *in
{
int i, j;
- for (j=0; j<CFG_MAX_FLASH_BANKS; j++)
- {
- switch (info->flash_id & FLASH_VENDMASK)
- {
+ for (j=0; j<CFG_MAX_FLASH_BANKS; j++) {
+
+ switch (info->flash_id & FLASH_VENDMASK) {
+
case (INTEL_MANUFACT & FLASH_VENDMASK):
printf("Intel: ");
break;
@@ -100,38 +108,35 @@ void flash_print_info (flash_info_t *in
break;
}
- switch (info->flash_id & FLASH_TYPEMASK)
- {
+ switch (info->flash_id & FLASH_TYPEMASK) {
+
case (INTEL_ID_28F128J3 & FLASH_TYPEMASK):
printf("28F128J3 (128Mbit)\n");
break;
default:
printf("Unknown Chip Type\n");
- goto Done;
- break;
+ return;
}
printf(" Size: %ld MB in %d Sectors\n",
info->size >> 20, info->sector_count);
printf(" Sector Start Addresses:");
- for (i = 0; i < info->sector_count; i++)
- {
- if ((i % 5) == 0)
- {
- printf ("\n ");
- }
+ for (i = 0; i < info->sector_count; i++) {
+ if ((i % 5) == 0) printf ("\n ");
+
printf (" %08lX%s", info->start[i],
info->protect[i] ? " (RO)" : " ");
}
printf ("\n");
info++;
}
-
-Done:
}
-/*-----------------------------------------------------------------------
+
+/**
+ * flash_erase: - erase flash sectors
+ *
*/
int flash_erase (flash_info_t *info, int s_first, int s_last)
@@ -146,19 +151,15 @@ int flash_erase (flash_info_t *info, int
return ERR_INVAL;
}
- if ((info->flash_id & FLASH_VENDMASK) !=
- (INTEL_MANUFACT & FLASH_VENDMASK)) {
+ if ((info->flash_id & FLASH_VENDMASK) != (INTEL_MANUFACT & FLASH_VENDMASK))
return ERR_UNKNOWN_FLASH_VENDOR;
- }
prot = 0;
for (sect=s_first; sect<=s_last; ++sect) {
- if (info->protect[sect]) {
- prot++;
+ if (info->protect[sect]) prot++;
}
- }
- if (prot)
- return ERR_PROTECTED;
+
+ if (prot) return ERR_PROTECTED;
/*
* Disable interrupts which might cause a timeout
@@ -178,57 +180,63 @@ int flash_erase (flash_info_t *info, int
reset_timer_masked();
if (info->protect[sect] == 0) { /* not protected */
- /* vushort *addr = (vushort *)(info->start[sect]); */
- ushort *addr = (ushort *)(info->start[sect]);
+ u32 * volatile addr = (u32 * volatile)(info->start[sect]);
- *addr = 0x20; /* erase setup */
- *addr = 0xD0; /* erase confirm */
+ /* erase sector: */
+ /* The strata flashs are aligned side by side on */
+ /* the data bus, so we have to write the commands */
+ /* to both chips here: */
- while ((*addr & 0x80) != 0x80) {
+ *addr = 0x00200020; /* erase setup */
+ *addr = 0x00D000D0; /* erase confirm */
+
+ while ((*addr & 0x00800080) != 0x00800080) {
if (get_timer_masked() > CFG_FLASH_ERASE_TOUT) {
- *addr = 0xB0; /* suspend erase */
- *addr = 0xFF; /* reset to read mode */
+ *addr = 0x00B000B0; /* suspend erase*/
+ *addr = 0x00FF00FF; /* read mode */
rc = ERR_TIMOUT;
goto outahere;
}
}
- /* clear status register command */
- *addr = 0x50;
- /* reset to read mode */
- *addr = 0xFF;
+ *addr = 0x00500050; /* clear status register cmd. */
+ *addr = 0x00FF00FF; /* resest to read mode */
+
}
+
printf("ok.\n");
}
- if (ctrlc())
- printf("User Interrupt!\n");
+
+ if (ctrlc()) printf("User Interrupt!\n");
outahere:
/* allow flash to settle - wait 10 ms */
udelay_masked(10000);
- if (flag)
- enable_interrupts();
+ if (flag) enable_interrupts();
return rc;
}
-/*-----------------------------------------------------------------------
- * Copy memory to flash
+
+/**
+ * write_word: - copy memory to flash
+ *
+ * @param info:
+ * @param dest:
+ * @param data:
+ * @return:
*/
static int write_word (flash_info_t *info, ulong dest, ushort data)
{
- /* vushort *addr = (vushort *)dest, val; */
ushort *addr = (ushort *)dest, val;
int rc = ERR_OK;
int flag;
- /* Check if Flash is (sufficiently) erased
- */
- if ((*addr & data) != data)
- return ERR_NOT_ERASED;
+ /* Check if Flash is (sufficiently) erased */
+ if ((*addr & data) != data) return ERR_NOT_ERASED;
/*
* Disable interrupts which might cause a timeout
@@ -252,12 +260,10 @@ static int write_word (flash_info_t *inf
reset_timer_masked();
/* wait while polling the status register */
- while(((val = *addr) & 0x80) != 0x80)
- {
+ while(((val = *addr) & 0x80) != 0x80) {
if (get_timer_masked() > CFG_FLASH_WRITE_TOUT) {
rc = ERR_TIMOUT;
- /* suspend program command */
- *addr = 0xB0;
+ *addr = 0xB0; /* suspend program command */
goto outahere;
}
}
@@ -285,17 +291,23 @@ static int write_word (flash_info_t *inf
}
outahere:
- /* read array command */
- *addr = 0xFF;
- if (flag)
- enable_interrupts();
+ *addr = 0xFF; /* read array command */
+ if (flag) enable_interrupts();
return rc;
}
-/*-----------------------------------------------------------------------
- * Copy memory to flash.
+
+/**
+ * write_buf: - Copy memory to flash.
+ *
+ * @param info:
+ * @param src: source of copy transaction
+ * @param addr: where to copy to
+ * @param cnt: number of bytes to copy
+ *
+ * @return error code
*/
int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
@@ -344,9 +356,7 @@ int write_buff (flash_info_t *info, ucha
cnt -= 2;
}
- if (cnt == 0) {
- return ERR_OK;
- }
+ if (cnt == 0) return ERR_OK;
/*
* handle unaligned tail bytes
Index: include/configs/csb226.h
===================================================================
RCS file: /cvsroot/u-boot/u-boot/include/configs/csb226.h,v
retrieving revision 1.2
diff -u -b -B -w -p -u -r1.2 csb226.h
--- include/configs/csb226.h 3 Nov 2002 18:03:56 -0000 1.2
+++ include/configs/csb226.h 4 Nov 2002 12:07:52 -0000
@@ -74,6 +74,7 @@
#define CONFIG_IPADDR 192.168.1.56
#define CONFIG_SERVERIP 192.168.1.2
#define CONFIG_BOOTCOMMAND "bootm 0x40000"
+#define CONFIG_SHOW_BOOT_PROGRESS
#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
@@ -156,7 +157,7 @@
#define CFG_GPCR0_VAL 0x08022080
#define CFG_GPCR1_VAL 0x00000000
#define CFG_GPCR2_VAL 0x00000000
-#define CFG_GPDR0_VAL 0xCD82A858
+#define CFG_GPDR0_VAL 0xCD82A878
#define CFG_GPDR1_VAL 0xFCFFAB80
#define CFG_GPDR2_VAL 0x0001FFFF
#define CFG_GAFR0_L_VAL 0x80000000
@@ -191,10 +192,10 @@
#define CFG_MCIO0_VAL 0x00000000
#define CFG_MCIO1_VAL 0x00000000
-/*
-#define _LED 0x08000010
-#define LED_BLANK (0x08000040)
-*/
+#define CSB226_USER_LED0 0x00000008
+#define CSB226_USER_LED1 0x00000010
+#define CSB226_USER_LED2 0x00000020
+
/*
* FLASH and environment organization
-------------- next part --------------
Index: README
===================================================================
RCS file: /cvsroot/u-boot/u-boot/README,v
retrieving revision 1.2
diff -u -b -B -w -p -u -r1.2 README
--- README 3 Nov 2002 17:56:27 -0000 1.2
+++ README 4 Nov 2002 12:06:27 -0000
@@ -1624,6 +1624,14 @@ Low Level (hardware related) configurati
wrong setting might damage your board. Read
doc/README.MBX before setting this variable!
+
+Currently Undocumented Configuration Settings: (FIXME! RS)
+----------------------------------------------
+
+CFG_DRAM_BASE
+CFG_DRAM_SIZE
+
+
Building the Software:
======================
@@ -2545,6 +2553,22 @@ this:
... eventually: LCD or video framebuffer
... eventually: pRAM (Protected RAM - unchanged by reset)
0x00FF FFFF [End of RAM]
+
+[FIXME: this is how it is done today:]
+
+ 0x0000 0000 Exception Vector Code
+ :
+ 0xXXXX XXXX Free for Application Use
+ :
+ 0xXXXX XXXX stack
+ 0xXXXX XXXX bd_info and permanent copy of global data
+ 0xXXXX XXXX Malloc Area
+ 0xXXXX XXXX RAM Copy of Monitor Code
+ 0xXXXX XXXX Framebuffer
+ 0xXXXX XXXX pRAM (Protected RAM - not changed by reset)
+ 0xXXXX XXXX [End of RAM]
+
+[/FIXME]
System Initialization:
-------------- next part --------------
Index: MAKEALL
===================================================================
RCS file: /cvsroot/u-boot/u-boot/MAKEALL,v
retrieving revision 1.1.1.1
diff -u -b -B -w -p -u -r1.1.1.1 MAKEALL
--- MAKEALL 2 Nov 2002 23:20:03 -0000 1.1.1.1
+++ MAKEALL 4 Nov 2002 11:41:05 -0000
@@ -117,7 +117,7 @@ build_target() {
${MAKE} distclean >/dev/null
${MAKE} ${target}_config
${MAKE} all 2>&1 >LOG/$target.MAKELOG | tee LOG/$target.ERR
- ${CROSS_COMPILE:-ppc_8xx-}size u-boot | tee -a LOG/$target.MAKELOG
+ ${CROSS_COMPILE}size ppcboot | tee -a LOG/$target.MAKELOG
}
#-----------------------------------------------------------------------
Index: Makefile
===================================================================
RCS file: /cvsroot/u-boot/u-boot/Makefile,v
retrieving revision 1.1.1.1
diff -u -b -B -w -p -u -r1.1.1.1 Makefile
--- Makefile 2 Nov 2002 23:21:03 -0000 1.1.1.1
+++ Makefile 4 Nov 2002 11:41:06 -0000
@@ -72,7 +72,7 @@ ifeq ($(ARCH),ppc)
CROSS_COMPILE = ppc_8xx-
endif
ifeq ($(ARCH),arm)
-CROSS_COMPILE = arm_920TDI-
+CROSS_COMPILE = arm-linux-
endif
endif
endif
Index: common/cmd_bootm.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/common/cmd_bootm.c,v
retrieving revision 1.1.1.1
diff -u -b -B -w -p -u -r1.1.1.1 cmd_bootm.c
--- common/cmd_bootm.c 3 Nov 2002 00:06:22 -0000 1.1.1.1
+++ common/cmd_bootm.c 4 Nov 2002 11:41:17 -0000
@@ -884,7 +884,15 @@ int gunzip(void *dst, int dstlen, unsign
r = inflateInit2(&s, -MAX_WBITS);
if (r != Z_OK) {
- printf ("Error: inflateInit2() returned %d\n", r);
+ printf ("Error: inflateInit2() returned %d (", r);
+ switch (r) {
+ case Z_ERRNO: printf("ERRNO"); break;
+ case Z_STREAM_ERROR: printf("STREAM_ERROR"); break;
+ case Z_DATA_ERROR: printf("DATA_ERROR"); break;
+ case Z_MEM_ERROR: printf("MEM_ERROR"); break;
+ case Z_BUF_ERROR: printf("BUF_ERROR"); break;
+ }
+ printf(")\n");
return (-1);
}
s.next_in = src + i;
More information about the U-Boot
mailing list