From patchwork Fri Sep 25 18:12:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 1371508 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=windriver.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Byg9X0GPwz9s1t for ; Sat, 26 Sep 2020 04:17:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F192B8237D; Fri, 25 Sep 2020 20:16:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=windriver.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C02CB823D9; Fri, 25 Sep 2020 20:16:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SUBJ_OBFU_PUNCT_FEW,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D120D82322 for ; Fri, 25 Sep 2020 20:16:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=windriver.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Ovidiu.Panait@windriver.com Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id 08PIDfgY022782 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 25 Sep 2020 11:13:52 -0700 Received: from otp-linux01.wrs.com (128.224.126.17) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.487.0; Fri, 25 Sep 2020 11:13:30 -0700 From: Ovidiu Panait To: CC: Adam Ford , Anatolij Gustschin , Bin Meng , Giulio Benetti , Harald Seiler , Heinrich Schuchardt , Jagan Teki , Joel Johnson , Kever Yang , Lukasz Majewski , Michael Trimarchi , Reuben Dowle , Simon Glass , Simon Goldschmidt Subject: [PATCH] Kconfig: Use hex values for CONFIG_{SPL,TPL}_SIZE_LIMIT Date: Fri, 25 Sep 2020 21:12:56 +0300 Message-ID: <20200925181256.2326-1-ovidiu.panait@windriver.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean CONFIG_{SPL,TPL}_SIZE_LIMIT are defined as hex (SPL_SIZE_LIMIT was converted in b51882d0 ("spl: Convert CONFIG_SPL_SIZE_LIMIT to hex"), but there are still places that reference integer values. Change those to hex as well. Also, update the Makefile to check for 0x0 instead of 0. This also fixes the following build error when CONFIG_SPL_SIZE_LIMIT is set by menuconfig to 0x0: ... spl/u-boot-spl.bin exceeds file size limit: limit: 0 bytes actual: 0x80f0 bytes excess: 0x80f0 bytes Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- Makefile | 4 ++-- common/spl/Kconfig | 8 ++++---- configs/firefly-rk3288_defconfig | 2 +- configs/imxrt1020-evk_defconfig | 2 +- configs/imxrt1050-evk_defconfig | 2 +- configs/tinker-s-rk3288_defconfig | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index dd98b43031..0ccbe3ed42 100644 --- a/Makefile +++ b/Makefile @@ -859,13 +859,13 @@ else BOARD_SIZE_CHECK = endif -ifneq ($(CONFIG_SPL_SIZE_LIMIT),0) +ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0) SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit)) else SPL_SIZE_CHECK = endif -ifneq ($(CONFIG_TPL_SIZE_LIMIT),0) +ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0) TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT)) else TPL_SIZE_CHECK = diff --git a/common/spl/Kconfig b/common/spl/Kconfig index af8255a8d6..9367c74b54 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -37,9 +37,9 @@ config SPL_FRAMEWORK_BOARD_INIT_F config SPL_SIZE_LIMIT hex "Maximum size of SPL image" depends on SPL - default 69632 if ARCH_MX6 && !MX6_OCRAM_256KB - default 200704 if ARCH_MX6 && MX6_OCRAM_256KB - default 0 + default 0x11000 if ARCH_MX6 && !MX6_OCRAM_256KB + default 0x31000 if ARCH_MX6 && MX6_OCRAM_256KB + default 0x0 help Specifies the maximum length of the U-Boot SPL image. If this value is zero, it is ignored. @@ -1334,7 +1334,7 @@ if TPL config TPL_SIZE_LIMIT hex "Maximum size of TPL image" depends on TPL - default 0 + default 0x0 help Specifies the maximum length of the U-Boot TPL image. If this value is zero, it is ignored. diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig index 534358f78a..0d504944be 100644 --- a/configs/firefly-rk3288_defconfig +++ b/configs/firefly-rk3288_defconfig @@ -6,7 +6,7 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_FIREFLY_RK3288=y CONFIG_SPL_STACK_R_ADDR=0x80000 -CONFIG_SPL_SIZE_LIMIT=262144 +CONFIG_SPL_SIZE_LIMIT=0x40000 CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEFAULT_DEVICE_TREE="rk3288-firefly" diff --git a/configs/imxrt1020-evk_defconfig b/configs/imxrt1020-evk_defconfig index 61f99e9de6..9bddb69cd4 100644 --- a/configs/imxrt1020-evk_defconfig +++ b/configs/imxrt1020-evk_defconfig @@ -12,7 +12,7 @@ CONFIG_SPL_TEXT_BASE=0x20209000 CONFIG_TARGET_IMXRT1020_EVK=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y -CONFIG_SPL_SIZE_LIMIT=131072 +CONFIG_SPL_SIZE_LIMIT=0x20000 CONFIG_SPL=y CONFIG_DEFAULT_DEVICE_TREE="imxrt1020-evk" CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/imxrt1050-evk_defconfig b/configs/imxrt1050-evk_defconfig index 3f7b670459..a1f9d38cf5 100644 --- a/configs/imxrt1050-evk_defconfig +++ b/configs/imxrt1050-evk_defconfig @@ -14,7 +14,7 @@ CONFIG_SPL_TEXT_BASE=0x20209000 CONFIG_TARGET_IMXRT1050_EVK=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y -CONFIG_SPL_SIZE_LIMIT=131072 +CONFIG_SPL_SIZE_LIMIT=0x20000 CONFIG_SPL=y CONFIG_DEFAULT_DEVICE_TREE="imxrt1050-evk" CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig index 68411d863b..94ddfd4d24 100644 --- a/configs/tinker-s-rk3288_defconfig +++ b/configs/tinker-s-rk3288_defconfig @@ -7,7 +7,7 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_ROCKCHIP_RK3288=y CONFIG_TARGET_TINKER_RK3288=y CONFIG_SPL_STACK_R_ADDR=0x800000 -CONFIG_SPL_SIZE_LIMIT=307200 +CONFIG_SPL_SIZE_LIMIT=0x4B000 CONFIG_DEBUG_UART_BASE=0xff690000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEFAULT_DEVICE_TREE="rk3288-tinker-s"