All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 12/12] sunxi: Add limit with the MMC environment
Date: Tue, 16 Jan 2018 09:44:24 +0100	[thread overview]
Message-ID: <20180116084424.17801-13-maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <20180116084424.17801-1-maxime.ripard@free-electrons.com>

The MMC environment offset is getting very close to the end of the U-Boot
binary now. Since we want to make sure this will not overflow, add a size
limit in the board for arm64. arm32 has already that limit enforced in our
custom image generation.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 include/configs/sunxi-common.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 3855c564f914..6236e129a89d 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -147,6 +147,16 @@
 #endif
 
 #if defined(CONFIG_ENV_IS_IN_MMC)
+
+#ifdef CONFIG_ARM64
+/*
+ * This is actually (CONFIG_ENV_OFFSET -
+ * (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)), but the value will be used
+ * directly in a makefile, without the preprocessor expansion.
+ */
+#define CONFIG_BOARD_SIZE_LIMIT		0x7e000
+#endif
+
 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
 /* If we have two devices (most likely eMMC + MMC), favour the eMMC */
 #define CONFIG_SYS_MMC_ENV_DEV		1
-- 
2.14.3

  parent reply	other threads:[~2018-01-16  8:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16  8:44 [U-Boot] [PATCH v2 00/12] sunxi: arm64 binary size fixes Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 01/12] dfu: select HASH Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 02/12] cmd: crc32: Disable by default on sunXi Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 03/12] cmd: unzip: " Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 04/12] cmd: loadb: " Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 05/12] cmd: loads: " Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 06/12] cmd: misc: " Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 07/12] video: bpp8: " Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 08/12] video: bpp16: " Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 09/12] net: regex: " Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 10/12] sunxi: imply CONFIG_OF_LIBFDT_OVERLAY Maxime Ripard
2018-01-16  8:44 ` [U-Boot] [PATCH v2 11/12] Makefile: Add size check to the u-boot.itb make target Maxime Ripard
2018-01-16  8:44 ` Maxime Ripard [this message]
2018-01-24 16:42 ` [U-Boot] [PATCH v2 00/12] sunxi: arm64 binary size fixes Jagan Teki
2018-01-26 14:32   ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180116084424.17801-13-maxime.ripard@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.