Permalink
Browse files

sunxi: Increase SPL max size to 0x7600 and move u-boot.img start to 4…

…0KB offset

Turns out we actually have quite a bit more than 24KB available for SPL,
and with Falcon mode enabled we need that space.
  • Loading branch information...
hno committed Aug 26, 2013
1 parent 2af87bc commit 6a690123f9baa1965a76f8cdf4a34f5273caf773
Showing with 7 additions and 7 deletions.
  1. +6 −6 include/configs/sunxi-common.h
  2. +1 −1 tools/mksunxiboot.c
@@ -285,33 +285,33 @@
#define CONFIG_SPL_DISPLAY_PRINT
/* Falcon boot mode support */
#if 1
#define CONFIG_SPL_OS_BOOT
#endif
#ifdef CONFIG_SPL_FEL
#define CONFIG_SPL
#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds"
#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/armv7/sunxi"
#define CONFIG_SPL_TEXT_BASE 0x2000
#define CONFIG_SPL_MAX_SIZE 0x4000 /* 24 KiB */
#define CONFIG_SPL_MAX_SIZE 0x4000 /* 16 KiB */
#else /* CONFIG_SPL */
#define CONFIG_SPL_BSS_START_ADDR 0x50000000
#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KiB */
#define CONFIG_SPL_TEXT_BASE 0x20 /* sram start+header */
#define CONFIG_SPL_MAX_SIZE 0x6000 /* 24 KiB */
#define CONFIG_SPL_MAX_SIZE 0x75e0 /* 7748+ is used */
#define CONFIG_SPL_LIBDISK_SUPPORT
#define CONFIG_SPL_MMC_SUPPORT
#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds"
/* 32KiB offset */
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 64
/* SPL starts at offset 8 KiB im MMC and has the size of 24 KiB */
#define CONFIG_SPL_PAD_TO 24576 /* decimal for 'dd' */
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 80 /* 40KiB */
#define CONFIG_SPL_PAD_TO 32768 /* decimal for 'dd' */
#endif /* CONFIG_SPL */
/* end of 32 KiB in sram */
@@ -89,7 +89,7 @@ int gen_check_sum(void *boot_buf)
#define ALIGN(x, a) __ALIGN_MASK((x), (typeof(x))(a)-1)
#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
#define SUN4I_SRAM_SIZE (24 * 1024)
#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

0 comments on commit 6a69012

Please sign in to comment.