diff mbox series

[U-Boot,RFC,2/4] sunxi: fix image size restriction when SPL is not built

Message ID 20171230154028.40897-3-icenowy@aosc.io
State RFC
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series Allwinner H6 support for U-Boot | expand

Commit Message

Icenowy Zheng Dec. 30, 2017, 3:40 p.m. UTC
When SPL is not built, the image size restriction code in
sunxi-u-boot.dtsi will lead the build to fail.

Fix this problem by defining a default U-Boot offset when the one from
SPL is not available.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
 arch/arm/dts/sunxi-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
index 72e95afd78..b46608637e 100644
--- a/arch/arm/dts/sunxi-u-boot.dtsi
+++ b/arch/arm/dts/sunxi-u-boot.dtsi
@@ -7,6 +7,10 @@ 
  * blocks, but devices using something other than that remains to be
  * seen.
  */
+#ifndef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
+/* 40KiB for usual 8KiB header + 32KiB Boot0/SPL */
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (80)
+#endif
 #define UBOOT_MMC_MAX_SIZE	(CONFIG_ENV_OFFSET - (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512))
 
 / {