CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
da66f339c806a2c2ef215996fd4c32d5489ad48b
[bootloader.git] / work / u-boot-2011.09.tools3.patch
1 From: Loïc Minier <loic.minier@linaro.org>
2 Date: Mon, 3 Oct 2011 09:57:12 +0000 (+0200)
3 Subject: ublimage: NAND block size isn't set at build-time
4 X-Git-Url: http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff_plain;h=9f8765805400db65b44c3edb68a638f17dd8399d
5
6 ublimage: NAND block size isn't set at build-time
7
8 mkimage's ublimage support can't depend of build-time board configs;
9 instead, this should be set in ublimage.cfg. Since currently no configs
10 in u-boot override the NAND block size, hardcode it as such in
11 ublimage.h to fix a build failure with "make tools":
12 gcc [...] -o ublimage.o ublimage.c -c
13 In file included from ublimage.c:37:0:
14 ublimage.h:31:20: fatal error: config.h: No such file or directory
15
16 Cc: Heiko Schocher <hs@denx.de>
17 Cc: patches@linaro.org
18 Signed-off-by: Loïc Minier <loic.minier@linaro.org>
19 Acked-by: Heiko Schocher <hs@denx.de>
20 ---
21
22 diff --git a/tools/ublimage.h b/tools/ublimage.h
23 index c926689..93ec8ee 100644
24 --- a/tools/ublimage.h
25 +++ b/tools/ublimage.h
26 @@ -28,12 +28,6 @@
27 #ifndef _UBLIMAGE_H_
28 #define _UBLIMAGE_H_
29
30 -#include <config.h>
31 -
32 -#if !defined(CONFIG_SYS_UBL_BLOCK)
33 -#define CONFIG_SYS_UBL_BLOCK 512
34 -#endif
35 -
36 enum ublimage_cmd {
37 CMD_INVALID,
38 CMD_BOOT_MODE,
39 @@ -71,6 +65,9 @@ enum ublimage_fld_types {
40 /* Define max UBL image size */
41 #define UBL_IMAGE_SIZE (0x00003800u)
42
43 +/* one NAND block */
44 +#define UBL_BLOCK_SIZE 512
45 +
46 /* from sprufg5a.pdf Table 109 */
47 struct ubl_header {
48 uint32_t magic; /* Magic Number, see UBL_* defines */
49 @@ -97,7 +94,7 @@ struct ubl_header {
50 * Magic Number indicates fast EMIF boot).
51 */
52 /* to fit in one nand block */
53 - unsigned char res[CONFIG_SYS_UBL_BLOCK - 8 * 4];
54 + unsigned char res[UBL_BLOCK_SIZE - 8 * 4];
55 };
56
57 #endif /* _UBLIMAGE_H_ */