Re: [U-Boot] [PATCH v3] Update U-Boot's build timestamp on every compile

2008-10-30 Thread Wolfgang Denk
Dear Peter Tyser,

In message [EMAIL PROTECTED] you wrote:
 Use the GNU 'date' command to auto-generate a new U-Boot
 timestamp on every compile.
 
 Signed-off-by: Peter Tyser [EMAIL PROTECTED]

Sorry, this patch has whitespace issues and other problems:

Applying Update U-Boot's build timestamp on every compile
.dotest/patch:85: trailing whitespace.
.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE) 
.dotest/patch:123: trailing whitespace.
depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) 
error: patch failed: common/lcd.c:788
error: common/lcd.c: patch does not apply
Using index info to reconstruct a base tree...
stdin:85: trailing whitespace.
.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE) 
stdin:123: trailing whitespace.
depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) 
warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merged Makefile
Auto-merged common/lcd.c
CONFLICT (content): Merge conflict in common/lcd.c
Auto-merged cpu/mpc85xx/start.S
Auto-merged cpu/mpc86xx/start.S
Auto-merged cpu/ppc4xx/start.S
Failed to merge in the changes.
Patch failed at 0001.


Please rebase against current TOT and resubmit. Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
If A equals success, then the formula is A = X + Y + Z. X is work.  Y
is play. Z is keep your mouth shut. - Albert Einstein
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3] Update U-Boot's build timestamp on every compile

2008-10-21 Thread Peter Tyser
Use the GNU 'date' command to auto-generate a new U-Boot
timestamp on every compile.

Signed-off-by: Peter Tyser [EMAIL PROTECTED]
---
NOTE: As far as the changes to the Makefile, I wasn't sure
why the NAND_SPL and ONENAND_IPL didn't have the depend
dependency and why they needed the $(VERSION_FILE)
dependency.  I added the $(TIMESTAMP) dependency to be
consistent, but if its not correct, let me know.
 
Changes since v1:
* Split up U_BOOT_DATE define (date and time) into
  U_BOOT_DATE (day, month, year) and U_BOOT_TIME (time of day)
  defines
* Updated all architetures/boards

Changes since v2:
* Placed U_BOOT_DATE and U_BOOT_TIME defines in
  timestamp_autogenerated.h.
* Added include/timestamp.h

 Makefile|   19 +--
 board/bmw/bmw.c |4 ++--
 board/eXalion/eXalion.c |3 ++-
 board/mousse/mousse.c   |3 ++-
 board/netstar/eeprom.c  |3 ++-
 board/sandburst/karef/karef.c   |6 --
 board/sandburst/metrobox/metrobox.c |6 --
 board/trab/trab_fkt.c   |3 ++-
 board/voiceblue/eeprom.c|3 ++-
 common/lcd.c|4 +++-
 cpu/74xx_7xx/start.S|3 ++-
 cpu/leon2/start.S   |3 ++-
 cpu/leon3/start.S   |3 ++-
 cpu/mcf5227x/start.S|3 ++-
 cpu/mcf523x/start.S |3 ++-
 cpu/mcf52x2/start.S |3 ++-
 cpu/mcf532x/start.S |3 ++-
 cpu/mcf5445x/start.S|3 ++-
 cpu/mcf547x_8x/start.S  |3 ++-
 cpu/mpc512x/start.S |3 ++-
 cpu/mpc5xx/start.S  |3 ++-
 cpu/mpc5xxx/start.S |3 ++-
 cpu/mpc8220/start.S |3 ++-
 cpu/mpc824x/start.S |3 ++-
 cpu/mpc8260/start.S |3 ++-
 cpu/mpc83xx/start.S |3 ++-
 cpu/mpc85xx/start.S |3 ++-
 cpu/mpc86xx/start.S |3 ++-
 cpu/mpc8xx/start.S  |3 ++-
 cpu/mpc8xx/video.c  |4 +++-
 cpu/nios/start.S|3 ++-
 cpu/nios2/start.S   |3 ++-
 cpu/ppc4xx/start.S  |3 ++-
 include/.gitignore  |1 +
 include/configs/NETPHONE.h  |2 +-
 include/configs/NETTA.h |2 +-
 include/configs/NETTA2.h|2 +-
 include/timestamp.h |   30 ++
 lib_arm/board.c |3 ++-
 lib_avr32/board.c   |3 ++-
 lib_blackfin/board.c|3 ++-
 lib_i386/board.c|3 ++-
 lib_microblaze/board.c  |3 ++-
 lib_mips/board.c|3 ++-
 lib_sh/board.c  |3 ++-
 net/net.c   |3 +++
 46 files changed, 134 insertions(+), 51 deletions(-)
 create mode 100644 include/timestamp.h

diff --git a/Makefile b/Makefile
index 9a132f7..f680479 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ U_BOOT_VERSION = 
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 else
 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
 endif
+TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
 VERSION_FILE = $(obj)include/version_autogenerated.h
 
 HOSTARCH := $(shell uname -m | \
@@ -259,7 +260,7 @@ LIBS += api/libapi.a
 LIBS += post/libpost.a
 
 LIBS := $(addprefix $(obj),$(LIBS))
-.PHONY : $(LIBS) $(VERSION_FILE)
+.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE) 
 
 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
 LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
@@ -351,13 +352,13 @@ $(SUBDIRS):   depend $(obj)include/autoconf.mk
 $(LDSCRIPT):   depend $(obj)include/autoconf.mk
$(MAKE) -C $(dir $@) $(notdir $@)
 
-$(NAND_SPL):   $(VERSION_FILE) $(obj)include/autoconf.mk
+$(NAND_SPL):   $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
 $(U_BOOT_NAND):$(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin  
$(obj)u-boot-nand.bin
 
-$(ONENAND_IPL):$(VERSION_FILE) $(obj)include/autoconf.mk
+$(ONENAND_IPL):$(TIMESTAMP_FILE) $(VERSION_FILE) 
$(obj)include/autoconf.mk
$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
 
 $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin 
$(obj)include/autoconf.mk
@@ -370,6 +371,12 @@ $(VERSION_FILE):
 )  [EMAIL PROTECTED]
@cmp -s $@ [EMAIL PROTECTED]  rm -f [EMAIL PROTECTED] || mv 
-f [EMAIL PROTECTED] $@
 
+$(TIMESTAMP_FILE):
+   @( printf '#define U_BOOT_DATE %s\n' '$(shell date +%b %d 
%C%y)' \
+)  $@
+   @( printf '#define U_BOOT_TIME %s\n' '$(shell date +%T)' \
+)  $@
+
 gdbtools: