From mboxrd@z Thu Jan 1 00:00:00 1970 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 E0F2EC4332F for ; Sat, 15 Oct 2022 04:54:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B48C584C53; Sat, 15 Oct 2022 06:54:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.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=gmx.net header.i=@gmx.net header.b="kj0OGK4n"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF50884C6F; Sat, 15 Oct 2022 06:54:06 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 0854C84BDB for ; Sat, 15 Oct 2022 06:54:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1665809643; bh=LfsvjJTRuWJPhk8M0tskTz2dixEx+LMzT5fIuCCy6l4=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=kj0OGK4n4JiHyuKTBsa5/3Oh6BjOb55p06oVYA1FLBM55bBa8x/rbk9S5oHUjp6++ gRPVZGBSBDQLCsyk6CQwMjjiik4Ki31gYasDWNiZyI7XZnyPyTvtk9lIEymfn9GbfM /782YYIgh1tozjtaV12KMKZs7WmKo48LkSGcfAe4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.94] ([84.118.157.2]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MowGa-1pUO7Z0Fxu-00qViM; Sat, 15 Oct 2022 06:54:03 +0200 Message-ID: <0943142d-ef2c-b69c-9373-47c562d55aaf@gmx.de> Date: Sat, 15 Oct 2022 06:54:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v2] tests: Build correct sandbox configuration on 32bit Content-Language: en-US To: Michal Suchanek Cc: Simon Glass , u-boot@lists.denx.de References: <20221014205234.19385-1-msuchanek@suse.de> From: Heinrich Schuchardt In-Reply-To: <20221014205234.19385-1-msuchanek@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:DkQNJWy7jsyzoN3rY7akMmH1nzbufsHVTMbF8GWCZ3GgBIrrTnB 3dnusN5gUh3saZ8OW7pcKhDv+rydR9XnalWsy4LbWLKCRsWcp63dFTnfMWRa5jxdCxez8Jl ewzShYK6pDBO5AbLp4OCM/WDE24n7pWgTJ6F90wlOQif5OfCb9qihnIBOriPNwK9Pp0oGA0 Ryo+3MN/63NmvR9YTXadQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xgN1Xp17QG8=:/t7H38tu5cRuxKpfsSjXFo azC8hJoBC2fzCJfyLdyhpbXTJG8ccdM5Ok6e52nawsoTRlUD6XZcBeOth7CjxS49cxGgSe+Wo kcW50KNFyuowOX51+Awgp4awgwurafY3Hrok10acIGYiOsnwg4TUgcA+NpsZuMC1bsDQMmJJg 9d3dEwmylENcEn0JOGGb3hdEs/m4dxrPA5qH2wVqBA8ij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SU9Om/jqLbkFUwa6B61PvDFm+uj+uTxD el/PRyCaTjtXaICgcPC1SdgSHqvTyqhjwKhkJmbbkKPcMv2PsnOaJvH8yXf5LKMzWMS26E0x3 wdNFlLp6yUByUAe4J1acWpq2LJkIRzfLRAR6p/F08rMrv/oVoKvmqFgkKbWLZRBr+MZhFvEWi lP8/gUMWFl1s+hSSLngNluLmnPN8Gt/UWtz0GWLF1hiHZiT5HhRgl2yjhfD1FlEbz4WzGVBce PH4Vz0ZLDTdednL9in7zuBBqi6TQ0w87BJikERTOGe/ox 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 On 10/14/22 22:52, Michal Suchanek wrote: > Currently sandbox configuration defautls to 64bit and there is no > automation for building 32bit sandbox on 32bit hosts. > > Use _LP64 macro as heuristic for detecting 64bit targets. > > Signed-off-by: Michal Suchanek Please, explain why you think a Kconfig level patch is preferable to what I proposed in [PATCH] sandbox: Eliminate CONFIG_HOST_32/64BIT https://lists.denx.de/pipermail/u-boot/2022-October/497236.html > --- > > Changes in v2: > simplify and move detection to kconfig > > --- > arch/sandbox/Kconfig | 18 +++--------------- > scripts/Kconfig.include | 4 ++++ > 2 files changed, 7 insertions(+), 15 deletions(-) > > diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig > index 852a7c8bf2..35508c6b29 100644 > --- a/arch/sandbox/Kconfig > +++ b/arch/sandbox/Kconfig > @@ -13,7 +13,7 @@ config SYS_CPU > config SANDBOX64 > bool "Use 64-bit addresses" > select PHYS_64BIT > - select HOST_64BIT > + depends on HOST_64BIT > > config SANDBOX_RAM_SIZE_MB > int "RAM size in MiB" > @@ -41,23 +41,11 @@ config SYS_CONFIG_NAME > default "sandbox_spl" if SANDBOX_SPL > default "sandbox" if !SANDBOX_SPL > > -choice > - prompt "Run sandbox on 32/64-bit host" > - default HOST_64BIT > - help > - Sandbox can be built on 32-bit and 64-bit hosts. > - The default is to build on a 64-bit host and run > - on a 64-bit host. If you want to run sandbox on > - a 32-bit host, change it here. > - > config HOST_32BIT > - bool "32-bit host" > - depends on !PHYS_64BIT > + def_bool ! $(cc-define,_LP64) > > config HOST_64BIT > - bool "64-bit host" > - > -endchoice > + def_bool $(cc-define,_LP64) > > config SANDBOX_CRASH_RESET > bool "Reset on crash" > diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include > index dad5583451..b7598ca5d9 100644 > --- a/scripts/Kconfig.include > +++ b/scripts/Kconfig.include This include is copied from Linux. From time to time we synchronize the Kconfig framework from Linux. So we should avoid U-Boot specific changes here. Best regards Heinrich > @@ -22,6 +22,10 @@ success =3D $(if-success,$(1),y,n) > # Return y if the compiler supports , n otherwise > cc-option =3D $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/n= ull) > > +# $(cc-define,) > +# Return y if the compiler defines , n otherwise > +cc-define =3D $(success,$(CC) -dM -E -x c /dev/null | grep -q '^#define= \<$(1)\>') > + > # $(ld-option,) > # Return y if the linker supports , n otherwise > ld-option =3D $(success,$(LD) -v $(1))