summaryrefslogtreecommitdiff
path: root/tools/mksunxiboot.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-30 20:15:59 -0400
committerTom Rini <trini@konsulko.com>2015-05-30 20:15:59 -0400
commitb1f7ecc9b5f0ce07691f6804f436fcaa2a377b26 (patch)
tree0aea9d637deb6dd706e717a000148263fe89babc /tools/mksunxiboot.c
parentcac6d4bfdc2543fb30bb04e42be42aeaf52ea348 (diff)
parent014414f53695ab3ba5a9d344ad1ba8952bce157c (diff)
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
Diffstat (limited to 'tools/mksunxiboot.c')
-rw-r--r--tools/mksunxiboot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/mksunxiboot.c b/tools/mksunxiboot.c
index 0035f6ea26..3361251c8e 100644
--- a/tools/mksunxiboot.c
+++ b/tools/mksunxiboot.c
@@ -65,7 +65,13 @@ int gen_check_sum(struct boot_file_head *head_p)
#define SUN4I_SRAM_SIZE 0x7600 /* 0x7748+ is used by BROM */
#define SRAM_LOAD_MAX_SIZE (SUN4I_SRAM_SIZE - sizeof(struct boot_file_head))
-#define BLOCK_SIZE 512
+
+/*
+ * BROM (at least on A10 and A20) requires NAND-images to be explicitly aligned
+ * to a multiple of 8K, and rejects the image otherwise. MMC-images are fine
+ * with 512B blocks. To cater for both, align to the largest of the two.
+ */
+#define BLOCK_SIZE 0x2000
struct boot_img {
struct boot_file_head header;