1 diff -urN u-boot-1.1.5.a/Makefile u-boot/Makefile
2 --- u-boot-1.1.5.a/Makefile 2006-10-20 16:54:33.000000000 +0100
3 +++ u-boot/Makefile 2008-05-11 14:14:55.000000000 +0100
9 +EXTRAVERSION = -IFX-LXDB
10 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
11 VERSION_FILE = $(obj)include/version_autogenerated.h
14 # Deal with colliding definitions from tcsh etc.
17 +# Default algorithm form compressing u-boot.bin
20 +COMPRESS_FILE=$(obj)u-boot.img
22 +ifeq ($(COMPRESS),lzma)
23 +COMPRESS_FILE=$(obj)u-boot.limg
25 +ifeq ($(COMPRESS),bz2)
26 +COMPRESS_FILE=$(obj)u-boot.bzimg
28 +ifeq ($(COMPRESS),gzip)
29 +COMPRESS_FILE=$(obj)u-boot.zimg
31 +ifeq ($(COMPRESS),none)
32 +COMPRESS_FILE=$(obj)u-boot.img
36 #########################################################################
38 # U-boot build supports producing a object files to the separate external
50 # load other configuration
52 #########################################################################
53 # U-Boot objects....order is important (i.e. start must be first)
55 -OBJS = cpu/$(CPU)/start.o
56 +OBJS = cpu/$(CPU)/$(BOARDDIR)/start.o
57 +OBJS_BOOTSTRAP = cpu/$(CPU)/$(BOARDDIR)/start_bootstrap.o
60 OBJS += cpu/$(CPU)/start16.o
61 OBJS += cpu/$(CPU)/reset.o
64 LIBS = lib_generic/libgeneric.a
65 LIBS += board/$(BOARDDIR)/lib$(BOARD).a
66 -LIBS += cpu/$(CPU)/lib$(CPU).a
67 +LIBS += cpu/$(CPU)/$(BOARDDIR)/lib$(CPU).a
69 LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
71 -LIBS += lib_$(ARCH)/lib$(ARCH).a
72 +LIBS += lib_$(ARCH)/$(BOARDIR)/lib$(ARCH).a
73 LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
74 fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
79 LIBS += drivers/libdrivers.a
80 -LIBS += drivers/nand/libnand.a
81 -LIBS += drivers/nand_legacy/libnand_legacy.a
82 +#LIBS += drivers/nand_$(BOARDDIR)/libnand.a
83 +#LIBS += drivers/nand_legacy/libnand_legacy.a
84 LIBS += drivers/sk98lin/libsk98lin.a
85 LIBS += post/libpost.a post/cpu/libcpu.a
86 LIBS += common/libcommon.a
89 LIBS := $(addprefix $(obj),$(LIBS))
92 +LIBS_BOOTSTRAP = lib_bootstrap/libbootstrap.a
93 +LIBS_BOOTSTRAP+= board/$(BOARDDIR)/lib$(BOARD).a
94 +#LIBS_BOOTSTRAP+= board/ifx/libifx.a
95 +LIBS_BOOTSTRAP+= cpu/$(CPU)/$(BOARDDIR)/lib$(CPU).a
97 +#HEAD_OBJS = cpu/$(CPU)/$(BOARDDIR)/start.o lib_$(ARCH)/board.o
99 +#HEAD_LIBS = board/$(BOARDDIR)/lib$(BOARD).a
100 +#HEAD_LIBS += cpu/$(CPU)/$(BOARDDIR)/lib$(CPU).a
101 +#HEAD_LIBS += lib_$(ARCH)/lib$(ARCH).a
102 +#HEAD_LIBS += lib_generic/libgeneric.a
103 +#HEAD_LIBS += common/console.o
104 +#HEAD_LIBS += common/devices.o
105 +#HEAD_LIBS += common/cmd_bootm.o
107 +#.PHONY : $(LIBS) $(HEAD_LIBS)
109 +.PHONY : $(LIBS_BOOTSTRAP)
112 PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
114 # The "tools" are needed early, so put this first
115 # Don't include stuff already done in $(LIBS)
123 +# HEAD_SUBDIRS = tools
124 +#HEAD_SUBDIRS = lib_generic \
126 +# board/$(BOARDDIR) \
129 +#.PHONY : $(HEAD_SUBDIRS)
131 ifeq ($(CONFIG_NAND_U_BOOT),y)
133 U_BOOT_NAND = $(obj)u-boot-nand.bin
134 @@ -227,13 +280,76 @@
135 __OBJS := $(subst $(obj),,$(OBJS))
136 __LIBS := $(subst $(obj),,$(LIBS))
138 +#__HEAD_OBJS := $(subst $(obj),,$(HEAD_OBJS))
139 +#__HEAD_LIBS := $(subst $(obj),,$(HEAD_LIBS))
141 #########################################################################
142 #########################################################################
144 ALL = $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND)
145 +#IFX_ALL = $(obj)u-boot.ifx $(obj)head.srec $(obj)head.bin $(obj)head $(obj)head.map $(COMPRESS_FILE) $(obj)u-boot.srec
146 +IFX_ALL = $(obj)u-boot.srec $(obj)u-boot.ifx $(obj)u-boot.lzimg $(obj)System.map $(obj)bootstrap.bin
153 +$(obj)u-boot.ifx: $(obj)System.map $(obj)bootstrap.bin $(obj)u-boot.lzimg
154 + @cat $(obj)bootstrap.bin > $(obj)u-boot.ifx
155 + @cat $(obj)u-boot.lzimg >> $(obj)u-boot.ifx
157 +$(obj)u-boot.lzimg: $(obj)u-boot.bin System.map
158 +# @lzma -f -z --best -v $(obj)u-boot.bin
159 + @lzma e $(obj)u-boot.bin $(obj)u-boot.bin.lzma
160 + @./tools/mkimage -A mips -T firmware -C lzma \
161 + -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
162 + -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
163 + -n 'u-boot image' -d $(obj)u-boot.bin.lzma $@
165 +$(obj)ld_uboot.img: $(obj)u-boot.ifx $(obj)u-boot.lzimg $(obj)System.map $(obj)bootstrap.bin
166 + @ cp -f $(obj)u-boot.ifx $(obj)u-boot.bin
167 + @ ./mkbootimg.incaip2 $(obj)ld_uboot.img < ld_uboot.conf
172 +$(obj)u-boot.zimg: $(obj)u-boot.bin $(obj)System.map
173 + gzip $(obj)u-boot.bin
174 + ./tools/mkimage -A $(ARCH) -T firmware -C gzip \
175 + -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
176 + -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
177 + -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
178 + sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
181 +$(obj)u-boot.bzimg: $(obj)u-boot.bin $(obj)System.map
182 + bzip $(obj)u-boot.bin
183 + ./tools/mkimage -A $(ARCH) -T firmware -C bzip2 \
184 + -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
185 + -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
186 + -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
187 + sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
190 +$(obj)u-boot.limg: $(obj)u-boot.bin $(obj)System.map
191 +# @lzma -f -z --best -v $(obj)u-boot.bin
192 + @lzma e $(obj)u-boot.bin $(obj)u-boot.bin.lzma
193 + ./tools/mkimage -A $(ARCH) -T firmware -C lzma \
194 + -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
195 + -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
196 + -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
197 + sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
198 + -d u-boot.bin.lzma $@
200 +$(obj)u-boot.img: $(obj)u-boot.bin $(obj)System.map
201 + ./tools/mkimage -A $(ARCH) -T firmware -C none \
202 + -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
203 + -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
204 + -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
205 + sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
208 $(obj)u-boot.hex: $(obj)u-boot
209 $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
211 @@ -243,28 +359,36 @@
212 $(obj)u-boot.bin: $(obj)u-boot
213 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
215 -$(obj)u-boot.img: $(obj)u-boot.bin
216 - ./tools/mkimage -A $(ARCH) -T firmware -C none \
217 - -a $(TEXT_BASE) -e 0 \
218 - -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
219 - sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
222 $(obj)u-boot.dis: $(obj)u-boot
223 $(OBJDUMP) -d $< > $@
225 -$(obj)u-boot: depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
226 +$(obj)u-boot: depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
227 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
228 cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
229 --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
230 -Map u-boot.map -o u-boot
234 +$(obj)bootstrap.bin: $(obj)bootstrap
235 + $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
237 +$(obj)bootstrap : depend version $(SUBDIRS) $(OBJS_BOOTSTRAP) $(LIBS_BOOTSTRAP) $(LDSCRIPT_BOOTSTRAP)
238 + UNDEF_SYM=`$(OBJDUMP) -x $(LIBS_BOOTSTRAP) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
239 + $(LD) $(LDFLAGS_BOOTSTRAP) $$UNDEF_SYM $(OBJS_BOOTSTRAP) \
240 + --start-group $(LIBS_BOOTSTRAP) --end-group $(PLATFORM_LIBS) \
241 + -Map bootstrap.map -o bootstrap
244 - $(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@))
245 + $(MAKE) -C cpu/$(CPU)/$(BOARDDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@))
248 $(MAKE) -C $(dir $(subst $(obj),,$@))
252 + $(MAKE) -C `dirname $@`
257 @@ -295,14 +419,14 @@
260 ctags -w -o $(OBJTREE)/ctags `find $(SUBDIRS) include \
261 - lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
262 + lib_generic board/$(BOARDDIR) cpu/$(CPU)/$(BOARDDIR) lib_$(ARCH) \
263 fs/cramfs fs/fat fs/fdos fs/jffs2 \
264 net disk rtc dtt drivers drivers/sk98lin common \
265 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
268 etags -a -o $(OBJTREE)/etags `find $(SUBDIRS) include \
269 - lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
270 + lib_generic board/$(BOARDDIR) cpu/$(CPU)/$(BOARDDIR) lib_$(ARCH) \
271 fs/cramfs fs/fat fs/fdos fs/jffs2 \
272 net disk rtc dtt drivers drivers/sk98lin common \
273 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
274 @@ -2032,7 +2156,20 @@
276 #========================================================================
277 #########################################################################
279 +## Infineon MIPS generic u-boot config
280 +#########################################################################
281 +danube_config: unconfig
282 + @$(MKCONFIG) $(@:_config=) mips mips danube
284 +amazon_config: unconfig
285 + @$(MKCONFIG) $(@:_config=) mips mips amazon
288 +incaip2_config: unconfig
289 + @$(MKCONFIG) $(@:_config=) mips mips incaip2
291 +#########################################################################
293 #########################################################################
295 xtract_incaip = $(subst _100MHz,,$(subst _133MHz,,$(subst _150MHz,,$(subst _config,,$1))))
296 @@ -2246,6 +2383,8 @@
297 rm -f $(obj)include/bmp_logo.h
298 find nand_spl -lname "*" -print | xargs rm -f
299 rm -f nand_spl/u-boot-spl nand_spl/u-boot-spl.map
300 + rm -f lib_bootstrap/*.o
301 + rm -f lib_bootstrap/*.a
304 find $(OBJTREE) -type f \( -name .depend \
305 @@ -2254,7 +2393,7 @@
307 rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS $(obj)include/version_autogenerated.h
309 - rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
310 + rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL) $(IFX_ALL)
311 rm -f $(obj)tools/crc32.c $(obj)tools/environment.c $(obj)tools/env/crc32.c
312 rm -f $(obj)tools/inca-swap-bytes $(obj)cpu/mpc824x/bedbug_603e.c
313 rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
314 Binary files u-boot-1.1.5.a/bootstrap and u-boot/bootstrap differ
315 diff -urN u-boot-1.1.5.a/build_danube.sh u-boot/build_danube.sh
316 --- u-boot-1.1.5.a/build_danube.sh 1970-01-01 01:00:00.000000000 +0100
317 +++ u-boot/build_danube.sh 2008-05-11 14:02:24.000000000 +0100
320 +IFX_CONFIG_FLASH_SIZE=8
321 +IFX_CONFIG_MEMORY_SIZE=30
322 +CONFIG_RAM_TEXT_BASE=0xA0400000
326 +# cp -f include/flash_$1.h \
328 +# cp -f include/net_$1.h \
330 +# cp -f include/asm-mips/cacheops_$1.h \
331 +# include/asm-mips/cacheops.h
332 +# cp -f include/asm-mips/mipsregs_$1.h \
333 +# include/asm-mips/mipsregs.h
335 +#prepare_headers "danube"
337 +UBOOT_CFLAGS="-DCONFIG_IFX_MIPS -DCONFIG_LZMA -DIFX_CONFIG_MEMORY_SIZE=${IFX_CONFIG_MEMORY_SIZE} -DIFX_CONFIG_FLASH_SIZE=${IFX_CONFIG_FLASH_SIZE}"
341 +make CROSS_COMPILE="mips-linux-uclibc-" CROSS_COMPILE_UCLIBC=1 COMPRESS=${UBOOT_COMPRESS} PLATFORM_CPU=mips32r2 IFX_CFLAGS="${UBOOT_CFLAGS}" UBOOT_RAM_TEXT_BASE=${CONFIG_RAM_TEXT_BASE} CPU_TYPE=${IFX_CONFIG_CPU} danube_config distclean
343 +CROSS_COMPILE="mips-linux-uclibc-" CROSS_COMPILE_UCLIBC=1 COMPRESS=${UBOOT_COMPRESS} PLATFORM_CPU=mips32r2 IFX_CFLAGS="${UBOOT_CFLAGS}" make UBOOT_RAM_TEXT_BASE=${CONFIG_RAM_TEXT_BASE} CPU_TYPE=${IFX_CONFIG_CPU} danube_config
344 + echo -n > .config_ok
346 +CROSS_COMPILE="mips-linux-uclibc-" CROSS_COMPILE_UCLIBC=1 COMPRESS=${UBOOT_COMPRESS} PLATFORM_CPU=mips32r2 IFX_CFLAGS="${UBOOT_CFLAGS}" make UBOOT_RAM_TEXT_BASE=${CONFIG_RAM_TEXT_BASE} BOOTSTRAP_PRINTF_STATUS=$2 CPU_TYPE=${IFX_CONFIG_CPU} ifx_all
347 diff -urN u-boot-1.1.5.a/common/Makefile u-boot/common/Makefile
348 --- u-boot-1.1.5.a/common/Makefile 2006-10-20 16:54:33.000000000 +0100
349 +++ u-boot/common/Makefile 2008-05-11 14:53:59.000000000 +0100
351 env_nand.o env_dataflash.o env_flash.o env_eeprom.o \
352 env_nvram.o env_nowhere.o \
354 - flash.o fpga.o ft_build.o \
355 + flash_$(BOARD).o fpga.o ft_build.o \
356 hush.o kgdb.o lcd.o lists.o lynxkdi.o \
357 memsize.o miiphybb.o miiphyutil.o \
358 s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o \
363 -$(LIB): $(obj).depend $(OBJS)
365 $(AR) $(ARFLAGS) $@ $(OBJS)
367 $(obj)environment.o: $(src)environment.c $(obj)../tools/envcrc
368 diff -urN u-boot-1.1.5.a/common/cmd_bootm.c u-boot/common/cmd_bootm.c
369 --- u-boot-1.1.5.a/common/cmd_bootm.c 2006-10-20 16:54:33.000000000 +0100
370 +++ u-boot/common/cmd_bootm.c 2007-03-09 09:47:46.000000000 +0000
375 +#include <LzmaWrapper.h>
376 #include <environment.h>
377 #include <asm/byteorder.h>
380 # define CHUNKSZ (64 * 1024)
383 +#ifndef CFG_HEAD_CODE
385 int gunzip (void *, int, unsigned char *, unsigned long *);
387 static void *zalloc(void *, unsigned, unsigned);
389 #endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
392 +#ifndef CONFIG_REMOVE_GZIP
394 printf (" Uncompressing %s ... ", name);
395 if (gunzip ((void *)ntohl(hdr->ih_load), unc_len,
397 do_reset (cmdtp, flag, argc, argv);
400 +#endif /* CONFIG_REMOVE_GZIP */
403 printf (" Uncompressing %s ... ", name);
407 #endif /* CONFIG_BZIP2 */
410 + printf (" Uncompressing %s ... ", name);
411 + i = lzma_inflate ((unsigned char *)data, len, (unsigned char*)ntohl(hdr->ih_load), &unc_len);
412 + if (i != LZMA_RESULT_OK) {
413 + printf ("LZMA ERROR %d - must RESET board to recover\n", i);
414 + SHOW_BOOT_PROGRESS (-6);
416 + do_reset (cmdtp, flag, argc, argv);
419 +#endif /* CONFIG_LZMA */
423 @@ -1176,6 +1193,8 @@
425 #endif /* CFG_CMD_IMLS */
427 +#endif /* ! CFG_HEAD_CODE */
430 print_image_hdr (image_header_t *hdr)
432 @@ -1270,12 +1289,15 @@
433 case IH_COMP_NONE: comp = "uncompressed"; break;
434 case IH_COMP_GZIP: comp = "gzip compressed"; break;
435 case IH_COMP_BZIP2: comp = "bzip2 compressed"; break;
436 + case IH_COMP_LZMA: comp = "lzma compressed"; break;
437 default: comp = "unknown compression"; break;
440 printf ("%s %s %s (%s)", arch, os, type, comp);
443 +#ifndef CFG_HEAD_CODE
445 #define ZALLOC_ALIGNMENT 16
447 static void *zalloc(void *x, unsigned items, unsigned size)
448 @@ -1427,3 +1449,5 @@
451 #endif /* CONFIG_LYNXKDI */
453 +#endif /* ! CFG_HEAD_CODE */
454 diff -urN u-boot-1.1.5.a/common/cmd_flash.c u-boot/common/cmd_flash.c
455 --- u-boot-1.1.5.a/common/cmd_flash.c 2006-10-20 16:54:33.000000000 +0100
456 +++ u-boot/common/cmd_flash.c 2007-03-09 09:47:46.000000000 +0000
461 -flash_fill_sect_ranges (ulong addr_first, ulong addr_last,
462 - int *s_first, int *s_last,
464 +flash_fill_sect_ranges(
465 + ulong *addr_first_sect_start,
467 + ulong *addr_last_sect_end,
471 + int *bPartialStart,
474 + unsigned int bPartialErase)
479 s_last [bank] = -1; /* last sector to erase */
482 - for (bank=0,info=&flash_info[0];
483 - (bank < CFG_MAX_FLASH_BANKS) && (addr_first <= addr_last);
485 + for (bank=0, info=&flash_info[0]; (bank < CFG_MAX_FLASH_BANKS) && (addr_first <= addr_last); ++bank, ++info) {
490 b_end = info->start[0] + info->size - 1; /* bank end addr */
491 s_end = info->sector_count - 1; /* last sector */
494 for (sect=0; sect < info->sector_count; ++sect) {
495 ulong end; /* last address in current sect */
497 @@ -238,11 +243,21 @@
499 if (addr_first == info->start[sect]) {
500 s_first[bank] = sect;
501 + } else if (addr_first > info->start[sect] && addr_first <= end && bPartialErase) {
502 + *addr_first_sect_start = info->start[sect];
503 + s_first[bank] = sect;
504 + *bPartialStart = 1;
507 if (addr_last == end) {
509 + } else if (addr_last >= info->start[sect] && addr_last < end && bPartialErase) {
510 + *addr_last_sect_end = end;
511 + s_last[bank] = sect;
516 if (s_first[bank] >= 0) {
517 if (s_last[bank] < 0) {
518 if (addr_last > b_end) {
520 struct part_info *part;
521 u8 dev_type, dev_num, pnum;
523 + unsigned int bPartialErase = 0;
536 printf ("Usage:\n%s\n", cmdtp->usage);
539 @@ -397,11 +414,117 @@
543 - rcode = flash_sect_erase(addr_first, addr_last);
544 + printf ("Erase Flash from 0x%08lx to 0x%08lx\n", addr_first, addr_last);
546 + bPartialErase = simple_strtoul(argv[3], NULL, 10);
549 + rcode = flash_sect_erase(addr_first, addr_last, bPartialErase);
553 -int flash_sect_erase (ulong addr_first, ulong addr_last)
554 +int flerase_Partial(
555 + ulong addr_first_sect_start,
557 + ulong addr_last_sect_end,
559 + flash_info_t *info,
563 + int bLastPartial) {
564 + unsigned int firstMemLen = 0;
565 + unsigned int lastMemLen = 0;
566 + unsigned int sectMemLen = 0;
567 + uchar *pSavedFirstMem = NULL;
568 + uchar *pSavedLastMem = NULL;
569 + uchar *pSavedSectMem = NULL;
570 + int bSectPartial = 0;
573 + debug("%s ... 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%p, %d, %d, %d, %d\n", __FUNCTION__, addr_first_sect_start, addr_first, addr_last_sect_end, addr_last, info, first_sect, last_sect, bFirstPartial, bLastPartial);
575 + if (bFirstPartial && bLastPartial && (first_sect == last_sect))
577 + ulong b_end = info->start[0] + info->size - 1;
578 + ulong end = (first_sect == (info->sector_count - 1)) ? b_end : info->start[first_sect + 1] - 1;
579 + sectMemLen = end - info->start[first_sect] + 1;
580 + pSavedSectMem = (uchar *)calloc(sectMemLen, sizeof(char));
581 + if (pSavedSectMem == NULL)
583 + debug("calloc %u FAILED\n", sectMemLen);
587 + memset(pSavedSectMem, 0xff, sectMemLen);
589 + memcpy(pSavedSectMem, (uchar *)addr_first_sect_start, addr_first - addr_first_sect_start);
590 + memcpy(pSavedSectMem + (addr_last - info->start[first_sect]) + 1, addr_last + 1, end - addr_last);
594 + if (bFirstPartial){
595 + firstMemLen = addr_first - addr_first_sect_start + 1;
596 + pSavedFirstMem = (uchar *)calloc(firstMemLen,sizeof(char));
597 + memcpy(pSavedFirstMem,(uchar *)addr_first_sect_start,firstMemLen - 1);
600 + lastMemLen = addr_last_sect_end - addr_last + 1;
601 + pSavedLastMem = (uchar *)calloc(lastMemLen,sizeof(char));
602 + memcpy(pSavedLastMem,(uchar *)addr_last + 1,lastMemLen - 1);
606 + if (bFirstPartial){
607 + if(flash_erase (info, first_sect, first_sect)) {
608 + printf("%s ... Couldn't erase sector %d\n", __FUNCTION__, first_sect);
612 + debug("%s ... erase sector %d done!\n", __FUNCTION__, first_sect);
615 + if (bLastPartial && first_sect != last_sect){
616 + if(flash_erase (info, last_sect, last_sect)) {
617 + printf("%s ... Couldn't erase sector %d\n", __FUNCTION__, last_sect);
621 + debug("%s ... erase sector %d done!\n", __FUNCTION__, last_sect);
624 + if (bFirstPartial && bLastPartial && (first_sect == last_sect))
626 + flash_write(pSavedSectMem, (uchar *)addr_first_sect_start, sectMemLen);
627 + debug("flash_write from 0x%08x with len %u\n", addr_first_sect_start, sectMemLen);
631 + if (bFirstPartial){
632 + if(flash_write(pSavedFirstMem,(uchar *)addr_first_sect_start,firstMemLen - 1)) {
633 + printf("%s ... Couldn't write at 0x%08lx length %d\n", __FUNCTION__, addr_first_sect_start,firstMemLen - 1);
639 + if(flash_write(pSavedLastMem,(uchar *)addr_last + 1,lastMemLen - 1)) {
640 + printf("%s ... Couldn't write at 0x%08lx length %d\n", __FUNCTION__, addr_last, lastMemLen - 1);
647 + free(pSavedFirstMem);
649 + free(pSavedLastMem);
651 + free(pSavedSectMem);
655 +int flash_sect_erase (ulong addr_first, ulong addr_last, unsigned int bPartialErase)
659 @@ -413,27 +536,66 @@
664 - rcode = flash_fill_sect_ranges (addr_first, addr_last,
665 - s_first, s_last, &planned );
666 + int bPartialStart = 0; // Start sector has to be erased partially
667 + int bPartialEnd = 0; // End sector has to be erased partially
668 + ulong addr_first_sect_start = 0;// Sector start address of location addr_start
669 + ulong addr_last_sect_end = 0; // Sector end address of location addr_last
671 + rcode = flash_fill_sect_ranges (
672 + &addr_first_sect_start,
674 + &addr_last_sect_end,
683 if (planned && (rcode == 0)) {
684 - for (bank=0,info=&flash_info[0];
685 - (bank < CFG_MAX_FLASH_BANKS) && (rcode == 0);
687 + for (bank=0, info=&flash_info[0]; (bank < CFG_MAX_FLASH_BANKS) && (rcode == 0); ++bank, ++info) {
688 + ulong b_end = info->start[0] + info->size - 1; /* bank end addr */
689 if (s_first[bank]>=0) {
690 - erased += s_last[bank] - s_first[bank] + 1;
691 - debug ("Erase Flash from 0x%08lx to 0x%08lx "
693 - info->start[s_first[bank]],
694 - (s_last[bank] == info->sector_count) ?
695 - info->start[0] + info->size - 1:
696 - info->start[s_last[bank]+1] - 1,
698 - rcode = flash_erase (info, s_first[bank], s_last[bank]);
699 + if(bPartialErase) {
700 + rcode = flerase_Partial(
701 + addr_first_sect_start,
703 + addr_last_sect_end,
712 + //Erase full sectores
714 + s_first[bank] += 1;
717 + if (s_last[bank] >= s_first[bank]) {
718 + erased += s_last[bank] - s_first[bank] + 1;
719 + debug ("Erase Flash from 0x%08lx to 0x%08lx in Bank # %ld ",
720 + info->start[s_first[bank]],
721 + (s_last[bank] == info->sector_count) ?
722 + info->start[0] + info->size - 1:
723 + info->start[s_last[bank]+1] - 1,
725 + rcode = flash_erase (info, s_first[bank], s_last[bank]);
729 - printf ("Erased %d sectors\n", erased);
731 + if (erased && !bPartialErase) {
732 + printf ("Erased %d sectors\n", erased);
733 + } else if (bPartialErase){
734 + printf ("Partial erased from 0x%08lx to 0x%08lx\n", addr_first, addr_last);
736 + printf ("Error: start and/or end address not on sector boundary\n");
739 } else if (rcode == 0) {
740 puts ("Error: start and/or end address"
741 " not on sector boundary\n");
747 - rcode = flash_fill_sect_ranges( addr_first, addr_last, s_first, s_last, &planned );
748 + int bPartialStart = 0; // Start sector has to be erased partially
749 + int bPartialEnd = 0; // End sector has to be erased partially
750 + ulong addr_first_sect_start = 0;// Sector start address of location addr_start
751 + ulong addr_last_sect_end = 0; // Sector end address of location addr_last
753 + rcode = flash_fill_sect_ranges (
754 + &addr_first_sect_start,
756 + &addr_last_sect_end,
771 - erase, 3, 1, do_flerase,
772 + erase, 4, 1, do_flerase,
773 "erase - erase FLASH memory\n",
775 " - erase FLASH from addr 'start' to addr 'end'\n"
776 diff -urN u-boot-1.1.5.a/common/cmd_nvedit.c u-boot/common/cmd_nvedit.c
777 --- u-boot-1.1.5.a/common/cmd_nvedit.c 2006-10-20 16:54:33.000000000 +0100
778 +++ u-boot/common/cmd_nvedit.c 2007-03-09 09:47:46.000000000 +0000
780 extern char * env_name_spec;
782 printf ("Saving Environment to %s...\n", env_name_spec);
785 + if(saveenv() == 0) {
786 +#ifdef UBOOT_ENV_COPY
790 +#endif //UBOOT_ENV_COPY
795 return (saveenv() ? 1 : 0);
800 diff -urN u-boot-1.1.5.a/common/console.c u-boot/common/console.c
801 --- u-boot-1.1.5.a/common/console.c 2006-10-20 16:54:33.000000000 +0100
802 +++ u-boot/common/console.c 2007-03-09 09:47:46.000000000 +0000
806 /** U-Boot INIT FUNCTIONS *************************************************/
808 +#ifndef CFG_HEAD_CODE
809 int console_assign (int file, char *devname)
817 +#endif //CFG_HEAD_CODE
818 /* Called before relocation - use serial functions */
819 int console_init_f (void)
823 #endif /* CFG_CONSOLE_IS_IN_ENV || CONFIG_SPLASH_SCREEN */
825 +#ifndef CFG_HEAD_CODE
826 #ifdef CFG_CONSOLE_IS_IN_ENV
827 /* Called after the relocation - use desired console functions */
828 int console_init_r (void)
832 #endif /* CFG_CONSOLE_IS_IN_ENV */
833 +#endif //CFG_HEAD_CODE
834 diff -urN u-boot-1.1.5.a/common/devices.c u-boot/common/devices.c
835 --- u-boot-1.1.5.a/common/devices.c 2006-10-20 16:54:33.000000000 +0100
836 +++ u-boot/common/devices.c 2007-03-09 09:47:46.000000000 +0000
839 device_t *stdio_devices[] = { NULL, NULL, NULL };
840 char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
841 +#ifndef CFG_HEAD_CODE
843 #if defined(CONFIG_SPLASH_SCREEN) && !defined(CFG_DEVICE_NULLDEV)
844 #define CFG_DEVICE_NULLDEV 1
849 +#endif //CFG_HEAD_CODE
851 diff -urN u-boot-1.1.5.a/common/env_common.c u-boot/common/env_common.c
852 --- u-boot-1.1.5.a/common/env_common.c 2006-10-20 16:54:33.000000000 +0100
853 +++ u-boot/common/env_common.c 2008-05-11 13:26:45.000000000 +0100
855 * We must allocate a buffer for the environment
857 env_ptr = (env_t *)malloc (CFG_ENV_SIZE);
858 - DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
860 + DEBUGF ("malloc env_ptr error!!\n");
861 + DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__, __LINE__, env_ptr);
867 env_get_char = env_get_char_memory;
870 + DEBUGF ("%s[%d] gd->env_valid=%d\n", __FUNCTION__, __LINE__, gd->env_valid);
871 + DEBUGF ("%s[%d] CFG_ENV_SIZE=%d\n", __FUNCTION__, __LINE__, CFG_ENV_SIZE);
873 if (gd->env_valid == 0) {
874 #if defined(CONFIG_GTH) || defined(CFG_ENV_IS_NOWHERE) /* Environment not changable */
875 puts ("Using default environment\n\n");
876 @@ -242,18 +248,17 @@
879 memset (env_ptr, 0, sizeof(env_t));
880 - memcpy (env_ptr->data,
881 - default_environment,
882 - sizeof(default_environment));
883 + memcpy (env_ptr->data, default_environment, sizeof(default_environment));
885 #ifdef CFG_REDUNDAND_ENVIRONMENT
886 env_ptr->flags = 0xFF;
893 env_relocate_spec ();
896 gd->env_addr = (ulong)&(env_ptr->data);
898 #ifdef CONFIG_AMIGAONEG3SE
899 diff -urN u-boot-1.1.5.a/common/env_flash.c u-boot/common/env_flash.c
900 --- u-boot-1.1.5.a/common/env_flash.c 2006-10-20 16:54:33.000000000 +0100
901 +++ u-boot/common/env_flash.c 2008-05-11 14:55:45.000000000 +0100
905 #else /* ! ENV_IS_EMBEDDED */
907 env_t *env_ptr = (env_t *)CFG_ENV_ADDR;
909 static env_t *flash_addr = (env_t *)CFG_ENV_ADDR;
911 debug (" %08lX ... %08lX ...",
912 (ulong)&(flash_addr_new->data),
913 sizeof(env_ptr->data)+(ulong)&(flash_addr_new->data));
915 if ((rc = flash_write((char *)env_ptr->data,
916 (ulong)&(flash_addr_new->data),
917 sizeof(env_ptr->data))) ||
919 #endif /* CMD_SAVEENV */
921 #else /* ! CFG_ENV_ADDR_REDUND */
925 #ifdef CONFIG_OMAP2420H4
930 +#ifdef UBOOT_ENV_COPY
931 +int saveenv_copy(void) {
932 + uchar *env_buffer = (char *)env_ptr;
936 + ulong start_addr,end_addr,rootfs_end_addr;
939 + kernel_addr = getenv("f_kernel_addr");
940 + end_addr = simple_strtoul(kernel_addr,NULL,16) - 1;
941 + start_addr = end_addr - CFG_ENV_SIZE - sizeof(UBOOTCONFIG_COPY_HEADER) + 1;
943 + rootfs_addr = getenv("f_rootfs_addr");
944 + rootfs_size = getenv("f_rootfs_size");
945 + rootfs_end_addr = simple_strtoul(rootfs_addr,NULL,16) + simple_strtoul(rootfs_size,NULL,16);
947 + if(rootfs_end_addr >= start_addr)
949 + printf("Can not copy the environment at 0x%08lx as no space left.\nf_kernel_addr = 0x%08lx while rootfs_end_addr = 0x%08lx\n",start_addr,end_addr,rootfs_end_addr);
953 + debug ("Protect off %08lX ... %08lX\n", (ulong)rootfs_end_addr, end_addr);
954 + if (flash_sect_protect (0, rootfs_end_addr, end_addr))
957 + //delete the old environment copy, if found
958 + flash_start = rootfs_end_addr;
959 + while(flash_start + sizeof(UBOOTCONFIG_COPY_HEADER) + ENV_SIZE < end_addr)
961 + if(strncmp((char *)flash_start,UBOOTCONFIG_COPY_HEADER,sizeof(UBOOTCONFIG_COPY_HEADER)) == 0)
963 + flash_sect_erase(flash_start,flash_start + sizeof(UBOOTCONFIG_COPY_HEADER),1);
967 + flash_sect_erase(start_addr,end_addr,1);
968 + flash_write(UBOOTCONFIG_COPY_HEADER,start_addr,sizeof(UBOOTCONFIG_COPY_HEADER));
969 + flash_write(env_buffer,start_addr + sizeof(UBOOTCONFIG_COPY_HEADER), CFG_ENV_SIZE);
970 + flash_sect_protect (1, rootfs_end_addr, end_addr);
971 + printf("saved copy of the env at 0x%08lx\n",start_addr);
974 +#endif //UBOOT_ENV_COPY
978 +#define debug printf
981 ulong flash_sect_addr;
985 puts ("Erasing Flash...");
986 - if (flash_sect_erase (flash_sect_addr, end_addr))
987 + if (flash_sect_erase (flash_sect_addr, end_addr, 1))
990 puts ("Writing to Flash... ");
991 diff -urN u-boot-1.1.5.a/common/hush.c u-boot/common/hush.c
992 --- u-boot-1.1.5.a/common/hush.c 2006-10-20 16:54:33.000000000 +0100
993 +++ u-boot/common/hush.c 2008-05-10 18:56:37.000000000 +0100
994 @@ -3167,9 +3167,11 @@
998 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1000 initialize_context(&ctx);
1002 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1003 if (!(flag & FLAG_PARSE_SEMICOLON) || (flag & FLAG_REPARSING)) mapset((uchar *)";$&|", 0);
1005 rcode = parse_stream(&temp, &ctx, inp, '\n');
1006 @@ -3180,9 +3182,12 @@
1010 +printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1012 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1014 if (rcode != 1 && ctx.old_flag == 0) {
1015 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1016 done_word(&temp, &ctx);
1017 done_pipe(&ctx,PIPE_SEQ);
1019 @@ -3202,6 +3207,7 @@
1023 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1025 if (ctx.old_flag != 0) {
1027 @@ -3215,6 +3221,7 @@
1030 free_pipe_list(ctx.list_head,0);
1031 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1034 } while (rcode != -1 && !(flag & FLAG_EXIT_FROM_LOOP)); /* loop on syntax errors, return on EOF */
1035 @@ -3235,9 +3242,12 @@
1039 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1042 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1043 if (!(p = strchr(s, '\n')) || *++p) {
1044 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1045 p = xmalloc(strlen(s) + 2);
1048 @@ -3247,6 +3257,7 @@
1052 + printf("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
1053 setup_string_in_str(&input, s);
1054 return parse_stream_outer(&input, flag);
1056 diff -urN u-boot-1.1.5.a/config.mk u-boot/config.mk
1057 --- u-boot-1.1.5.a/config.mk 2006-10-20 16:54:33.000000000 +0100
1058 +++ u-boot/config.mk 2008-05-11 12:23:31.000000000 +0100
1060 sinclude $(TOPDIR)/$(ARCH)_config.mk # include architecture dependend rules
1063 -sinclude $(TOPDIR)/cpu/$(CPU)/config.mk # include CPU specific rules
1064 +sinclude $(TOPDIR)/cpu/$(CPU)/$(BOARD)/config.mk # include CPU specific rules
1067 sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include SoC specific rules
1070 RELFLAGS= $(PLATFORM_RELFLAGS)
1071 DBGFLAGS= -g # -DDEBUG
1072 -OPTFLAGS= -Os #-fomit-frame-pointer
1074 +#-O2 #-fomit-frame-pointer
1076 #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
1077 ifeq ($(CONFIG_NAND_U_BOOT),y)
1078 @@ -139,12 +140,15 @@
1079 LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
1083 +LDSCRIPT_BOOTSTRAP := $(TOPDIR)/board/$(BOARDDIR)/u-boot-bootstrap.lds
1085 OBJCFLAGS += --gap-fill=0xff
1087 gccincdir := $(shell $(CC) -print-file-name=include)
1089 CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \
1090 - -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \
1091 + -D__KERNEL__ -DUBOOT_RAM_TEXT_BASE=$(UBOOT_RAM_TEXT_BASE) \
1093 ifneq ($(OBJTREE),$(SRCTREE))
1094 CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
1095 @@ -180,7 +184,10 @@
1097 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
1099 -LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS)
1100 +LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(UBOOT_RAM_TEXT_BASE) $(PLATFORM_LDFLAGS)
1101 +LDFLAGS_BOOTSTRAP += -Bstatic -T $(LDSCRIPT_BOOTSTRAP) -Ttext $(BOOTSTRAP_TEXT_BASE) $(PLATFORM_LDFLAGS)
1103 +#HEAD_LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(HEAD_FLASH_TEXT_BASE) $(PLATFORM_LDFLAGS)
1105 # Location of a usable BFD library, where we define "usable" as
1106 # "built for ${HOST}, supports ${TARGET}". Sensible values are
1107 @@ -211,10 +218,17 @@
1109 #########################################################################
1111 +AFLAGS := $(AFLAGS) $(IFX_CFLAGS)
1112 +CFLAGS := $(CFLAGS) $(IFX_CFLAGS)
1113 +CPPFLAGS := $(CPPFLAGS) $(IFX_CFLAGS)
1115 +#########################################################################
1117 export CONFIG_SHELL HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE \
1118 AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP \
1120 -export TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
1121 +#export UBOOT_RAM_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
1122 +export UBOOT_RAM_TEXT_BASE BOOTSTRAP_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
1124 #########################################################################
1126 diff -urN u-boot-1.1.5.a/drivers/Makefile u-boot/drivers/Makefile
1127 --- u-boot-1.1.5.a/drivers/Makefile 2006-10-20 16:54:33.000000000 +0100
1128 +++ u-boot/drivers/Makefile 2008-05-11 14:54:11.000000000 +0100
1130 videomodes.o w83c553f.o \
1132 pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o \
1134 + rpx_pcmcia.o ifx_sw.o
1136 SRCS := $(COBJS:.o=.c)
1137 OBJS := $(addprefix $(obj),$(COBJS))
1141 -$(LIB): $(obj).depend $(OBJS)
1143 $(AR) $(ARFLAGS) $@ $(OBJS)
1145 #########################################################################
1146 diff -urN u-boot-1.1.5.a/include/asm-mips/mipsregs.h u-boot/include/asm-mips/mipsregs.h
1147 --- u-boot-1.1.5.a/include/asm-mips/mipsregs.h 2006-10-20 16:54:33.000000000 +0100
1148 +++ u-boot/include/asm-mips/mipsregs.h 2008-05-11 12:31:57.000000000 +0100
1150 #define CP0_CAUSE $13
1152 #define CP0_PRID $15
1153 +#define CP0_EBASE $15,1
1154 #define CP0_CONFIG $16
1155 #define CP0_LLADDR $17
1156 #define CP0_WATCHLO $18
1157 @@ -330,11 +331,32 @@
1158 # define KSU_USER 0x00000010
1159 # define KSU_SUPERVISOR 0x00000008
1160 # define KSU_KERNEL 0x00000000
1161 +#ifdef CONFIG_DANUBE /* MIPS 24KE */
1162 +/* bits 5 & 6 & 7: reserved */
1163 +/* bits 8~15: IM0~7 */
1164 +/* bits 16: reserved */
1165 +#define ST0_CEE 0x00020000
1166 +/* bits 18: always 0 */
1167 +#define ST0_NMI 0x00080000
1168 +#define ST0_SR 0x00100000
1169 +#define ST0_TS 0x00200000
1170 +#define ST0_BEV 0x00400000
1171 +/* bits 23: reserved */
1172 +#define ST0_MX 0x01000000
1173 +#define ST0_RE 0x02000000
1174 +#define ST0_FR 0x04000000
1175 +#define ST0_RP 0x08000000
1176 +#define ST0_CU0 0x10000000
1177 +#define ST0_CU1 0x20000000
1178 +#define ST0_CU2 0x40000000
1179 +#define ST0_CU3 0x80000000
1181 #define ST0_UX 0x00000020
1182 #define ST0_SX 0x00000040
1183 #define ST0_KX 0x00000080
1184 #define ST0_DE 0x00010000
1185 #define ST0_CE 0x00020000
1189 * Bitfields in the R[23]000 cp0 status register.
1190 @@ -471,6 +493,14 @@
1191 #define CAUSEF_BD (1 << 31)
1194 + * Bits in the coprocessor 0 EBase register
1196 +#define EBASEB_CPUNUM 0
1197 +#define EBASEF_CPUNUM (0x3ff << EBASEB_CPUNUM)
1198 +#define EBASEB_EXPBASE 12
1199 +#define EBASEF_EXPBASE (0x3ffff << EBASEB_EXPBASE)
1202 * Bits in the coprozessor 0 config register.
1204 #define CONF_CM_CACHABLE_NO_WA 0
1205 @@ -544,4 +574,10 @@
1206 #define CEB_KERNEL 2 /* Count events in kernel mode EXL = ERL = 0 */
1207 #define CEB_EXL 1 /* Count events with EXL = 1, ERL = 0 */
1210 + * Bits in ErrCtl register
1212 +#define ECCB_WST 29
1213 +#define ECCF_WST (0x1 << ECCB_WST)
1215 #endif /* _ASM_MIPSREGS_H */
1216 diff -urN u-boot-1.1.5.a/include/cmd_confdefs.h u-boot/include/cmd_confdefs.h
1217 --- u-boot-1.1.5.a/include/cmd_confdefs.h 2006-10-20 16:54:33.000000000 +0100
1218 +++ u-boot/include/cmd_confdefs.h 2007-03-09 09:47:46.000000000 +0000
1220 #define CFG_CMD_EXT2 0x1000000000000000ULL /* EXT2 Support */
1221 #define CFG_CMD_SNTP 0x2000000000000000ULL /* SNTP support */
1222 #define CFG_CMD_DISPLAY 0x4000000000000000ULL /* Display support */
1223 +#define CFG_CMD_DHRYSTONE 0x8000000000000000ULL /* Dhrystone benchmark support */
1225 #define CFG_CMD_ALL 0xFFFFFFFFFFFFFFFFULL /* ALL commands */
1229 CFG_CMD_UNIVERSE | \
1231 + CFG_CMD_DHRYSTONE | \
1234 /* Default configuration
1235 diff -urN u-boot-1.1.5.a/include/config.h u-boot/include/config.h
1236 --- u-boot-1.1.5.a/include/config.h 1970-01-01 01:00:00.000000000 +0100
1237 +++ u-boot/include/config.h 2008-05-11 14:02:25.000000000 +0100
1239 +/* Automatically generated - do not edit */
1240 +#include <configs/danube.h>
1241 diff -urN u-boot-1.1.5.a/include/config.mk u-boot/include/config.mk
1242 --- u-boot-1.1.5.a/include/config.mk 1970-01-01 01:00:00.000000000 +0100
1243 +++ u-boot/include/config.mk 2008-05-11 14:02:25.000000000 +0100
1248 diff -urN u-boot-1.1.5.a/include/flash.h u-boot/include/flash.h
1249 --- u-boot-1.1.5.a/include/flash.h 2006-10-20 16:54:33.000000000 +0100
1250 +++ u-boot/include/flash.h 2008-05-11 12:31:57.000000000 +0100
1252 extern unsigned long flash_init (void);
1253 extern void flash_print_info (flash_info_t *);
1254 extern int flash_erase (flash_info_t *, int, int);
1255 -extern int flash_sect_erase (ulong addr_first, ulong addr_last);
1256 +extern int flash_sect_erase (ulong addr_first, ulong addr_last, unsigned int bPartialErase);
1257 extern int flash_sect_protect (int flag, ulong addr_first, ulong addr_last);
1259 /* common/flash.c */
1260 @@ -299,6 +299,10 @@
1261 #define TOSH_ID_FVT160 0xC2 /* TC58FVT160 ID (16 M, top ) */
1262 #define TOSH_ID_FVB160 0x43 /* TC58FVT160 ID (16 M, bottom ) */
1264 +#define MX_ID_29LV320AB 0x22A822A8 /* MXIC MX29LV320AB ID (32 M, bottom ) joelin */
1265 +#define MX_ID_29LV160BB 0x22492249 /* MXIC MX29LV160BB ID (16 M, bottom ) joelin */
1266 +#define MX_ID_29LV640BB 0x22cb22cb /* MXIC MX29LV640BB ID (64 M, bottom ) joelin */
1268 /*-----------------------------------------------------------------------
1269 * Internal FLASH identification codes
1271 @@ -422,6 +426,10 @@
1272 #define FLASH_S29GL064M 0x00F0 /* Spansion S29GL064M-R6 */
1273 #define FLASH_S29GL128N 0x00F1 /* Spansion S29GL128N */
1275 +#define FLASH_29LV320AB 0x00B0 /* MXIC MX29LV320AB( 32M = 4M x 16 ) joelin 10/07/2004*/
1276 +#define FLASH_29LV160BB 0x00B1 /* MXIC MX29LV160BB( 16M = 2M x 16 ) joelin 11/22/2004*/
1277 +#define FLASH_29LV640BB 0x00B2 /* MXIC MX29LV640BB( 64M = 8M x 16 ) liupeng*/
1279 #define FLASH_UNKNOWN 0xFFFF /* unknown flash type */
1282 diff -urN u-boot-1.1.5.a/include/image.h u-boot/include/image.h
1283 --- u-boot-1.1.5.a/include/image.h 2006-10-20 16:54:33.000000000 +0100
1284 +++ u-boot/include/image.h 2007-03-09 09:47:46.000000000 +0000
1286 #define IH_COMP_NONE 0 /* No Compression Used */
1287 #define IH_COMP_GZIP 1 /* gzip Compression Used */
1288 #define IH_COMP_BZIP2 2 /* bzip2 Compression Used */
1289 +#define IH_COMP_LZMA 3 /* lzma Compression Used */
1291 #define IH_MAGIC 0x27051956 /* Image Magic Number */
1292 #define IH_NMLEN 32 /* Image Name Length */
1293 diff -urN u-boot-1.1.5.a/include/syscall.h u-boot/include/syscall.h
1294 --- u-boot-1.1.5.a/include/syscall.h 1970-01-01 01:00:00.000000000 +0100
1295 +++ u-boot/include/syscall.h 2007-03-09 09:47:46.000000000 +0000
1297 +#ifndef __MON_SYS_CALL_H__
1298 +#define __MON_SYS_CALL_H__
1300 +#ifndef __ASSEMBLY__
1302 +#include <common.h>
1304 +/* These are declarations of system calls available in C code */
1305 +int mon_getc(void);
1306 +int mon_tstc(void);
1307 +void mon_putc(const char);
1308 +void mon_puts(const char*);
1309 +void mon_printf(const char* fmt, ...);
1310 +void mon_install_hdlr(int, interrupt_handler_t*, void*);
1311 +void mon_free_hdlr(int);
1312 +void *mon_malloc(size_t);
1313 +void mon_free(void*);
1314 +void mon_udelay(unsigned long);
1315 +unsigned long mon_get_timer(unsigned long);
1317 +#endif /* ifndef __ASSEMBLY__ */
1319 +#define NR_SYSCALLS 11 /* number of syscalls */
1323 + * Make sure these functions are in the same order as they
1324 + * appear in the "examples/syscall.S" file !!!
1326 +#define SYSCALL_GETC 0
1327 +#define SYSCALL_TSTC 1
1328 +#define SYSCALL_PUTC 2
1329 +#define SYSCALL_PUTS 3
1330 +#define SYSCALL_PRINTF 4
1331 +#define SYSCALL_INSTALL_HDLR 5
1332 +#define SYSCALL_FREE_HDLR 6
1333 +#define SYSCALL_MALLOC 7
1334 +#define SYSCALL_FREE 8
1335 +#define SYSCALL_UDELAY 9
1336 +#define SYSCALL_GET_TIMER 10
1339 diff -urN u-boot-1.1.5.a/include/version_autogenerated.h u-boot/include/version_autogenerated.h
1340 --- u-boot-1.1.5.a/include/version_autogenerated.h 1970-01-01 01:00:00.000000000 +0100
1341 +++ u-boot/include/version_autogenerated.h 2008-05-11 14:02:26.000000000 +0100
1343 +#define U_BOOT_VERSION "U-Boot 1.1.5-IFX-LXDB"
1344 diff -urN u-boot-1.1.5.a/ld_uboot.conf u-boot/ld_uboot.conf
1345 --- u-boot-1.1.5.a/ld_uboot.conf 1970-01-01 01:00:00.000000000 +0100
1346 +++ u-boot/ld_uboot.conf 2006-11-04 15:03:01.000000000 +0000
1350 + 0xA0B00000 "u-boot.bin" /* Download u-boot image */
1355 +}; /* Start u-boot image */
1356 diff -urN u-boot-1.1.5.a/lib_generic/Makefile u-boot/lib_generic/Makefile
1357 --- u-boot-1.1.5.a/lib_generic/Makefile 2006-10-20 16:54:33.000000000 +0100
1358 +++ u-boot/lib_generic/Makefile 2007-03-09 09:47:46.000000000 +0000
1360 COBJS = bzlib.o bzlib_crctable.o bzlib_decompress.o \
1361 bzlib_randtable.o bzlib_huffman.o \
1362 crc32.o ctype.o display_options.o ldiv.o \
1363 - string.o vsprintf.o zlib.o
1364 + string.o vsprintf.o zlib.o LzmaDecode.o LzmaWrapper.o
1366 SRCS := $(COBJS:.o=.c)
1367 OBJS := $(addprefix $(obj),$(COBJS))
1368 diff -urN u-boot-1.1.5.a/lib_mips/board.c u-boot/lib_mips/board.c
1369 --- u-boot-1.1.5.a/lib_mips/board.c 2006-10-20 16:54:33.000000000 +0100
1370 +++ u-boot/lib_mips/board.c 2008-05-11 13:17:00.000000000 +0100
1373 #include <environment.h>
1375 +#ifdef CFG_HEAD_CODE
1376 +#undef CONFIG_MICROBZIP2
1378 +#ifdef CONFIG_BZIP2
1382 +#ifdef CONFIG_MICROBZIP2
1383 +#include <micro_bzlib.h>
1387 +#include <LzmaWrapper.h>
1392 +#endif //CFG_HEAD_CODE
1394 DECLARE_GLOBAL_DATA_PTR;
1396 #if ( ((CFG_ENV_ADDR+CFG_ENV_SIZE) < CFG_MONITOR_BASE) || \
1398 #define TOTAL_MALLOC_LEN CFG_MALLOC_LEN
1403 extern int timer_init(void);
1405 extern int incaip_set_cpuclk(void);
1407 mem_malloc_end - mem_malloc_start);
1410 +#ifdef CFG_HEAD_CODE
1411 +void *malloc(unsigned int size) {
1412 + if(size < (mem_malloc_end - mem_malloc_start)) {
1413 + mem_malloc_start += size;
1414 + //printf("malloc : size required = 0x%08lx and pointer = 0x%08lx\n",size,mem_malloc_start - size);
1415 + return (void *)(mem_malloc_start - size);
1420 +void *realloc(void *src,unsigned int size) {
1424 +void free(void *src) {
1427 +#endif //CFG_HEAD_CODE
1429 void *sbrk (ptrdiff_t increment)
1431 ulong old = mem_malloc_brk;
1434 int board_type = 0; /* use dummy arg */
1436 +#ifdef CONFIG_USE_DDR_RAM
1437 + puts ("DDR-DRAM: ");
1442 if ((gd->ram_size = initdram (board_type)) > 0) {
1443 print_size (gd->ram_size, "\n");
1444 @@ -116,26 +156,29 @@
1448 +#ifndef CFG_HEAD_CODE
1449 static void display_flash_config(ulong size)
1452 print_size (size, "\n");
1457 static int init_baudrate (void)
1459 +#ifndef CFG_HEAD_CODE
1460 char tmp[64]; /* long enough for environment variables */
1461 int i = getenv_r ("baudrate", tmp, sizeof (tmp));
1463 gd->baudrate = (i > 0)
1464 ? (int) simple_strtoul (tmp, NULL, 10)
1467 +#else //CFG_HEAD_CODE
1468 + gd->baudrate = CONFIG_BAUDRATE;
1469 +#endif //CFG_HEAD_CODE
1475 * Breath some life into the board...
1479 init_fnc_t *init_sequence[] = {
1481 +#ifndef CFG_HEAD_CODE
1482 env_init, /* initialize environment */
1483 +#endif //CFG_HEAD_CODE
1484 #ifdef CONFIG_INCA_IP
1485 incaip_set_cpuclk, /* set cpu clock according to environment variable */
1487 @@ -179,7 +224,11 @@
1490 init_fnc_t **init_fnc_ptr;
1491 +#ifdef CFG_HEAD_CODE
1492 + ulong addr, addr_sp, len = (ulong)&uboot_end - CFG_HEAD_BASE;
1493 +#else //CFG_HEAD_CODE
1494 ulong addr, addr_sp, len = (ulong)&uboot_end - CFG_MONITOR_BASE;
1495 +#endif //CFG_HEAD_CODE
1497 #ifdef CONFIG_PURPLE
1498 void copy_code (ulong);
1500 #ifdef CONFIG_PURPLE
1505 + puts("\n relocate_code start");
1506 relocate_code (addr_sp, id, addr);
1508 /* NOTREACHED - relocate_code() does not return */
1509 @@ -292,7 +342,93 @@
1511 ************************************************************************
1513 +#ifdef CFG_HEAD_CODE
1515 +extern void print_image_hdr (image_header_t *hdr);
1516 +extern void jump_unconditional (ulong addr);
1518 +void board_init_r (gd_t *id, ulong dest_addr) {
1521 + ulong data, len, checksum;
1523 + image_header_t header;
1524 + image_header_t *hdr = &header;
1525 + unsigned int destLen;
1527 + puts("\n relocate code finish.\n");
1529 + /* initialize malloc() area */
1530 + mem_malloc_init();
1532 + addr = CFG_HEAD_BASE + CFG_UBOOT_OFFSET;
1533 + memmove (&header, (char *)addr, sizeof(image_header_t));
1535 + if (ntohl(hdr->ih_magic) != IH_MAGIC) {
1536 + printf ("Bad Magic Number at address 0x%08lx\n",addr);
1540 + data = (ulong)&header;
1541 + len = sizeof(image_header_t);
1543 + checksum = ntohl(hdr->ih_hcrc);
1545 + if (crc32 (0, (char *)data, len) != checksum) {
1546 + printf ("Bad Header Checksum\n");
1550 + print_image_hdr (hdr);
1552 + data = addr + sizeof(image_header_t);
1553 + len = ntohl(hdr->ih_size);
1554 + len_ptr = (ulong *)data;
1556 + debug ("Disabling all the interrupts\n");
1557 + disable_interrupts();
1559 + debug (" Uncompressing UBoot Image ... \n" );
1561 + * If we've got less than 4 MB of malloc() space,
1562 + * use slower decompression algorithm which requires
1563 + * at most 2300 KB of memory.
1567 +#ifdef CONFIG_BZIP2
1568 + i = BZ2_bzBuffToBuffDecompress ((char*)ntohl(hdr->ih_load),
1569 + 0x400000, (char *)data, len,
1570 + CFG_MALLOC_LEN < (4096 * 1024), 0);
1572 + printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i);
1575 +#elif CONFIG_MICROBZIP2
1576 + i = micro_bzBuffToBuffDecompress ((char*)ntohl(hdr->ih_load),
1577 + &destLen, (char *)data, len,
1578 + CFG_MALLOC_LEN < (4096 * 1024), 0);
1579 + if (i != RETVAL_OK) {
1580 + printf ("MICRO_BUNZIP2 ERROR %d - must RESET board to recover\n", i);
1584 + i = lzma_inflate ((char *)data, len, (char*)ntohl(hdr->ih_load), &destLen);
1585 + if (i != LZMA_RESULT_OK) {
1586 + printf ("LZMA ERROR %d - must RESET board to recover\n", i);
1590 + printf ("NONE Compressing u-boot body!!\n");
1591 + memmove ((void *)ntohl(hdr->ih_load), (uchar *)data, len);
1594 + debug (" Uncompression completed successfully with destLen %d.\n ",destLen );
1595 + debug ("Head: Jumping to u-boot in the ram at 0x%08lx\n", CFG_MONITOR_BASE);
1597 + jump_unconditional(CFG_MONITOR_BASE);
1599 +#else //CFG_HEAD_CODE
1600 void board_init_r (gd_t *id, ulong dest_addr)
1607 + puts("\n relocate code finish.\n");
1610 gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
1612 @@ -321,10 +459,10 @@
1615 addr = (ulong) (cmdtp->cmd) + gd->reloc_off;
1617 - printf ("Command \"%s\": 0x%08lx => 0x%08lx\n",
1619 + debug ("Command \"%s\": 0x%08lx => 0x%08lx\n",
1620 cmdtp->name, (ulong) (cmdtp->cmd), addr);
1624 (int (*)(struct cmd_tbl_s *, int, int, char *[]))addr;
1628 /* NOTREACHED - no way out of command loop except booting */
1630 +#endif //CFG_HEAD_CODE
1634 diff -urN u-boot-1.1.5.a/lib_mips/head.h u-boot/lib_mips/head.h
1635 --- u-boot-1.1.5.a/lib_mips/head.h 1970-01-01 01:00:00.000000000 +0100
1636 +++ u-boot/lib_mips/head.h 2007-03-09 09:47:46.000000000 +0000
1639 +//#define CFG_HEAD_LEN 0x00006000
1640 +#define CFG_UBOOT_OFFSET CFG_HEAD_LEN
1641 diff -urN u-boot-1.1.5.a/lib_mips/time.c u-boot/lib_mips/time.c
1642 --- u-boot-1.1.5.a/lib_mips/time.c 2006-10-20 16:54:33.000000000 +0100
1643 +++ u-boot/lib_mips/time.c 2007-03-09 09:47:46.000000000 +0000
1648 +void mdelay (unsigned long msec)
1651 + for(i=0;i<msec;i++)
1660 * This function is derived from PowerPC code (read timebase as long long).
1661 * On MIPS it just returns the timer value.
1662 Binary files u-boot-1.1.5.a/mkbootimg.incaip2 and u-boot/mkbootimg.incaip2 differ
1663 diff -urN u-boot-1.1.5.a/net/eth.c u-boot/net/eth.c
1664 --- u-boot-1.1.5.a/net/eth.c 2006-10-20 16:54:33.000000000 +0100
1665 +++ u-boot/net/eth.c 2008-05-11 12:58:45.000000000 +0100
1667 #include <command.h>
1670 +#if defined(CONFIG_IFX_MIPS)
1671 +# include "ifx_eth.c"
1674 #if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(CONFIG_NET_MULTI)
1677 extern int skge_initialize(bd_t*);
1678 extern int tsec_initialize(bd_t*, int, char *);
1679 extern int npe_initialize(bd_t *);
1680 +#if defined(CONFIG_IFX_MIPS)
1681 + IFX_ETH_INITIALIZE_EXTERN
1684 static struct eth_device *eth_devices, *eth_current;
1687 #if defined(CONFIG_RTL8169)
1688 rtl8169_initialize(bis);
1691 +#if defined(CONFIG_IFX_MIPS)
1692 + IFX_ETH_INITIALIZE(bis)
1695 puts ("No ethernet found.\n");
1697 Binary files u-boot-1.1.5.a/post/cache.o and u-boot/post/cache.o differ
1698 Binary files u-boot-1.1.5.a/post/cache_8xx.o and u-boot/post/cache_8xx.o differ
1699 Binary files u-boot-1.1.5.a/post/codec.o and u-boot/post/codec.o differ
1700 Binary files u-boot-1.1.5.a/post/cpu/andi.o and u-boot/post/cpu/andi.o differ
1701 Binary files u-boot-1.1.5.a/post/cpu/asm.o and u-boot/post/cpu/asm.o differ
1702 Binary files u-boot-1.1.5.a/post/cpu/b.o and u-boot/post/cpu/b.o differ
1703 Binary files u-boot-1.1.5.a/post/cpu/cmp.o and u-boot/post/cpu/cmp.o differ
1704 Binary files u-boot-1.1.5.a/post/cpu/cmpi.o and u-boot/post/cpu/cmpi.o differ
1705 Binary files u-boot-1.1.5.a/post/cpu/complex.o and u-boot/post/cpu/complex.o differ
1706 Binary files u-boot-1.1.5.a/post/cpu/cr.o and u-boot/post/cpu/cr.o differ
1707 Binary files u-boot-1.1.5.a/post/cpu/libcpu.a and u-boot/post/cpu/libcpu.a differ
1708 Binary files u-boot-1.1.5.a/post/cpu/load.o and u-boot/post/cpu/load.o differ
1709 Binary files u-boot-1.1.5.a/post/cpu/multi.o and u-boot/post/cpu/multi.o differ
1710 Binary files u-boot-1.1.5.a/post/cpu/rlwimi.o and u-boot/post/cpu/rlwimi.o differ
1711 Binary files u-boot-1.1.5.a/post/cpu/rlwinm.o and u-boot/post/cpu/rlwinm.o differ
1712 Binary files u-boot-1.1.5.a/post/cpu/rlwnm.o and u-boot/post/cpu/rlwnm.o differ
1713 Binary files u-boot-1.1.5.a/post/cpu/srawi.o and u-boot/post/cpu/srawi.o differ
1714 Binary files u-boot-1.1.5.a/post/cpu/store.o and u-boot/post/cpu/store.o differ
1715 Binary files u-boot-1.1.5.a/post/cpu/string.o and u-boot/post/cpu/string.o differ
1716 Binary files u-boot-1.1.5.a/post/cpu/three.o and u-boot/post/cpu/three.o differ
1717 Binary files u-boot-1.1.5.a/post/cpu/threei.o and u-boot/post/cpu/threei.o differ
1718 Binary files u-boot-1.1.5.a/post/cpu/threex.o and u-boot/post/cpu/threex.o differ
1719 Binary files u-boot-1.1.5.a/post/cpu/two.o and u-boot/post/cpu/two.o differ
1720 Binary files u-boot-1.1.5.a/post/cpu/twox.o and u-boot/post/cpu/twox.o differ
1721 Binary files u-boot-1.1.5.a/post/cpu.o and u-boot/post/cpu.o differ
1722 Binary files u-boot-1.1.5.a/post/dsp.o and u-boot/post/dsp.o differ
1723 Binary files u-boot-1.1.5.a/post/ether.o and u-boot/post/ether.o differ
1724 Binary files u-boot-1.1.5.a/post/i2c.o and u-boot/post/i2c.o differ
1725 Binary files u-boot-1.1.5.a/post/libpost.a and u-boot/post/libpost.a differ
1726 Binary files u-boot-1.1.5.a/post/memory.o and u-boot/post/memory.o differ
1727 Binary files u-boot-1.1.5.a/post/post.o and u-boot/post/post.o differ
1728 Binary files u-boot-1.1.5.a/post/rtc.o and u-boot/post/rtc.o differ
1729 Binary files u-boot-1.1.5.a/post/spr.o and u-boot/post/spr.o differ
1730 Binary files u-boot-1.1.5.a/post/sysmon.o and u-boot/post/sysmon.o differ
1731 Binary files u-boot-1.1.5.a/post/tests.o and u-boot/post/tests.o differ
1732 Binary files u-boot-1.1.5.a/post/uart.o and u-boot/post/uart.o differ
1733 Binary files u-boot-1.1.5.a/post/usb.o and u-boot/post/usb.o differ
1734 Binary files u-boot-1.1.5.a/post/watchdog.o and u-boot/post/watchdog.o differ
1735 diff -urN u-boot-1.1.5.a/tools/Makefile u-boot/tools/Makefile
1736 --- u-boot-1.1.5.a/tools/Makefile 2006-10-20 16:54:33.000000000 +0100
1737 +++ u-boot/tools/Makefile 2007-03-09 09:47:46.000000000 +0000
1740 BIN_FILES = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX)
1742 -OBJ_LINKS = environment.o crc32.o
1743 +OBJ_LINKS = environment_$(BOARDDIR).o crc32_$(BOARDDIR).o
1744 OBJ_FILES = img2srec.o mkimage.o envcrc.o gen_eth_addr.o bmp_logo.o
1748 CPPFLAGS = -idirafter $(SRCTREE)/include \
1749 -idirafter $(OBJTREE)/include2 \
1750 -idirafter $(OBJTREE)/include \
1751 - -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC
1752 + -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC $(IFX_CFLAGS)
1753 CFLAGS = $(HOST_CFLAGS) $(CPPFLAGS) -O
1754 AFLAGS = -D__ASSEMBLY__ $(CPPFLAGS)
1756 @@ -126,14 +126,14 @@
1758 all: $(obj).depend $(BINS) $(LOGO_H) subdirs
1760 -$(obj)envcrc$(SFX): $(obj)envcrc.o $(obj)crc32.o $(obj)environment.o
1761 +$(obj)envcrc$(SFX): $(obj)envcrc.o $(obj)crc32_$(BOARDDIR).o $(obj)environment_$(BOARDDIR).o
1762 $(CC) $(CFLAGS) -o $@ $^
1764 $(obj)img2srec$(SFX): $(obj)img2srec.o
1765 $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
1768 -$(obj)mkimage$(SFX): $(obj)mkimage.o $(obj)crc32.o
1769 +$(obj)mkimage$(SFX): $(obj)mkimage.o $(obj)crc32_$(BOARDDIR).o
1770 $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
1774 $(obj)envcrc.o: $(src)envcrc.c
1775 $(CC) -g $(CFLAGS) -c -o $@ $<
1777 -$(obj)crc32.o: $(obj)crc32.c
1778 +$(obj)crc32_$(BOARDDIR).o: $(obj)crc32_$(BOARDDIR).c
1779 $(CC) -g $(CFLAGS) -c -o $@ $<
1781 $(obj)mkimage.o: $(src)mkimage.c
1782 @@ -192,16 +192,16 @@
1786 -$(obj)environment.c:
1787 - @rm -f $(obj)environment.c
1788 - ln -s $(src)../common/environment.c $(obj)environment.c
1789 +$(obj)environment_$(BOARDDIR).c:
1790 + @rm -f $(obj)environment_$(BOARDDIR).c
1791 + ln -s $(src)../common/environment_$(BOARDDIR).c $(obj)environment_$(BOARDDIR).c
1793 -$(obj)environment.o: $(obj)environment.c
1794 +$(obj)environment_$(BOARDDIR).o: $(obj)environment_$(BOARDDIR).c
1795 $(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $<
1798 - @rm -f $(obj)crc32.c
1799 - ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c
1800 +$(obj)crc32_$(BOARDDIR).c:
1801 + @rm -f $(obj)crc32_$(BOARDDIR).c
1802 + ln -s $(src)../lib_generic/crc32_$(BOARDDIR).c $(obj)crc32_$(BOARDDIR).c
1804 $(LOGO_H): $(obj)bmp_logo $(LOGO_BMP)
1805 $(obj)./bmp_logo $(LOGO_BMP) >$@
1806 Binary files u-boot-1.1.5.a/tools/bmp_logo and u-boot/tools/bmp_logo differ
1807 Binary files u-boot-1.1.5.a/tools/bmp_logo.o and u-boot/tools/bmp_logo.o differ
1808 Binary files u-boot-1.1.5.a/tools/crc32_danube.o and u-boot/tools/crc32_danube.o differ
1809 Binary files u-boot-1.1.5.a/tools/envcrc and u-boot/tools/envcrc differ
1810 Binary files u-boot-1.1.5.a/tools/envcrc.o and u-boot/tools/envcrc.o differ
1811 Binary files u-boot-1.1.5.a/tools/environment_danube.o and u-boot/tools/environment_danube.o differ
1812 Binary files u-boot-1.1.5.a/tools/gen_eth_addr and u-boot/tools/gen_eth_addr differ
1813 Binary files u-boot-1.1.5.a/tools/gen_eth_addr.o and u-boot/tools/gen_eth_addr.o differ
1814 Binary files u-boot-1.1.5.a/tools/img2srec and u-boot/tools/img2srec differ
1815 Binary files u-boot-1.1.5.a/tools/img2srec.o and u-boot/tools/img2srec.o differ
1816 Binary files u-boot-1.1.5.a/tools/inca-swap-bytes and u-boot/tools/inca-swap-bytes differ
1817 Binary files u-boot-1.1.5.a/tools/inca-swap-bytes.o and u-boot/tools/inca-swap-bytes.o differ
1818 Binary files u-boot-1.1.5.a/tools/mkimage and u-boot/tools/mkimage differ
1819 diff -urN u-boot-1.1.5.a/tools/mkimage.c u-boot/tools/mkimage.c
1820 --- u-boot-1.1.5.a/tools/mkimage.c 2006-10-20 16:54:33.000000000 +0100
1821 +++ u-boot/tools/mkimage.c 2007-03-09 09:47:46.000000000 +0000
1823 { IH_COMP_NONE, "none", "uncompressed", },
1824 { IH_COMP_BZIP2, "bzip2", "bzip2 compressed", },
1825 { IH_COMP_GZIP, "gzip", "gzip compressed", },
1826 + { IH_COMP_LZMA, "lzma", "lzma compressed", },
1830 Binary files u-boot-1.1.5.a/tools/mkimage.o and u-boot/tools/mkimage.o differ