From patchwork Sun Aug 11 14:40:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Silbe X-Patchwork-Id: 266329 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 17CC02C008F for ; Mon, 12 Aug 2013 00:41:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EBA864A049; Sun, 11 Aug 2013 16:41:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4nbyt4O8d5fg; Sun, 11 Aug 2013 16:41:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 38FE44A04A; Sun, 11 Aug 2013 16:41:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B14394A030 for ; Sun, 11 Aug 2013 16:41:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cQPAeGi1HCHV for ; Sun, 11 Aug 2013 16:41:19 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from b.mx.chost.de (b.mx.chost.de [87.106.8.89]) by theia.denx.de (Postfix) with ESMTPS id 0733F4A032 for ; Sun, 11 Aug 2013 16:41:17 +0200 (CEST) Received: from sshgate.chost.de (sshgate.chost.de [::ffff:87.106.80.19]) by b.mx.chost.de with esmtp; Sun, 11 Aug 2013 16:41:16 +0200 id 0A6575CF.5207A28C.00003FE2 Received: by sshgate.chost.de (sSMTP sendmail emulation); Sun, 11 Aug 2013 16:41:16 +0200 Received: (nullmailer pid 18858 invoked by uid 8193); Sun, 11 Aug 2013 14:41:09 -0000 From: Sascha Silbe To: u-boot@lists.denx.de Date: Sun, 11 Aug 2013 16:40:45 +0200 Message-Id: <1376232045-18757-4-git-send-email-t-uboot@infra-silbe.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1376232045-18757-1-git-send-email-t-uboot@infra-silbe.de> References: <20130715121957.GX13531@bill-the-cat> <1376232045-18757-1-git-send-email-t-uboot@infra-silbe.de> Cc: Shaohui Xie , Otavio Salvador , Tom Rini Subject: [U-Boot] [PATCH 3/3] openrd: fail build if U-Boot would overlap with environment in flash X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Set CONFIG_BOARD_SIZE_LIMIT so we'll notice at build time if U-Boot has grown so large that it would overlap with the environment area in flash, rather than bricking the device at run-time on first saveenv. Signed-off-by: Sascha Silbe --- include/configs/openrd.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/configs/openrd.h b/include/configs/openrd.h index 8fab6e6..b7526f8 100644 --- a/include/configs/openrd.h +++ b/include/configs/openrd.h @@ -76,6 +76,11 @@ #define CONFIG_ENV_SIZE 0x20000 /* 128k */ #define CONFIG_ENV_ADDR 0x60000 #define CONFIG_ENV_OFFSET 0x60000 /* env starts here */ +/* + * Environment is right behind U-Boot in flash. Make sure U-Boot + * doesn't grow into the environment area. + */ +#define CONFIG_BOARD_SIZE_LIMIT CONFIG_ENV_OFFSET /* * Default environment variables