summaryrefslogtreecommitdiff
blob: 2eca356e6666df433ac7eea0d9213208ae3dc750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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