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 7B3BAEB64DC for ; Mon, 17 Jul 2023 08:10:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 24D5C86623; Mon, 17 Jul 2023 10:10:07 +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="oGKNOTH9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1108886623; Mon, 17 Jul 2023 10:10:03 +0200 (CEST) Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (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 DA57886614 for ; Mon, 17 Jul 2023 10:09:59 +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-pf1-x42c.google.com with SMTP id d2e1a72fcca58-666e3b15370so2963881b3a.0 for ; Mon, 17 Jul 2023 01:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689581398; x=1692173398; 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=EghVlrkkh/ENbTjQ7+6DCy3TQOjfpO1burdt0Q9/3eU=; b=oGKNOTH91iCx7Qtr3nqKedww3gZ++NSJ1jE+JwZDlFDs5zRK5hFbC3dDN29DwfRZOI ZKCSomRNJVbPXIumYkDlQEbwarNAroZdo94ljPbAIFmCCDqwWZLhFJPluVpsMwcr+41D vBvPh/dLZbhgkm0nA/3tq5A6jhDVAIc8FgIm94RiYptDqevA5KeaGm9Hai77vU3a+eAk 6+8IUKebfoiE2mBkJwaBKO1Y3ADAVvpZBndyv5kn7jPlA4Jc3Gb0LuedI3Q9u+mTmKRx buFxlorwzybkF0yBRmBwhlW9x7jcp/ec1gNrDJYlAr4vCs2Aq26G5wwqFj8vUo1txZpb nYrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689581398; x=1692173398; 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=EghVlrkkh/ENbTjQ7+6DCy3TQOjfpO1burdt0Q9/3eU=; b=lA9qBuuApmZkYs1M2XE+J4CBs643pn02bCVuNDMuuvfUzyVNA0XrYB/Wspkjs2+5gd 3vn3Um1dmMhq1j7INwc8DmIkVOk/swY9ZcJjl6q9Kri9BcgQOcIm+A/PnHal5f3GLqgI icGeSmBOdzT5X+zLUvYLfY2Fx/6abo71FwB/GKCKUrnhbTug0a6GG2EhiatKuxTHssNS MEJ7U7VZT2KgDeFJfJI3Za/BacmvIeiU5ol0983JUKFnaafhbXvE2o+90x4w0P40Utd7 GOyM0XGNW6oIJRayNBcZl703W+wThihxnR3Ga8Xq2Q9qPFlhp4JXGvJLiM2sCObThsVR RUAw== X-Gm-Message-State: ABy/qLY8bR8wIT8XkH1iYzM2WVdKxrVRFhBR0fs3z+9edxx821loNzqZ SX3kywaIiHVlE/mmOfvJ7RWWKQ== X-Google-Smtp-Source: APBJJlFlEtqAmabSqtRRo4AmD7MSuudKYcDeayMuOCIBKUJCUTnn8vP602rDMEUSRLrXr1x/6nW/SA== X-Received: by 2002:a05:6a00:1942:b0:679:9639:1f6a with SMTP id s2-20020a056a00194200b0067996391f6amr11606823pfk.14.1689581398021; Mon, 17 Jul 2023 01:09:58 -0700 (PDT) Received: from ?IPv6:2401:4900:57ad:854d:49c8:e779:9fe8:8a9? ([2401:4900:57ad:854d:49c8:e779:9fe8:8a9]) by smtp.gmail.com with ESMTPSA id k15-20020aa790cf000000b00666b3706be6sm11269164pfk.107.2023.07.17.01.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 01:09:57 -0700 (PDT) Message-ID: Subject: Re: [PATCH v4 0/4] SPL NVMe support From: mchitale@ventanamicro.com To: Tom Rini , Heinrich Schuchardt Cc: u-boot@lists.denx.de, Rick Chen , Leo , Bin Meng , Simon Glass Date: Mon, 17 Jul 2023 13:39:52 +0530 In-Reply-To: <20230712171254.GB2066889@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> 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 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.