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 DEEB7C001DC for ; Mon, 17 Jul 2023 15:12:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC71086673; Mon, 17 Jul 2023 17:12:21 +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="ZqxiOCvG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 704C28666E; Mon, 17 Jul 2023 17:12:20 +0200 (CEST) Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (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 D824386680 for ; Mon, 17 Jul 2023 17:12:17 +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-yw1-x1129.google.com with SMTP id 00721157ae682-5774335bb2aso41456377b3.0 for ; Mon, 17 Jul 2023 08:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1689606736; x=1692198736; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yVgUXw+bCqyz6fGy4kFR1GTCu3Z7MsrF7D8/UlgeMhc=; b=ZqxiOCvG+nNz84ffhOGNALkq51Kdx4u2RNieIxRn4Lner/BrGMcXV11IPZQ5VT8O9x yJ6pXWZsBxt0r2Gkgx7zbyzd6SpS44Fgwz3PdKxfkQZBsRcrBxUHLYm/gzBxEI+9/UtU Z5I42YkTEx4iTFDSex/staXUfTRNm7sAEbW8g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689606736; x=1692198736; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yVgUXw+bCqyz6fGy4kFR1GTCu3Z7MsrF7D8/UlgeMhc=; b=V5/pNWM0xeLZbo0v8ymVTdOaZv07yn79F2JqBaLRvHB0T//a7Y7CJEx8eBO9n+Mahf A+M0dcO2m9Bm2nMa2eVKyULyW1FCXAqWP0U0fOsBFuyfp0R/EthEbOZiVwsUi2GEqB+8 ppe5QA9WZM1D8VqDL10qLbmBs6xeaCARl2gywR7xtLf48gW0PmboUzg2gLolCJaL66BJ gV/zPSSsBm6eXEjjtN5jCZNPyV9M90Z/X8YdoOcu/K3XGQMnOzDKB/luLSvxZwDHb3Vy lR5VyU1BH4aIeiDEntyjaFTO0HOGLNsIEthIbIh8JwD7bKXV6H/3P3oKs1Afvtb8Adhc WDlQ== X-Gm-Message-State: ABy/qLYBg8cwJP9X796EPTEny5Yju+bGf/uuYAwSQMe8EuM2HC8SB85D AbPVG4Q8kKVW/yRkZaU+0vrSqQ== X-Google-Smtp-Source: APBJJlH6J4yUkkHYwNjJT+f88g2X3AjUo5vSRu1PDq6W6AnPfoebyIHxQ4/26oE/B8Fzqu7wgbgVYg== X-Received: by 2002:a0d:d4c6:0:b0:564:e951:a7cc with SMTP id w189-20020a0dd4c6000000b00564e951a7ccmr10655736ywd.45.1689606736482; Mon, 17 Jul 2023 08:12:16 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-865a-8589-771c-0053.res6.spectrum.com. [2603:6081:7b00:6400:865a:8589:771c:53]) by smtp.gmail.com with ESMTPSA id z205-20020a8165d6000000b00545a08184e0sm3883608ywb.112.2023.07.17.08.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 08:12:15 -0700 (PDT) Date: Mon, 17 Jul 2023 11:12:14 -0400 From: Tom Rini To: mchitale@ventanamicro.com Cc: Heinrich Schuchardt , u-boot@lists.denx.de, Rick Chen , Leo , Bin Meng , Simon Glass Subject: Re: [PATCH v4 0/4] SPL NVMe support Message-ID: <20230717151214.GC1670569@bill-the-cat> References: <20230603140256.2443518-1-mchitale@ventanamicro.com> <168726816209.294140.1474019151902272300.b4-ty@konsulko.com> <042cf19a45191fb36e5fc00662273d84fc60c217.camel@ventanamicro.com> <2933d643-c026-8b8c-1867-909db02716b6@gmx.de> <20230712171254.GB2066889@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZBSZZZE44op8IfpQ" Content-Disposition: inline In-Reply-To: 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.8 at phobos.denx.de X-Virus-Status: Clean --ZBSZZZE44op8IfpQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 17, 2023 at 01:39:52PM +0530, mchitale@ventanamicro.com wrote: > On Wed, 2023-07-12 at 13:12 -0400, Tom Rini wrote: > > On Wed, Jul 12, 2023 at 03:27:45PM +0200, Heinrich Schuchardt wrote: > > > On 12.07.23 15:06, mchitale@ventanamicro.com wrote: > > > > Hi Tom, > > > >=20 > > > > On Tue, 2023-06-20 at 09:37 -0400, Tom Rini wrote: > > > > > On Sat, 03 Jun 2023 19:32:52 +0530, Mayuresh Chitale wrote: > > > > >=20 > > > > > > This patchset adds support to load images of the SPL's next > > > > > > booting > > > > > > stage from a NVMe device. > > > > > >=20 > > > > > > Changes in v4: > > > > > > - Drop patch 4 > > > > > > - Modify patch 2 to use generic fs.h APIs > > > > > >=20 > > > > > > [...] > > > > >=20 > > > > > With one change, which is that the "disk/part.c" in 4/4 were > > > > > not > > > > > required for > > > > > any platform in tree and also broke testcases, and so was > > > > > dropped, > > > > > this has now > > > > > been applied to u-boot/next. If you can explain a bit more what > > > > > the > > > > > problem you > > > > > had was, we can look in to it. I suspect you need to test for > > > > > not > > > > > SPL_ENV_SUPPORT but ENV_SUPPORT itself. > > > > >=20 > > > > Thanks. > > > > When SPL_NVME is enabled the build breaks with the following > > > > error: > > > > riscv64-unknown-linux-gnu-ld.bfd: disk/part.o: in function > > > > `blk_get_device_part_str': > > > > u-boot/disk/part.c:473: undefined reference to `env_get' > > > > make[2]: *** [u-boot/scripts/Makefile.spl:527: spl/u-boot-spl] > > > > Error 1 > > > > make[1]: *** [/u-boot/Makefile:2053: spl/u-boot-spl] Error 2 > > > >=20 > > > > One possible fix is: > > > >=20 > > > > if ((!IS_ENABLED(CONFIG_SPL) && IS_ENABLED(CONFIG_ENV_SUPPORT)) > > > > || > > > > (IS_ENABLED(CONFIG_SPL) && > > > > IS_ENABLED(CONFIG_SPL_ENV_SUPPORT))) > > > > if (!dev_part_str || !strlen(dev_part_str) > > > > > > !strcmp(dev_part_str, "-")) > > > > dev_part_str =3D env_get("bootdevice"); > > > >=20 > > > >=20 > > >=20 > > > I think CONFIG_SPL_ENV_SUPPORT should depend on CONFIG_ENV_SUPPORT > > > in > > > common/spl/Kconfig. > >=20 > > Not strictly, but checking for CONFIG_IS_ENABLED(ENV_SUPPORT) should > > do > > what's desired here? >=20 > When SPL_NVME & SPL_BLK_FS is enabled, the spl_blk_fs driver calls > fs_set_blk_dev to the set the device & partition before accessing it > and fs_set_blk_dev internally tries to get the device & partition from > the bootdevice env variable if it was not passed by the caller. However > for SPL build, when SPL_ENV_SUPPORT is not enabled nothing provides > env_get and hence the build fails. OK. So in the code we should be able to test with CONFIG_IS_ENABLED(ENV_SUPPORT) is that will be true for ((SPL and SPL environment support) or (Main U-Boot and environment support) or (TPL and TPL env)). --=20 Tom --ZBSZZZE44op8IfpQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmS1WkoACgkQFHw5/5Y0 tyyAlAwAtkHG7ZF0Y3aMex9Yzw8tlHif1fxwb33FG+PBcAs1Iu6FbKuwYVhDjjF2 74rwCUOSDRD55NgVxtdvCA2QDBthhz8pEBIwTIPVZZtBFYyc8rdX5mDYtfc+cLmX t6x9exWXKGV+mgLXMAuzxJoaBk/y9h1vPyIqxucXoiy4Ta6zvMZynx1TemGqp00w 9oODJSOMe+IqZTNPw/fF46E5En6chB2DIUVY6pVTraZKE5yPAAtTGV0GMEStyfbf BBx4ZJGlo4X+qqrPNFpJC7bTJ0BrHQzrcvlLyMnOXnWROQLx2ITZyjwW9CTVF+Q4 RDZ+M2td9+CAl26o+ZYVzAlSaV1EBRsLSXv506b+oUb3phlQxiGNoAxoDTAB5Be5 uSaZgxETQU0YOfR7+Yzp04Y4GuZ4GPfvf4XL5qpGpylVbStXAxsacYB/EZ93q+GW grmU2UNR0ruDW3NYlr1nNdjFibdoT4tnXTM3zPI4lvXg/HsGBzHnnLKfTc7ZpgjD EaFNdBJ3 =TvMs -----END PGP SIGNATURE----- --ZBSZZZE44op8IfpQ--