summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2012-05-18 17:36:48 +0900
committerBenda Xu <heroxbd@gentoo.org>2012-05-18 17:36:48 +0900
commitfb26a5c2df5e1fde31491ebeff69112712008353 (patch)
tree2f8414516404877c9df8e29df0c2b2536ab2bd5c /dev-embedded/u-boot-tools/files
downloadandroid-fb26a5c2df5e1fde31491ebeff69112712008353.tar.gz
android-fb26a5c2df5e1fde31491ebeff69112712008353.tar.bz2
android-fb26a5c2df5e1fde31491ebeff69112712008353.zip
initial commit
Diffstat (limited to 'dev-embedded/u-boot-tools/files')
-rw-r--r--dev-embedded/u-boot-tools/files/2011.09/0001-Build-timestamp_autogenerated.h-without-config.patch93
-rw-r--r--dev-embedded/u-boot-tools/files/2011.09/0002-Safer-timestamp_autogenerated.h-generation.patch37
-rw-r--r--dev-embedded/u-boot-tools/files/2011.09/0003-ublimage-NAND-block-size-isn-t-set-at-build-time.patch64
3 files changed, 194 insertions, 0 deletions
diff --git a/dev-embedded/u-boot-tools/files/2011.09/0001-Build-timestamp_autogenerated.h-without-config.patch b/dev-embedded/u-boot-tools/files/2011.09/0001-Build-timestamp_autogenerated.h-without-config.patch
new file mode 100644
index 0000000..95ff18e
--- /dev/null
+++ b/dev-embedded/u-boot-tools/files/2011.09/0001-Build-timestamp_autogenerated.h-without-config.patch
@@ -0,0 +1,93 @@
+From 60b382058c223625aedeb0162f493edce9c7a991 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <loic.minier@linaro.org>
+Date: Mon, 3 Oct 2011 11:57:10 +0200
+Subject: [PATCH 1/3] Build timestamp_autogenerated.h without config
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Tools such as mkimage include version information but are
+config-agnostic; build timestamp_autogenerated.h even when config.mk
+isn't generated to fix "make tools" build failure:
+gcc [...] -o mkimage.o mkimage.c -c
+In file included from include/version.h:27:0, from mkimage.c:26:
+include/timestamp.h:27:37: fatal error: timestamp_autogenerated.h: No
+such file or directory
+
+Cc: patches@linaro.org
+Signed-off-by: Loïc Minier <loic.minier@linaro.org>
+Acked-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 19 ++++++++++---------
+ 1 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b5fb288..a2d2cd7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -141,7 +141,7 @@ SUBDIRS = tools \
+ examples/standalone \
+ examples/api
+
+-.PHONY : $(SUBDIRS) $(VERSION_FILE)
++.PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE)
+
+ ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
+
+@@ -294,7 +294,7 @@ LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
+ endif
+
+ LIBS := $(addprefix $(obj),$(sort $(LIBS)))
+-.PHONY : $(LIBS) $(TIMESTAMP_FILE)
++.PHONY : $(LIBS)
+
+ LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
+ LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
+@@ -459,10 +459,6 @@ $(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl
+ $(obj)spl/u-boot-spl.bin: depend
+ $(MAKE) -C spl all
+
+-$(TIMESTAMP_FILE):
+- @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
+- @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
+-
+ updater:
+ $(MAKE) -C tools/updater all
+
+@@ -553,12 +549,12 @@ $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s: $(obj)include/autoconf.mk.dep
+ else # !config.mk
+ all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
+ $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
+-$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) \
++$(filter-out tools,$(SUBDIRS)) \
+ updater depend dep tags ctags etags cscope $(obj)System.map:
+ @echo "System not configured - see README" >&2
+ @ exit 1
+
+-tools: $(VERSION_FILE)
++tools: $(VERSION_FILE) $(TIMESTAMP_FILE)
+ $(MAKE) -C $@ all
+ endif # config.mk
+
+@@ -576,11 +572,16 @@ $(VERSION_FILE):
+ '$(shell $(LD) -v | head -n 1)' )>> $@.tmp
+ @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
+
++$(TIMESTAMP_FILE):
++ @mkdir -p $(dir $(TIMESTAMP_FILE))
++ @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
++ @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
++
+ easylogo env gdb:
+ $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}
+ gdbtools: gdb
+
+-tools-all: easylogo env gdb $(VERSION_FILE)
++tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE)
+ $(MAKE) -C tools HOST_TOOLS_ALL=y
+
+ .PHONY : CHANGELOG
+--
+1.7.6.1
+
diff --git a/dev-embedded/u-boot-tools/files/2011.09/0002-Safer-timestamp_autogenerated.h-generation.patch b/dev-embedded/u-boot-tools/files/2011.09/0002-Safer-timestamp_autogenerated.h-generation.patch
new file mode 100644
index 0000000..b359ddb
--- /dev/null
+++ b/dev-embedded/u-boot-tools/files/2011.09/0002-Safer-timestamp_autogenerated.h-generation.patch
@@ -0,0 +1,37 @@
+From 205c4b02cd165b8641f08c3aee48d5ed6bd603bb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <loic.minier@linaro.org>
+Date: Mon, 3 Oct 2011 11:57:11 +0200
+Subject: [PATCH 2/3] Safer timestamp_autogenerated.h generation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Generate timestamp_autogenerated.h as safely as version_autogenerated.h.
+
+Cc: patches@linaro.org
+Signed-off-by: Loïc Minier <loic.minier@linaro.org>
+Acked-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a2d2cd7..845789d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -574,8 +574,9 @@ $(VERSION_FILE):
+
+ $(TIMESTAMP_FILE):
+ @mkdir -p $(dir $(TIMESTAMP_FILE))
+- @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
+- @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
++ @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp
++ @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp
++ @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
+
+ easylogo env gdb:
+ $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}
+--
+1.7.6.1
+
diff --git a/dev-embedded/u-boot-tools/files/2011.09/0003-ublimage-NAND-block-size-isn-t-set-at-build-time.patch b/dev-embedded/u-boot-tools/files/2011.09/0003-ublimage-NAND-block-size-isn-t-set-at-build-time.patch
new file mode 100644
index 0000000..2eca356
--- /dev/null
+++ b/dev-embedded/u-boot-tools/files/2011.09/0003-ublimage-NAND-block-size-isn-t-set-at-build-time.patch
@@ -0,0 +1,64 @@
+From 4195b47f8aad7e83b54c62f793c3b249838afc84 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <loic.minier@linaro.org>
+Date: Mon, 3 Oct 2011 11:57:12 +0200
+Subject: [PATCH 3/3] ublimage: NAND block size isn't set at build-time
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+mkimage's ublimage support can't depend of build-time board configs;
+instead, this should be set in ublimage.cfg. Since currently no configs
+in u-boot override the NAND block size, hardcode it as such in
+ublimage.h to fix a build failure with "make tools":
+gcc [...] -o ublimage.o ublimage.c -c
+In file included from ublimage.c:37:0:
+ublimage.h:31:20: fatal error: config.h: No such file or directory
+
+Cc: Heiko Schocher <hs@denx.de>
+Cc: patches@linaro.org
+Signed-off-by: Loïc Minier <loic.minier@linaro.org>
+Acked-by: Heiko Schocher <hs@denx.de>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tools/ublimage.h | 11 ++++-------
+ 1 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/tools/ublimage.h b/tools/ublimage.h
+index c926689..93ec8ee 100644
+--- a/tools/ublimage.h
++++ b/tools/ublimage.h
+@@ -28,12 +28,6 @@
+ #ifndef _UBLIMAGE_H_
+ #define _UBLIMAGE_H_
+
+-#include <config.h>
+-
+-#if !defined(CONFIG_SYS_UBL_BLOCK)
+-#define CONFIG_SYS_UBL_BLOCK 512
+-#endif
+-
+ enum ublimage_cmd {
+ CMD_INVALID,
+ CMD_BOOT_MODE,
+@@ -71,6 +65,9 @@ enum ublimage_fld_types {
+ /* Define max UBL image size */
+ #define UBL_IMAGE_SIZE (0x00003800u)
+
++/* one NAND block */
++#define UBL_BLOCK_SIZE 512
++
+ /* from sprufg5a.pdf Table 109 */
+ struct ubl_header {
+ uint32_t magic; /* Magic Number, see UBL_* defines */
+@@ -97,7 +94,7 @@ struct ubl_header {
+ * Magic Number indicates fast EMIF boot).
+ */
+ /* to fit in one nand block */
+- unsigned char res[CONFIG_SYS_UBL_BLOCK - 8 * 4];
++ unsigned char res[UBL_BLOCK_SIZE - 8 * 4];
+ };
+
+ #endif /* _UBLIMAGE_H_ */
+--
+1.7.6.1
+