From e559a6901ae1c5cd02fbd909631b843975f84bbc Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 11 Jan 2006 16:41:35 -0600 Subject: Add support for passing initrd information via flat device tree Patch by Kumar Gala 11 Jan 2006 --- common/cmd_bootm.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'common/cmd_bootm.c') diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 8599a49d0..9562dbe5a 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -819,7 +819,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, (*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end); #else - ft_setup(of_flat_tree, OF_FLAT_TREE_MAX_SIZE, kbd); + ft_setup(of_flat_tree, OF_FLAT_TREE_MAX_SIZE, kbd, initrd_start, initrd_end); /* ft_dump_blob(of_flat_tree); */ #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500) @@ -828,12 +828,16 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, /* * Linux Kernel Parameters: * r3: ptr to OF flat tree, followed by the board info data - * r4: initrd_start or 0 if no initrd - * r5: initrd_end - unused if r4 is 0 - * r6: Start of command line string - * r7: End of command line string + * r4: physical pointer to the kernel itself + * r5: NULL + * r6: NULL + * r7: NULL */ - (*kernel) ((bd_t *)of_flat_tree, initrd_start, initrd_end, cmd_start, cmd_end); + if (getenv("disable_of") != NULL) + (*kernel) ((bd_t *)of_flat_tree, initrd_start, initrd_end, + cmd_start, cmd_end); + else + (*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0); #endif } -- cgit v1.2.3-70-g09d2 From dc013d464000635a5b8ae841c6e683f94a6bee3d Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 12 Mar 2006 01:59:35 +0100 Subject: Add loads of ntohl() in image header handling Patch by Steven Scholz, 10 Jun 2005 --- CHANGELOG | 3 +++ common/cmd_bootm.c | 18 +++++++++--------- common/cmd_doc.c | 2 +- common/cmd_fdc.c | 4 ++-- common/cmd_nand.c | 2 +- common/lynxkdi.c | 8 ++++---- 6 files changed, 20 insertions(+), 17 deletions(-) (limited to 'common/cmd_bootm.c') diff --git a/CHANGELOG b/CHANGELOG index c4c412419..a11dd4d74 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes since U-Boot 1.1.4: ====================================================================== +* Add loads of ntohl() in image header handling + Patch by Steven Scholz, 10 Jun 2005 + * Switch MPC86xADS and MPC885ADS boards to use cpuclk environment variable to set clock Patch by Yuli Barcohen, 05 Jun 2005 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 8599a49d0..8bb524bfe 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -606,7 +606,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, #endif /* CONFIG_MPC5xxx */ } - kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))hdr->ih_ep; + kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong)) ntohl(hdr->ih_ep); /* * Check if there is an initrd image @@ -621,7 +621,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, /* Copy header so we can blank CRC field for re-calculation */ memmove (&header, (char *)addr, sizeof(image_header_t)); - if (hdr->ih_magic != IH_MAGIC) { + if (ntohl(hdr->ih_magic) != IH_MAGIC) { puts ("Bad Magic Number\n"); SHOW_BOOT_PROGRESS (-10); do_reset (cmdtp, flag, argc, argv); @@ -630,7 +630,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, data = (ulong)&header; len = sizeof(image_header_t); - checksum = hdr->ih_hcrc; + checksum = ntohl(hdr->ih_hcrc); hdr->ih_hcrc = 0; if (crc32 (0, (uchar *)data, len) != checksum) { @@ -644,7 +644,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, print_image_hdr (hdr); data = addr + sizeof(image_header_t); - len = hdr->ih_size; + len = ntohl(hdr->ih_size); if (verify) { ulong csum = 0; @@ -670,7 +670,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, csum = crc32 (0, (uchar *)data, len); #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ - if (csum != hdr->ih_dcrc) { + if (csum != ntohl(hdr->ih_dcrc)) { puts ("Bad Data CRC\n"); SHOW_BOOT_PROGRESS (-12); do_reset (cmdtp, flag, argc, argv); @@ -902,7 +902,7 @@ do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag, cmdline = ""; } - loader = (void (*)(bd_t *, image_header_t *, char *, char *)) hdr->ih_ep; + loader = (void (*)(bd_t *, image_header_t *, char *, char *)) ntohl(hdr->ih_ep); printf ("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n", (ulong)loader); @@ -1364,7 +1364,7 @@ do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], image_header_t *hdr = &header; void (*entry_point)(bd_t *); - entry_point = (void (*)(bd_t *)) hdr->ih_ep; + entry_point = (void (*)(bd_t *)) ntohl(hdr->ih_ep); printf ("## Transferring control to RTEMS (at address %08lx) ...\n", (ulong)entry_point); @@ -1387,7 +1387,7 @@ do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], image_header_t *hdr = &header; char str[80]; - sprintf(str, "%x", hdr->ih_ep); /* write entry-point into string */ + sprintf(str, "%x", ntohl(hdr->ih_ep)); /* write entry-point into string */ setenv("loadaddr", str); do_bootvx(cmdtp, 0, 0, NULL); } @@ -1400,7 +1400,7 @@ do_bootm_qnxelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], char *local_args[2]; char str[16]; - sprintf(str, "%x", hdr->ih_ep); /* write entry-point into string */ + sprintf(str, "%x", ntohl(hdr->ih_ep)); /* write entry-point into string */ local_args[0] = argv[0]; local_args[1] = str; /* and provide it via the arguments */ do_bootelf(cmdtp, 0, 2, local_args); diff --git a/common/cmd_doc.c b/common/cmd_doc.c index c726957ca..37b7325be 100644 --- a/common/cmd_doc.c +++ b/common/cmd_doc.c @@ -250,7 +250,7 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_image_hdr (hdr); - cnt = (hdr->ih_size + sizeof(image_header_t)); + cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t)); cnt -= SECTORSIZE; } else { puts ("\n** Bad Magic Number **\n"); diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index 02dffa38e..03f4ce6d3 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -836,13 +836,13 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } hdr = (image_header_t *)addr; - if (hdr->ih_magic != IH_MAGIC) { + if (ntohl(hdr->ih_magic) != IH_MAGIC) { printf ("Bad Magic Number\n"); return 1; } print_image_hdr(hdr); - imsize= hdr->ih_size+sizeof(image_header_t); + imsize= ntohl(hdr->ih_size)+sizeof(image_header_t); nrofblk=imsize/512; if((imsize%512)>0) nrofblk++; diff --git a/common/cmd_nand.c b/common/cmd_nand.c index bb51d91fb..21adb1b47 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -717,7 +717,7 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) cnt = (ntohl(hdr->ih_size) + sizeof(image_header_t)); cnt -= SECTORSIZE; } else { - printf ("\n** Bad Magic Number 0x%x **\n", hdr->ih_magic); + printf ("\n** Bad Magic Number 0x%x **\n", ntohl(hdr->ih_magic)); SHOW_BOOT_PROGRESS (-1); return 1; } diff --git a/common/lynxkdi.c b/common/lynxkdi.c index 797d8cc88..ed1b595b8 100644 --- a/common/lynxkdi.c +++ b/common/lynxkdi.c @@ -23,11 +23,11 @@ #if defined(CONFIG_MPC8260) || defined(CONFIG_440EP) || defined(CONFIG_440GR) void lynxkdi_boot ( image_header_t *hdr ) { - void (*lynxkdi)(void) = (void(*)(void))hdr->ih_ep; + void (*lynxkdi)(void) = (void(*)(void)) ntohl(hdr->ih_ep); lynxos_bootparms_t *parms = (lynxos_bootparms_t *)0x0020; bd_t *kbd; DECLARE_GLOBAL_DATA_PTR; - u32 *psz = (u32 *)(hdr->ih_load + 0x0204); + u32 *psz = (u32 *)(ntohl(hdr->ih_load) + 0x0204); memset( parms, 0, sizeof(*parms)); kbd = gd->bd; @@ -39,9 +39,9 @@ void lynxkdi_boot ( image_header_t *hdr ) /* Do a simple check for Bluecat so we can pass the * kernel command line parameters. */ - if( le32_to_cpu(*psz) == hdr->ih_size ){ + if( le32_to_cpu(*psz) == ntohl(hdr->ih_size) ){ /* FIXME: NOT SURE HERE ! */ char *args; - char *cmdline = (char *)(hdr->ih_load + 0x020c); + char *cmdline = (char *)(ntohl(hdr->ih_load) + 0x020c); int len; printf("Booting Bluecat KDI ...\n"); -- cgit v1.2.3-70-g09d2 From 0afe519a433184fb1270ff0823971130353a807f Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 12 Mar 2006 02:10:00 +0100 Subject: Add ADI Blackfin support - add support for Analog Devices Blackfin BF533 CPU - add support for the ADI BF533 Stamp uClinux board - add support for the ADI BF533 EZKit board Patches by Richard Klingler, June 11th 2005: --- CHANGELOG | 6 ++++++ Makefile | 21 +++++++++++++++++++++ common/cmd_bootm.c | 2 ++ config.mk | 4 ++++ drivers/cfi_flash.c | 12 ++++++++++++ drivers/smc91111.c | 9 +++++++++ drivers/smc91111.h | 4 ++++ examples/Makefile | 9 +++++++++ examples/smc91111_eeprom.c | 6 ++---- examples/stubs.c | 13 +++++++++++++ include/flash.h | 1 + include/image.h | 1 + include/linux/stat.h | 2 +- rtc/Makefile | 4 ++-- tools/mkimage.c | 1 + 15 files changed, 88 insertions(+), 7 deletions(-) (limited to 'common/cmd_bootm.c') diff --git a/CHANGELOG b/CHANGELOG index a11dd4d74..20e875aab 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,12 @@ Changes since U-Boot 1.1.4: ====================================================================== +* Add ADI Blackfin support + - add support for Analog Devices Blackfin BF533 CPU + - add support for the ADI BF533 Stamp uClinux board + - add support for the ADI BF533 EZKit board + Patches by Richard Klingler, 11 Jun 2005 + * Add loads of ntohl() in image header handling Patch by Steven Scholz, 10 Jun 2005 diff --git a/Makefile b/Makefile index fefcbbac0..0c8137f0e 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,9 @@ endif ifeq ($(ARCH),microblaze) CROSS_COMPILE = mb- endif +ifeq ($(ARCH),blackfin) +CROSS_COMPILE = bfin-elf- +endif endif endif @@ -111,6 +114,10 @@ endif ifeq ($(CPU),mpc85xx) OBJS += cpu/$(CPU)/resetvec.o endif +ifeq ($(CPU),bf533) +OBJS += cpu/$(CPU)/start1.o cpu/$(CPU)/interrupt.o cpu/$(CPU)/cache.o +OBJS += cpu/$(CPU)/cplbhdlr.o cpu/$(CPU)/cplbmgr.o cpu/$(CPU)/flush.o +endif LIBS = lib_generic/libgeneric.a LIBS += board/$(BOARDDIR)/lib$(BOARD).a @@ -1859,6 +1866,19 @@ suzaku_config: unconfig @echo "#define CONFIG_SUZAKU 1" >> include/config.h @./mkconfig -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno +######################################################################### +## Blackfin +######################################################################### +ezkit533_config : unconfig + @./mkconfig $(@:_config=) blackfin bf533 ezkit533 + +stamp_config : unconfig + @./mkconfig $(@:_config=) blackfin bf533 stamp + +dspstamp_config : unconfig + @./mkconfig $(@:_config=) blackfin bf533 dsp_stamp + +######################################################################### ######################################################################### ######################################################################### @@ -1870,6 +1890,7 @@ clean: rm -f examples/hello_world examples/timer \ examples/eepro100_eeprom examples/sched \ examples/mem_to_mem_idma2intr examples/82559_eeprom \ + examples/smc91111_eeprom \ examples/test_burst rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr rm -f tools/mpc86x_clk tools/ncb diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 8bb524bfe..5b93bddf9 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -252,6 +252,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (hdr->ih_arch != IH_CPU_MICROBLAZE) #elif defined(__nios2__) if (hdr->ih_arch != IH_CPU_NIOS2) +#elif defined(__blackfin__) + if (hdr->ih_arch != IH_CPU_BLACKFIN) #else # error Unknown CPU type #endif diff --git a/config.mk b/config.mk index d85ac36b5..dfbb1b7c6 100644 --- a/config.mk +++ b/config.mk @@ -53,6 +53,10 @@ PLATFORM_CPPFLAGS+= -D__ARM__ endif endif +ifeq ($(ARCH),blackfin) +PLATFORM_CPPFLAGS+= -D__BLACKFIN__ -mno-underscore +endif + ifdef ARCH sinclude $(TOPDIR)/$(ARCH)_config.mk # include architecture dependend rules endif diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c index ff4d85f3f..a989d3466 100644 --- a/drivers/cfi_flash.c +++ b/drivers/cfi_flash.c @@ -878,18 +878,27 @@ static void flash_write_cmd (flash_info_t * info, flash_sect_t sect, uint offset debug ("fwc addr %p cmd %x %x 8bit x %d bit\n", addr.cp, cmd, cword.c, info->chipwidth << CFI_FLASH_SHIFT_WIDTH); *addr.cp = cword.c; +#ifdef CONFIG_BLACKFIN + asm("ssync;"); +#endif break; case FLASH_CFI_16BIT: debug ("fwc addr %p cmd %x %4.4x 16bit x %d bit\n", addr.wp, cmd, cword.w, info->chipwidth << CFI_FLASH_SHIFT_WIDTH); *addr.wp = cword.w; +#ifdef CONFIG_BLACKFIN + asm("ssync;"); +#endif break; case FLASH_CFI_32BIT: debug ("fwc addr %p cmd %x %8.8lx 32bit x %d bit\n", addr.lp, cmd, cword.l, info->chipwidth << CFI_FLASH_SHIFT_WIDTH); *addr.lp = cword.l; +#ifdef CONFIG_BLACKFIN + asm("ssync;"); +#endif break; case FLASH_CFI_64BIT: #ifdef DEBUG @@ -904,6 +913,9 @@ static void flash_write_cmd (flash_info_t * info, flash_sect_t sect, uint offset } #endif *addr.llp = cword.ll; +#ifdef CONFIG_BLACKFIN + asm("ssync;"); +#endif break; } } diff --git a/drivers/smc91111.c b/drivers/smc91111.c index 84e243ddd..f91e4b984 100644 --- a/drivers/smc91111.c +++ b/drivers/smc91111.c @@ -160,6 +160,9 @@ extern void eth_halt(void); extern int eth_rx(void); extern int eth_send(volatile void *packet, int length); +#ifdef SHARED_RESOURCES + extern void swap_to(int device_id); +#endif /* . This is called by register_netdev(). It is responsible for @@ -533,6 +536,9 @@ static void smc_shutdown() SMC_SELECT_BANK( 0 ); SMC_outb( RCR_CLEAR, RCR_REG ); SMC_outb( TCR_CLEAR, TCR_REG ); +#ifdef SHARED_RESOURCES + swap_to(FLASH); +#endif } @@ -1511,6 +1517,9 @@ static void print_packet( byte * buf, int length ) #endif int eth_init(bd_t *bd) { +#ifdef SHARED_RESOURCES + swap_to(ETHERNET); +#endif return (smc_open(bd)); } diff --git a/drivers/smc91111.h b/drivers/smc91111.h index c3c33672a..d03cbc320 100644 --- a/drivers/smc91111.h +++ b/drivers/smc91111.h @@ -185,6 +185,8 @@ typedef unsigned long int dword; #ifdef CONFIG_ADNPESC1 #define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+((r)<<1)))) +#elif CONFIG_BLACKFIN +#define SMC_inw(r) ({ word __v = (*((volatile word *)(SMC_BASE_ADDRESS+(r)))); asm("ssync;"); __v;}) #else #define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+(r)))) #endif @@ -192,6 +194,8 @@ typedef unsigned long int dword; #ifdef CONFIG_ADNPESC1 #define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+((r)<<1))) = d) +#elif CONFIG_BLACKFIN +#define SMC_outw(d,r) {(*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d);asm("ssync;");} #else #define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d) #endif diff --git a/examples/Makefile b/examples/Makefile index 2f8c4c403..fee26741d 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -53,6 +53,10 @@ ifeq ($(ARCH),microblaze) LOAD_ADDR = 0x80F00000 endif +ifeq ($(ARCH),blackfin) +LOAD_ADDR = 0x1000 +endif + include $(TOPDIR)/config.mk SREC = hello_world.srec @@ -73,6 +77,11 @@ SREC += sched.srec BIN += sched.bin sched endif +ifeq ($(ARCH),blackfin) +SREC += smc91111_eeprom.srec +BIN += smc91111_eeprom.bin smc91111_eeprom +endif + # The following example is pretty 8xx specific... ifeq ($(CPU),mpc8xx) SREC += timer.srec diff --git a/examples/smc91111_eeprom.c b/examples/smc91111_eeprom.c index 885f9336c..98e3e86ff 100644 --- a/examples/smc91111_eeprom.c +++ b/examples/smc91111_eeprom.c @@ -214,13 +214,11 @@ int smc91111_eeprom (int argc, char *argv[]) switch (what) { case 1: - printf ("Writing EEPROM register %02x with %04x\n", - reg, value); + printf ("Writing EEPROM register %02x with %04x\n", reg, value); write_eeprom_reg (value, reg); break; case 2: - printf ("Writing MAC register bank %i, - reg %02x with %04x\n", reg >> 4, reg & 0xE, value); + printf ("Writing MAC register bank %i, reg %02x with %04x\n", reg >> 4, reg & 0xE, value); SMC_SELECT_BANK (reg >> 4); SMC_outw (value, reg & 0xE); break; diff --git a/examples/stubs.c b/examples/stubs.c index d4c6e063e..1797274eb 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -125,6 +125,19 @@ gd_t *global_data; " lwi r5, r5, %1\n" \ " bra r5\n" \ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r5"); +#elif defined(CONFIG_BLACKFIN) +/* + * P5 holds the pointer to the global_data, P0 is a call-clobbered + * register + */ +#define EXPORT_FUNC(x) \ + asm volatile ( \ +" .globl " #x "\n" \ +#x ":\n" \ +" P0 = [P5 + %0]\n" \ +" P0 = [P0 + %1]\n" \ +" JUMP (P0)\n" \ + : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "P0"); #else #error stubs definition missing for this architecture #endif diff --git a/include/flash.h b/include/flash.h index 849319178..4c68c6832 100644 --- a/include/flash.h +++ b/include/flash.h @@ -242,6 +242,7 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of #define STM_ID_29W320DT 0x22CA22CA /* M29W320DT ID (32 M, top boot sector) */ #define STM_ID_29W320DB 0x22CB22CB /* M29W320DB ID (32 M, bottom boot sect) */ #define STM_ID_29W040B 0x00E300E3 /* M29W040B ID (4M = 512K x 8) */ +#define FLASH_PSD4256GV 0x00E9 /* PSD4256 Flash and CPLD combination */ #define INTEL_ID_28F016S 0x66a066a0 /* 28F016S[VS] ID (16M = 512k x 16) */ #define INTEL_ID_28F800B3T 0x88928892 /* 8M = 512K x 16 top boot sector */ diff --git a/include/image.h b/include/image.h index af37bcad5..139df0b2d 100644 --- a/include/image.h +++ b/include/image.h @@ -75,6 +75,7 @@ #define IH_CPU_NIOS 13 /* Nios-32 */ #define IH_CPU_MICROBLAZE 14 /* MicroBlaze */ #define IH_CPU_NIOS2 15 /* Nios-II */ +#define IH_CPU_BLACKFIN 16 /* Blackfin */ /* * Image Types diff --git a/include/linux/stat.h b/include/linux/stat.h index 2f7a3b36a..f9422cb1f 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h @@ -67,7 +67,7 @@ struct stat { #endif /* __PPC__ */ -#if defined (__ARM__) || defined (__I386__) || defined (__M68K__) +#if defined (__ARM__) || defined (__I386__) || defined (__M68K__) || defined (__blackfin__) struct stat { unsigned short st_dev; diff --git a/rtc/Makefile b/rtc/Makefile index 4ceac7693..b08057e2f 100644 --- a/rtc/Makefile +++ b/rtc/Makefile @@ -28,8 +28,8 @@ include $(TOPDIR)/config.mk LIB = librtc.a OBJS = date.o \ - ds12887.o ds1302.o ds1306.o ds1307.o ds1337.o \ - ds1556.o ds164x.o ds174x.o \ + bf533_rtc.o ds12887.o ds1302.o ds1306.o ds1307.o \ + ds1337.o ds1556.o ds164x.o ds174x.o \ m41t11.o max6900.o m48t35ax.o mc146818.o mk48t59.o \ mpc5xxx.o mpc8xx.o pcf8563.o s3c24x0_rtc.o rs5c372.o diff --git a/tools/mkimage.c b/tools/mkimage.c index 70452db1c..5222bb21a 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -93,6 +93,7 @@ table_entry_t arch_name[] = { { IH_CPU_SH, "sh", "SuperH", }, { IH_CPU_SPARC, "sparc", "SPARC", }, { IH_CPU_SPARC64, "sparc64", "SPARC 64 Bit", }, + { IH_CPU_BLACKFIN, "blackfin", "Blackfin", }, { -1, "", "", }, }; -- cgit v1.2.3-70-g09d2 From 15940c9af39deed77f72c7c8ad458b7ffc9c8683 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 13 Mar 2006 11:16:36 +0100 Subject: Change max size of uncompressed uImage's to 8MByte and add CFG_BOOTM_LEN to adjust this setting. As mentioned by Robin Getz on 2005-05-24 the size of uncompressed uImages was restricted to 4MBytes. This default size is now increased to 8Mbytes and can be overrided by setting CFG_BOOTM_LEN in the board config file. Patch by Stefan Roese, 13 Mar 2006 --- CHANGELOG | 10 ++++++++++ README | 8 +++++++- common/cmd_bootm.c | 8 ++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) (limited to 'common/cmd_bootm.c') diff --git a/CHANGELOG b/CHANGELOG index 09f1dfa36..492fb0452 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,16 @@ Changes since U-Boot 1.1.4: ====================================================================== +* Change max size of uncompressed uImage's to 8MByte and add + CFG_BOOTM_LEN to adjust this setting. + + As mentioned by Robin Getz on 2005-05-24 the size of uncompressed + uImages was restricted to 4MBytes. This default size is now + increased to 8Mbytes and can be overrided by setting CFG_BOOTM_LEN + in the board config file. + + Patch by Stefan Roese, 13 Mar 2006 + * Fix problem with updated PCI code in cpu/ppc4xx/405gp_pci.c Patch by Stefan Roese, 13 Mar 2006 diff --git a/README b/README index c805437cd..b6cb9810c 100644 --- a/README +++ b/README @@ -421,7 +421,7 @@ The following options need to be configured: Space should be pre-allocated in the dts for the bd_t. CONFIG_OF_HAS_UBOOT_ENV - + The resulting flat device tree will have a copy of u-boot's environment variables @@ -1734,6 +1734,12 @@ Configuration Settings: - CFG_MALLOC_LEN: Size of DRAM reserved for malloc() use. +- CFG_BOOTM_LEN: + Normally compressed uImages are limited to an + uncompressed size of 8 MBytes. If this is not enough, + you can define CFG_BOOTM_LEN in your board config file + to adjust this setting to your needs. + - CFG_BOOTMAPSZ: Maximum size of memory mapped by the startup code of the Linux kernel; all data that must be processed by diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index a20e5841b..aeb7842ae 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2002 + * (C) Copyright 2000-2006 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -140,6 +140,10 @@ static boot_os_Fcn do_bootm_lynxkdi; extern void lynxkdi_boot( image_header_t * ); #endif +#ifndef CFG_BOOTM_LEN +#define CFG_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */ +#endif + image_header_t header; ulong load_addr = CFG_LOAD_ADDR; /* Default Load Address */ @@ -150,7 +154,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ulong addr; ulong data, len, checksum; ulong *len_ptr; - uint unc_len = 0x400000; + uint unc_len = CFG_BOOTM_LEN; int i, verify; char *name, *s; int (*appl)(int, char *[]); -- cgit v1.2.3-70-g09d2