ublimage: NAND block size isn't set at build-time
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>
This commit is contained in:
parent
a76406fb05
commit
9f87658054
1 changed files with 4 additions and 7 deletions
|
@ -28,12 +28,6 @@
|
||||||
#ifndef _UBLIMAGE_H_
|
#ifndef _UBLIMAGE_H_
|
||||||
#define _UBLIMAGE_H_
|
#define _UBLIMAGE_H_
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#if !defined(CONFIG_SYS_UBL_BLOCK)
|
|
||||||
#define CONFIG_SYS_UBL_BLOCK 512
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum ublimage_cmd {
|
enum ublimage_cmd {
|
||||||
CMD_INVALID,
|
CMD_INVALID,
|
||||||
CMD_BOOT_MODE,
|
CMD_BOOT_MODE,
|
||||||
|
@ -71,6 +65,9 @@ enum ublimage_fld_types {
|
||||||
/* Define max UBL image size */
|
/* Define max UBL image size */
|
||||||
#define UBL_IMAGE_SIZE (0x00003800u)
|
#define UBL_IMAGE_SIZE (0x00003800u)
|
||||||
|
|
||||||
|
/* one NAND block */
|
||||||
|
#define UBL_BLOCK_SIZE 512
|
||||||
|
|
||||||
/* from sprufg5a.pdf Table 109 */
|
/* from sprufg5a.pdf Table 109 */
|
||||||
struct ubl_header {
|
struct ubl_header {
|
||||||
uint32_t magic; /* Magic Number, see UBL_* defines */
|
uint32_t magic; /* Magic Number, see UBL_* defines */
|
||||||
|
@ -97,7 +94,7 @@ struct ubl_header {
|
||||||
* Magic Number indicates fast EMIF boot).
|
* Magic Number indicates fast EMIF boot).
|
||||||
*/
|
*/
|
||||||
/* to fit in one nand block */
|
/* 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_ */
|
#endif /* _UBLIMAGE_H_ */
|
||||||
|
|
Loading…
Reference in a new issue