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 EC7FEC433EF for ; Sat, 25 Jun 2022 18:51:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 618CA843DF; Sat, 25 Jun 2022 20:51:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="pOgZxQHw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D51F9843FD; Sat, 25 Jun 2022 20:51:43 +0200 (CEST) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 317D983FF6 for ; Sat, 25 Jun 2022 20:51:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2a.google.com with SMTP id 59so9372250qvb.3 for ; Sat, 25 Jun 2022 11:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9KnTcDRgIgnPRFmsDkvNbUiMO2vJsJB14+cFHSsngj8=; b=pOgZxQHw7clvpoARmN9r557tOM8DdW6y6G69+DAhG51EVwWCVHLIm0FkYAGm2L/s4O 8LjAseGrDqZw2enOgfPaqk6avfs4apHL+3leuCH4XicyS4PtBSnci1Fmq/OSg8g2mLBE ENTP4F7EEjBnrUx8G75lhNhWY7kgT6UCVtuN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9KnTcDRgIgnPRFmsDkvNbUiMO2vJsJB14+cFHSsngj8=; b=bymINW3YR8Ue0kuec/L+zbaA39GJYqavAxfFXV6adxPd2CbVCab2B0Nkhmn2owpXFG fG6iIpNL2wynzYO6Vmpf8eRZ+GmsA1WokhwasVEz6faJDuqQ23bL4dEmYJlzP/nxJ4K8 atITbVY88uWSleJ+j9mX4cc3fd4kJ4H7mNZFs3uKzRCN88VF/81AIegTTfTcNsPSbfsU VBy3LoZ3kyB92ZqK2OZzoh4HSXxEUfzQ0dW1MYV+/X6k90WeuNz6zYyl54H/kcL7G/TF VqElriVKyx9erNCPdgS9+iUp2RtFcMUW+6aiunniCr8BInHDL2DZDjZq5u9I5N0Jufjy Tq/A== X-Gm-Message-State: AJIora+vAsknefnTMm9iySo3XH81omytukXjGscO59bzqMjzTu+epwip jEhwzUC0cJ46L2ZmC8n+FkYC/w== X-Google-Smtp-Source: AGRyM1t0I3WaCmRQeSHUokRHNKSmhEuUPDalVEj3V3clWx1MjNMSWaPJYNsVbDiEEos2Aoe5NN1Y2w== X-Received: by 2002:a05:6214:d84:b0:470:9f26:f8fa with SMTP id e4-20020a0562140d8400b004709f26f8famr3936611qve.34.1656183099829; Sat, 25 Jun 2022 11:51:39 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id g19-20020ac87d13000000b00307aed25fc7sm3885420qtb.31.2022.06.25.11.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jun 2022 11:51:38 -0700 (PDT) Date: Sat, 25 Jun 2022 14:51:36 -0400 From: Tom Rini To: Soeren Moch Cc: u-boot@lists.denx.de Subject: Re: [PATCH 20/20] Convert CONFIG_SYS_BOOTM_LEN to Kconfig Message-ID: <20220625185136.GR2484912@bill-the-cat> References: <20220625150250.1398291-1-trini@konsulko.com> <20220625150250.1398291-20-trini@konsulko.com> <241c17fc-22dd-0fe8-62ba-37c2cfdfde8d@web.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Eyi5ohvN7e+7r0EO" Content-Disposition: inline In-Reply-To: <241c17fc-22dd-0fe8-62ba-37c2cfdfde8d@web.de> X-Clacks-Overhead: GNU Terry Pratchett 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 --Eyi5ohvN7e+7r0EO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 25, 2022 at 07:59:36PM +0200, Soeren Moch wrote: > Hi Tom, >=20 > On 25.06.22 17:02, Tom Rini wrote: > > This converts the following to Kconfig: > > CONFIG_SYS_BOOTM_LEN > >=20 > > 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(). > >=20 > > 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(-) >=20 > Is it really necessary to create so many additional lines just for a > conversion? It's about as small as I can get it to without spending a lot of time massaging defaults. As is the case with any of the conversions, arch/SoC maintainers or other knowledgable parties are welcome and encouraged to submit a follow-up to add default X if Y. It's keeping the in-use value for everyone and unfortunately aside from platforms that didn't change from the old default, there's not a lot of consistency, but arguably should be. > > diff --git a/README b/README > > index fb0284d4ecb6..ff0df3797d21 100644 > > --- a/README > > +++ b/README > > @@ -1736,12 +1736,6 @@ Configuration Settings: > >=20 > > Non-cached memory is only supported on 32-bit ARM at present. > >=20 > > -- 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 > >=20 > > -#ifndef CONFIG_SYS_BOOTM_LEN > > -/* use 8MByte as default max gunzip size */ > > -#define CONFIG_SYS_BOOTM_LEN 0x800000 > > -#endif > > - >=20 > The old default was 8MiB, OK. >=20 > > #define MAX_CMDLINE_SIZE SZ_4K > >=20 > > #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. > >=20 > > +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 nee= ds. > > + >=20 > 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. English is an imprecise language. Maybe just not mentioning the size in the help is best. > Besides that, there is probably nothing wrong with the new defaults. >=20 > > 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 >=20 > 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. >=20 > Probably also this value is fine for this board, but for me it makes no > sense to set a board specific value here. I don't follow you, sorry. Since tbs2910 isn't X86 or PPC or ARM64, it's using the current value instead. Before this patch include/configs/tbs2910.h includes include/configs/mx6_common.h which sets it to 0x1000000. Which means I probably could put a || ARCH_MX6 in the Kconfig entry and drop out another 84 files (3 MX6 platforms set 0x4000000 instead today). --=20 Tom --Eyi5ohvN7e+7r0EO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmK3WTQACgkQFHw5/5Y0 tywYagwAmmRbxj+wGqXROj5bN9RDTHyj8Vb7hH11lYv+3AVEfSOQJNiv+D+jV6JD dXAlcPXejEPrI0odgLnEp4ShlZz0QWls2ipxA2v60DYYEgxOtXdQNeD05EsHwmqx DSE38fb2uASYrwBeFqDdWoCcNgXSjmG0Z9S+krCTB2lFTv6rdA5kQ6VgW6L66Hfw iH0xH7oyOzNydxiL5WUhP0ew2xa3HeAonQbWIPlaRr19dilx8DkCt/swl8kzHa8X GjtEL8RQ8jtmsM9zFBaxyBseCHWRrWaf0laOrKdbEIWZXHrJFEqKFCo2e51sHi7F 7orv/YilgFjLb+AZ6yYUteH2k2SODASnvpbcKXq6NcdJMabVG3Bl0HLJFXqzd1Fa FCabMcSmRFU6rasb3zY4i+ZTdfbqwzUcnc5f63b8qatuty+CVkm5OnWORAf4FfRX +kY9GBsby6PJmNKisbUAaS4UwFuklgmXSksYm9vtcBKcxymfhECmj9CZMKEK638s T+cwAanG =elNQ -----END PGP SIGNATURE----- --Eyi5ohvN7e+7r0EO--