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 AC12CEB64DA for ; Thu, 20 Jul 2023 06:17:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 14FF685CF8; Thu, 20 Jul 2023 08:17:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="JmktrOc6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C960C85CF8; Thu, 20 Jul 2023 08:17:26 +0200 (CEST) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (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 44D81847C0 for ; Thu, 20 Jul 2023 08:17:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mchitale@ventanamicro.com Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1b852785a65so3457455ad.0 for ; Wed, 19 Jul 2023 23:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689833842; x=1690438642; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=ZfSiSJVQbzL8uhHQKOI4Y+unlgvOInogSBGeIk05ntE=; b=JmktrOc6AXaSnyx4zR/AsJ1vj7StR78N3VP7PKtqUCtN1M0TFuOpPYhpcbNjxJBeHG PjLpZaxciZ6ZM6VOxZZbljRjMtfzKPNBQocnWPbiw68uTcfYlw1O816A7M6lcUvxxl5B Y9TwRbtQ6dYcJkWkU/N0P+mocTCyhZX453ASLiNPR2p7l04rtlO4wc1sB1lsPEEFxCiB O6YlCjFMKV1wPu6zM8tXRZB658kn0H8FwXzPNGJ1vLGJ97on5zgXxjaghXTzKrXeRs1z fzXPPmAVi3XfqAK3k+sbaYq0tHrTLRAtXtiqGotBt39681znGF9drkTwUulpFHvcmKNh bq4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689833842; x=1690438642; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZfSiSJVQbzL8uhHQKOI4Y+unlgvOInogSBGeIk05ntE=; b=BONN0RzZQELV10DDUbw6OMqPByW3lmpt88Lg5w5i+xbtVzmYJbivQyCVh4COPIclVL kQUTFs/A6+DuyoBpSsS2f3JNL2Qtk+qecXEik/5t2VSQePJGBPW4d45VLOwBQeCMMJBA Okd825jgxPM/cS3Q394M/AjgYFhrhqj4Tjn4gNpTQpX4B+KHlm0TXS8oappmaSH1/TtG EHBDJt8cKKg0sJMMc6qiZHjOFhTFBkaJYwSR9EX3Vnc3MpWyhu/PXx6cR9fcnGtcoBcd GOJ6iTE42vs3evjoKZDZ0rILOKF+vIMGeLoVshUcBns2IPZtTXwwMN/6Vv38uY6GzEId gISg== X-Gm-Message-State: ABy/qLZhbjIdgqBgYO4/m1ZBuQuLTR632mCWFHWtk0i8JmSY5Vk4Z6SZ UJ6CDloEoizqx+Kl0p+HWD5SMw== X-Google-Smtp-Source: APBJJlF3nXuLnytRmJ2d431dMlz4m4m7f63bJoGQkEYNz1iGsiVLNb8m/xSsqMaX4OZw4ioMUMkfSw== X-Received: by 2002:a17:902:f689:b0:1b8:af5e:853c with SMTP id l9-20020a170902f68900b001b8af5e853cmr6113292plg.26.1689833842560; Wed, 19 Jul 2023 23:17:22 -0700 (PDT) Received: from ThinkPad-T490 ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id y7-20020a1709029b8700b001b89045ff03sm334303plp.233.2023.07.19.23.17.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 23:17:21 -0700 (PDT) Message-ID: Subject: Re: [PATCH v4 0/4] SPL NVMe support From: mchitale@ventanamicro.com To: Tom Rini Cc: Heinrich Schuchardt , u-boot@lists.denx.de, Rick Chen , Leo , Bin Meng , Simon Glass Date: Thu, 20 Jul 2023 11:47:19 +0530 In-Reply-To: <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> <20230717151214.GC1670569@bill-the-cat> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 On Mon, 2023-07-17 at 11:12 -0400, Tom Rini wrote: > 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, > > > > > > > > > > On Tue, 2023-06-20 at 09:37 -0400, Tom Rini wrote: > > > > > > On Sat, 03 Jun 2023 19:32:52 +0530, Mayuresh Chitale wrote: > > > > > > > > > > > > > This patchset adds support to load images of the SPL's > > > > > > > next > > > > > > > booting > > > > > > > stage from a NVMe device. > > > > > > > > > > > > > > Changes in v4: > > > > > > > - Drop patch 4 > > > > > > > - Modify patch 2 to use generic fs.h APIs > > > > > > > > > > > > > > [...] > > > > > > > > > > > > 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. > > > > > > > > > > > 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 > > > > > > > > > > One possible fix is: > > > > > > > > > > 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 = env_get("bootdevice"); > > > > > > > > > > > > > > > > > > I think CONFIG_SPL_ENV_SUPPORT should depend on > > > > CONFIG_ENV_SUPPORT > > > > in > > > > common/spl/Kconfig. > > > > > > Not strictly, but checking for CONFIG_IS_ENABLED(ENV_SUPPORT) > > > should > > > do > > > what's desired here? > > > > 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)). Thanks! I will send the patch with this change. >