From patchwork Sat May 28 19:41:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 627681 X-Patchwork-Delegate: wd@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 3rJB7h4g2Kz9t7D for ; Mon, 30 May 2016 19:26:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DE90CA7700; Mon, 30 May 2016 11:24:09 +0200 (CEST) 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 Zvhc-GdFu6xE; Mon, 30 May 2016 11:24:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D2C42A77F0; Mon, 30 May 2016 11:23:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F0CB9A74BA for ; Sun, 29 May 2016 00:09:02 +0200 (CEST) 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 oqciROwRVhh2 for ; Sun, 29 May 2016 00:09:02 +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 atrey.karlin.mff.cuni.cz (atrey.karlin.mff.cuni.cz [195.113.26.193]) by theia.denx.de (Postfix) with ESMTP id 8D0D4A7498 for ; Sun, 29 May 2016 00:08:57 +0200 (CEST) Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id E04AB82402; Sat, 28 May 2016 21:41:25 +0200 (CEST) Date: Sat, 28 May 2016 21:41:24 +0200 From: Pavel Machek To: Marek Vasut Message-ID: <20160528194124.GA27144@amd> References: <20160528085559.GA8195@amd> <57498732.9000106@denx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <57498732.9000106@denx.de> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: u-boot@lists.denx.de, sr@denx.de Subject: [U-Boot] [PATCHv2] check u-boot SPL size to avoid producing non-working images X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Debugging SPL is hard, and if SPL is too big, it tends to crash in mysterious ways. (I'm not sure what the exact threshold is, 49762 bytes works, 52426 bytes does not, so 50000 should be good value). Signed-off-by: Pavel Machek --- > Please use CONFIG_SPL_MAX_* Ok, that's simple enough. It computes the size different way, thus the different number. diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index f657766..c82da96 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -323,7 +332,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void); #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_RAM_DEVICE #define CONFIG_SPL_TEXT_BASE CONFIG_SYS_INIT_RAM_ADDR -#define CONFIG_SPL_MAX_SIZE (64 * 1024) +#define CONFIG_SPL_MAX_SIZE (48 * 1024) #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MALLOC_SIMPLE #endif