Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D320CC43334 for ; Sat, 25 Jun 2022 17:59:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 658EA843FD; Sat, 25 Jun 2022 19:59:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=web.de header.i=@web.de header.b="qkdWYI9C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E450284449; Sat, 25 Jun 2022 19:59:46 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.15.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6079282113 for ; Sat, 25 Jun 2022 19:59:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=web.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=smoch@web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1656179983; bh=8aRCYQvbvzHNmW2mk6E1RztBAbDbrJQWETl6YB6aOXc=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=qkdWYI9C4c5LcSanREq/22bKzN7HwMSwG0bqi2scYu5ioezmglYhC41sH1Qtt/aPc SvQ9/tA1G9Ev6euAStcFdRHpsbBudlggiymeUXLErmedJmFYxuxWTwmai1KtiT0+MV y2UEGncZ+Jnan4TfaWzVUO9+JHeloJZl1ClVZ3VQ= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [10.9.8.2] ([62.227.173.149]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MiMAE-1nQ4E518EQ-00fHBq; Sat, 25 Jun 2022 19:59:43 +0200 Message-ID: <241c17fc-22dd-0fe8-62ba-37c2cfdfde8d@web.de> Date: Sat, 25 Jun 2022 19:59:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 20/20] Convert CONFIG_SYS_BOOTM_LEN to Kconfig Content-Language: en-US To: Tom Rini , u-boot@lists.denx.de References: <20220625150250.1398291-1-trini@konsulko.com> <20220625150250.1398291-20-trini@konsulko.com> From: Soeren Moch In-Reply-To: <20220625150250.1398291-20-trini@konsulko.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:heEyIk99+MgTLcAkDSRqNrGUqhydr+CZakbQRtUgOVuCapuA9jr gQVHuVyVrXqFUk/Kfg0PzspH2tu6J+pxsLwkDSYE7AyHd0p6YCDdGX4Dx5RA7mwllR55Grk +2tHYYJa8+5+Qs/1KvGIAQebnrzRstWOoopcLmWxGXDSp8itIyWOSgTtfyWHdRFGgLCfqOz C8KLd4kAbvUvb9hKvQRkQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:P8GMrIcPNic=:l3w69eeJW05sKfT8aGG/X7 qNTXcsOB1bgEG3C3CobCmvd2HTL2o6TSTB0flf08E8O1gxujK/yphTSoov3Nv/dQWb8Ama7KH zC0ks3u6/kw/GLrFoynMpbsSIJCYdqpSoigYEdmSMNNiw+8WY5HYDWVnY4makAMpnzeNDyJ/w 8U60elVwkfw6T3TYDhMdtc6h7ZsRJjuUht8doGSZ2UfFzX/suvDrhSYpHTTxAO0fZesEfAf8R /fgL4GnGBQZvZ1iqnR3qWKXNv1KwOLM2+qCufXAcy+qPnyUMSNbqQ6ZcZV7ffEZ1nKKdmM3wO TCrjxOx+kU+aUaz4FIAWn8M/YkiVlw7ktM5h0CcwOaPM6sG908ydGTBHPigDlQg8AMTsyfXuf SX698136J0bJ1+1mvcR0mvlqvxxy8CRRUPfJGiUjuAxu0WEOQ3pqprUJJo8BU0Fq/A9CHNbvV 5Rw4o57s7C8/11XkDhZLmgL89wKj8U8ZztaaHwYhaHcloQELQoIBCsT76fSLEH5tBFLYKUyVu PGIVN932MQuCuqXmJCg7hrY3+O3l+0mq+ABIuqcQuJFqD2H7XNkO93zGmTtoJGfhnpsh3MESd Wi6m2hVk13NvDzojYfosCUaeLu2Jmd0a0nBE9dF6F5/ZhRfxJFKclJFoaODzrIPZVczPEsHYt VjWzN7BL2hCeAfEiBTEMtjAW/s1zAdrBpaTnf5MQi8R5U3nOvfnQ2oIcTE4A5jGLEin+0u4PL fqjqQu8fXA5lDQEbqKfZ0mzv8f97Q3BYyJb/FXjHO1Jna4DvyuVMLpFV/qQ5v+psAeE2EQoAQ T5RC3FNF92A0JZbuq15ETE4dC5TEu1QgHV2G/EDbo5m6q6uc8t61NUQmCos1VANH4QRDH3sxz vUHp04UK7olgJytZFgC/0c7JSK/MVVnReH2rcx3TWg5o6JCJXwzfQSHSGumQ44afK5t5CLB52 SGmKD8sOzzvditDUWPYzZm7ReDbDOs1gsJPeyeSVrmC4w8EnbIyt+6/Aa1nIqdoHgVENqpA7z kZf+a663WHPBKs2Xt29c8lSaC2WI5N5Emqm+W+nNu3Z+VRjR/TOV4oadPCEEfI1bKXVM5yV2M kq9T9UyWnr3yuJdqazrIDVs5L3GO5+xgB2RAYBjPSWYVVrKG+aTRsD1aA== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Tom, On 25.06.22 17:02, Tom Rini wrote: > This converts the following to Kconfig: > CONFIG_SYS_BOOTM_LEN > > As part of this, rework error handling in boot/bootm.c so that we pass > the buffer size to handle_decomp_error as CONFIG_SYS_BOOTM_LEN will not > be available to host tools but we do know the size that we passed to > malloc(). > > Signed-off-by: Tom Rini > -- > README | 6 ----- > boot/bootm.c | 24 +++++++++---------- > cmd/Kconfig | 10 ++++++++ > configs/M5208EVBE_defconfig | 1 + [...] > include/configs/xilinx_zynqmp_r5.h | 1 - > include/configs/zynq-common.h | 1 - > scripts/config_whitelist.txt | 1 - > 555 files changed, 419 insertions(+), 270 deletions(-) Is it really necessary to create so many additional lines just for a conversion? > > diff --git a/README b/README > index fb0284d4ecb6..ff0df3797d21 100644 > --- a/README > +++ b/README > @@ -1736,12 +1736,6 @@ Configuration Settings: > > Non-cached memory is only supported on 32-bit ARM at present. > > -- CONFIG_SYS_BOOTM_LEN: > - Normally compressed uImages are limited to an > - uncompressed size of 8 MBytes. If this is not enough, > - you can define CONFIG_SYS_BOOTM_LEN in your board config file > - to adjust this setting to your needs. > - > - CONFIG_SYS_BOOTMAPSZ: > Maximum size of memory mapped by the startup code of > the Linux kernel; all data that must be processed by > diff --git a/boot/bootm.c b/boot/bootm.c > index dfa65f125e57..86dbfbcfed5b 100644 > --- a/boot/bootm.c > +++ b/boot/bootm.c > @@ -33,11 +33,6 @@ > #include > #include > > -#ifndef CONFIG_SYS_BOOTM_LEN > -/* use 8MByte as default max gunzip size */ > -#define CONFIG_SYS_BOOTM_LEN 0x800000 > -#endif > - The old default was 8MiB, OK. > #define MAX_CMDLINE_SIZE SZ_4K > > #define IH_INITRD_ARCH IH_ARCH_DEFAULT [...] > diff --git a/cmd/Kconfig b/cmd/Kconfig > index bb956e330750..357b82849f7f 100644 > --- a/cmd/Kconfig > +++ b/cmd/Kconfig > @@ -335,6 +335,16 @@ config BOOTM_VXWORKS > help > Support booting VxWorks images via the bootm command. > > +config SYS_BOOTM_LEN > + hex "Maximum size of a decompresed OS image" > + depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ > + default 0x4000000 if PPC || ARM64 > + default 0x1000000 if X86 > + default 0x800000 > + help > + Normally compressed OS images are limited to an uncompressed size of > + 8 MiB. If this is not enough, increase this setting to fit your need= s. > + The new default is sad to be 8MiB, too (as the old default was), but this is not true for all architectures. So the help text is misleading. Besides that, there is probably nothing wrong with the new defaults. > config CMD_BOOTEFI > bool "bootefi" > depends on EFI_LOADER > diff --git a/configs/M5208EVBE_defconfig b/configs/M5208EVBE_defconfig > index 4ab888f59ed5..858fc5bbfd2e 100644 > --- a/configs/M5208EVBE_defconfig > +++ b/configs/M5208EVBE_defconfig > @@ -16,6 +16,7 @@ CONFIG_SYS_MALLOC_BOOTPARAMS=3Dy > # CONFIG_AUTO_COMPLETE is not set > CONFIG_SYS_PROMPT=3D"-> " > CONFIG_SYS_PBSIZE=3D276 > +CONFIG_SYS_BOOTM_LEN=3D0x2000000 > CONFIG_CMD_IMLS=3Dy > # CONFIG_CMD_SETEXPR is not set > CONFIG_CMD_MII=3Dy [...] > diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig > index 892d7c60d283..f0ecfd049d65 100644 > --- a/configs/tbs2910_defconfig > +++ b/configs/tbs2910_defconfig > @@ -35,6 +35,7 @@ CONFIG_CMD_BOOTZ=3Dy > # CONFIG_BOOTM_PLAN9 is not set > # CONFIG_BOOTM_RTEMS is not set > # CONFIG_BOOTM_VXWORKS is not set > +CONFIG_SYS_BOOTM_LEN=3D0x1000000 For tbs2910 there is another value set here - not the old default, not the new one. Why? This looks like a carefully chosen value, but very likely it is not. Probably also this value is fine for this board, but for me it makes no sense to set a board specific value here. Regards, Soeren