From patchwork Mon Apr 24 01:49:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772512 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=cNGfw/V3; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4SkS4kVXz23hs for ; Mon, 24 Apr 2023 11:50:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0DEB786124; Mon, 24 Apr 2023 03:50:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="cNGfw/V3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 740BF8611C; Mon, 24 Apr 2023 03:50:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 AFC5886102 for ; Mon, 24 Apr 2023 03:49:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-7606ce9bfdeso371803139f.0 for ; Sun, 23 Apr 2023 18:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682300998; x=1684892998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d6bL0ou/xEe1d/ox7Q+WiwK0FvSza4x6kClKOobL85s=; b=cNGfw/V37M1bWVDBW6HgWxt1XrK8Mf5+5cod2X7/ZN+i0i3rP0FxsbBiA/WCA9zAMe 6mYCAKDSaU7uUZrnNRPSlWPGIaoZitP7HHrqMc5YP/O5aBlX9l6H/4yOjYMBnU5CFLzM dSz+3eNcNYYwK3Vo9yRi/njUVUbN6gY1U4G/Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682300998; x=1684892998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d6bL0ou/xEe1d/ox7Q+WiwK0FvSza4x6kClKOobL85s=; b=hL8hnov7E5OzqSvRi29+oqPN/qHkDQvUYEng4iSCpqC4mDFSBe2RpVlU/3v3dJKecD TSEt6knVeyxTm2C+I6uPQkalytDus/cSbU9nUoc+MndGg+mYCbUsgXf345dNO1gvIHwI Q026cD1xXypO660DtPI6ASAM1mdBr1CTPb7Owvd95mq8k4Q2iHTvzFjGmBkzH6k5AbMq ufqSlW0/6LxE6cdokA13vNQtlEBP23FB69C3AcmEhVQcYIZtijhHHwKXQDDbAryRQ6Aw Soe6nfZWD7DtneqpYCq7Wy05CkR+HOJY0Da2xnsqvnKqoa2jlo1TwKFMRZSkdLFeiOhP Zm8Q== X-Gm-Message-State: AAQBX9ejOlZQoKyRi3uB6ZDMNUHKSBkD5gXNK/D135fh6LL/KskZuZXg Assuz1o5Mr8mR1z6GjJRhxiUEY052SHQEWznbk4= X-Google-Smtp-Source: AKy350YWAtWFtQQhnAJT199URhExBUI50E10I1T3VPMPLjsZla39KPmQLttXc8srTs+eMF4PRsYvRQ== X-Received: by 2002:a05:6602:25c2:b0:760:eb94:c971 with SMTP id d2-20020a05660225c200b00760eb94c971mr4449050iop.11.1682300998361; Sun, 23 Apr 2023 18:49:58 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:49:58 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v10 1/9] bootstd: Tweak bootflow logic for device tree Date: Mon, 24 Apr 2023 13:49:44 +1200 Message-ID: <20230424134946.v10.1.Id5a4b4ee7b653591dfb25e75204c17215521164b@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 We should only store the FDT filename if we were able to determine one. Adjust the logic for this. This corrects the case where no FDT is needed to boot, such as with EFI using ACPI. Signed-off-by: Simon Glass --- (no changes since v6) Changes in v6: - Fix 'unable' typo Changes in v5: - Add new patch to tweak bootflow logic for device tree boot/bootmeth_efi.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 6a97ac02ff5c..d7e042cf01ee 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -235,21 +235,21 @@ static int distro_efi_read_bootflow_file(struct udevice *dev, /* try the various available names */ ret = -ENOENT; - for (seq = 0; ret; seq++) { + *fname = '\0'; + for (seq = 0; ret == -ENOENT; seq++) { ret = distro_efi_get_fdt_name(fname, sizeof(fname), seq); - if (ret == -EALREADY) { + if (ret == -EALREADY) bflow->flags = BOOTFLOWF_USE_PRIOR_FDT; - break; - } - if (ret) - return log_msg_ret("nam", ret); - ret = bootmeth_common_read_file(dev, bflow, fname, fdt_addr, - &size); + if (!ret) + ret = bootmeth_common_read_file(dev, bflow, fname, + fdt_addr, &size); } - bflow->fdt_fname = strdup(fname); - if (!bflow->fdt_fname) - return log_msg_ret("fil", -ENOMEM); + if (*fname) { + bflow->fdt_fname = strdup(fname); + if (!bflow->fdt_fname) + return log_msg_ret("fil", -ENOMEM); + } if (!ret) { bflow->fdt_size = size; From patchwork Mon Apr 24 01:49:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772513 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=C/synabF; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4Skh5mYrz23hs for ; Mon, 24 Apr 2023 11:50:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5DCA0860F4; Mon, 24 Apr 2023 03:50:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="C/synabF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 62CDE86102; Mon, 24 Apr 2023 03:50:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) (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 A768285350 for ; Mon, 24 Apr 2023 03:50:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-7606d460da7so92196839f.1 for ; Sun, 23 Apr 2023 18:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682300999; x=1684892999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FaZp6v4OtHvC+Qtg0WZjiVRCck8HwWDwx1YBd0x2Akc=; b=C/synabF1MBAAltk34WWVsYzZ6xnCE39fH4Wamw5R+CWKFL5iWdhWe1FQcqKJtyWH6 DdVqwhSNTbHo5ZQ/pqsE8eogNs9cIKTuJ8rW/zqcBNBIs18JHe8nLsOkS0A2ZG3dSGjz p6FxlbI+wSgUwH6kqAJFaymZ/tUmgjxGUhQEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682300999; x=1684892999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FaZp6v4OtHvC+Qtg0WZjiVRCck8HwWDwx1YBd0x2Akc=; b=PvfwWu6RZC1QFiQL9Wawv7jH2L0iE2OEUgcgFbXJr9afsv6wEoWQr1F83kmSX2qX36 X2UmpOa5dv2o/blHtoFr6S/txyglZd6Cb5BFuRHKG8kDHBS2ckQt4DRP5xOuwt3ukfXV Nqpx3OfHf34TI1FiJLiFe16URLnde2PqmhAZrvfi5FhJVi2FP8iRXOVo/AIb+shCszbb LZE1l0WkyZbpESCyfEsdZHSgD8vT2zCNQz1+mxtSi2SiqNGCjPl0+xyJa4gT9UmWXhCs 2riFpDmH5QOQ32v+/TZxYYDbvVQw1wEObN8h830t1CJn6YmkLAGFFksqucJCyCspMN7p ImVw== X-Gm-Message-State: AAQBX9fUxExvEXM3Oq9KsJU0qrfm3lV2B5639VjEAydnw8pRXmXfJLxj giCfoV6hN1hM24in3Wu7VgAoi7e/YtHhZDf3vhM= X-Google-Smtp-Source: AKy350a8S8hidUUx6osVDOrAufIAHESpOBTonQWsqklOkQ8E8Prl0U6UKFVEgNr0gJDWMLwexXRgEA== X-Received: by 2002:a92:c60c:0:b0:32d:56e1:1f18 with SMTP id p12-20020a92c60c000000b0032d56e11f18mr4261140ilm.30.1682300999285; Sun, 23 Apr 2023 18:49:59 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:49:58 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v10 2/9] virtio: Ensure PCI is set up first Date: Mon, 24 Apr 2023 13:49:45 +1200 Message-ID: <20230424134946.v10.2.I10d83b8073de5058efabbf2ba2498fe008624293@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 Sometimes virtio may rely on PCI, or at least that is what the distro_bootcmd script suggests. Add this in. Signed-off-by: Simon Glass --- (no changes since v5) Changes in v5: - Add new patch to ensure PCI is set up first when using virtio drivers/virtio/virtio-uclass.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c index de9bc90359ca..918cc15b019f 100644 --- a/drivers/virtio/virtio-uclass.c +++ b/drivers/virtio/virtio-uclass.c @@ -373,6 +373,12 @@ static int virtio_bootdev_hunt(struct bootdev_hunter *info, bool show) { int ret; + if (IS_ENABLED(CONFIG_PCI)) { + ret = uclass_probe_all(UCLASS_PCI); + if (ret && ret != -ENOENT) + return log_msg_ret("pci", ret); + } + ret = uclass_probe_all(UCLASS_VIRTIO); if (ret && ret != -ENOENT) return log_msg_ret("vir", ret); From patchwork Mon Apr 24 01:49:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772516 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=mMQrCm7l; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4SlS6RtFz23hs for ; Mon, 24 Apr 2023 11:51:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9617E86113; Mon, 24 Apr 2023 03:50:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="mMQrCm7l"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5173F86103; Mon, 24 Apr 2023 03:50:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 88276860F4 for ; Mon, 24 Apr 2023 03:50:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-760bba6404cso98046439f.1 for ; Sun, 23 Apr 2023 18:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682301000; x=1684893000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P266UVxp1ByLSii81c+YSGYKfV6+v4+i/JvC5T5FzJs=; b=mMQrCm7leTRToFI/nqac6Q4KqPCmj3X+8crNfFeBDf3yO6WFSj0Ua5Tvy9jQ12XhUn OfHG7krGAC1nHxHz4+5zLhksP03A82oTWCD0ouRpQ6C9sYA8eoHWhz0niIqPaWuxUnbZ TuDZuFlCn0Nv2SKAy+ogHMCIMeihcXi1LBQHs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682301000; x=1684893000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P266UVxp1ByLSii81c+YSGYKfV6+v4+i/JvC5T5FzJs=; b=YahIIbJ8ehWKbEu8B7qEzttuUn0Qn/WuH69qN/dvUx/MHMjIm5CGU9oiQaxNNOwpau CP8Pq3TPi2TQ0ZcRmObRVsRyf77jimc6nBzyEGuqSVyBe4UezsDQKJp85feOYkHDweeD Bi8qKvMsxiag/9uptGf1RLj3wxpUlEg3zHc0Lh3lAc9rrXd6Uj2Bqbgb45OkBrLX8rZm auA3vTQZhBut70z9w6r/GL9grew11NOP++YK2c/O8u+jXyq5wiGD3BHAYNYExlnv/VYS CF1R+xGqN/egSlCr3SbNkTE93cuONHxEw4RdYxZYy0QlFQAwbkYrSoeumDHcE31l5U2p JzdQ== X-Gm-Message-State: AAQBX9c9RDTIRgWiXS+lR4HMPBdXX+tub8dj4A9PGLWr3JlWFgZpUETs 4gtJ6PIrWLsjEXimVVZ3ehp0e/N7Sdzh2YBPpbs= X-Google-Smtp-Source: AKy350ZuITdcXeH0tyv18KPXweR9KvPtUZ7bG7c9oAfhnYR4LybOxWybAv+cU+AWiAeIIIhiAZI4+g== X-Received: by 2002:a5d:96c8:0:b0:760:e308:107e with SMTP id r8-20020a5d96c8000000b00760e308107emr4588944iol.0.1682301000142; Sun, 23 Apr 2023 18:50:00 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:49:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v10 3/9] bootstd: Support booting EFI where multiple options exist Date: Mon, 24 Apr 2023 13:49:46 +1200 Message-ID: <20230424134946.v10.3.Ifa423a8f295b3c11e50821222b0db1e869d0c051@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 The current EFI implementation has a strange quirk where it watches loaded files and uses the last-loaded file to determine the device that is being booted from. This is confusing with bootstd, where multiple options may exist. Even loading a device tree will cause it to go wrong. There is no API for passing this information, since the only entry into booting an EFI image is the 'bootefi' command. To work around this, call efi_set_bootdev() for EFI images, if possible, just before booting. Signed-off-by: Simon Glass --- (no changes since v5) Changes in v5: - Add new patch to support booting EFI where multiple options exist boot/bootmeth_efi.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index d7e042cf01ee..d8bc7fafd127 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -94,7 +94,7 @@ static int get_efi_pxe_vci(char *str, int max_len) return 0; } -static int efiload_read_file(struct blk_desc *desc, struct bootflow *bflow) +static void set_efi_bootdev(struct blk_desc *desc, struct bootflow *bflow) { const struct udevice *media_dev; int size = bflow->size; @@ -102,11 +102,6 @@ static int efiload_read_file(struct blk_desc *desc, struct bootflow *bflow) char devnum_str[9]; char dirname[200]; char *last_slash; - int ret; - - ret = bootmeth_alloc_file(bflow, 0x2000000, 0x10000); - if (ret) - return log_msg_ret("read", ret); /* * This is a horrible hack to tell EFI about this boot device. Once we @@ -117,7 +112,8 @@ static int efiload_read_file(struct blk_desc *desc, struct bootflow *bflow) * this can go away. */ media_dev = dev_get_parent(bflow->dev); - snprintf(devnum_str, sizeof(devnum_str), "%x", dev_seq(media_dev)); + snprintf(devnum_str, sizeof(devnum_str), "%x:%x", dev_seq(media_dev), + bflow->part); strlcpy(dirname, bflow->fname, sizeof(dirname)); last_slash = strrchr(dirname, '/'); @@ -130,6 +126,15 @@ static int efiload_read_file(struct blk_desc *desc, struct bootflow *bflow) dev_name = device_get_uclass_id(media_dev) == UCLASS_MASS_STORAGE ? "usb" : dev_get_uclass_name(media_dev); efi_set_bootdev(dev_name, devnum_str, bflow->fname, bflow->buf, size); +} + +static int efiload_read_file(struct blk_desc *desc, struct bootflow *bflow) +{ + int ret; + + ret = bootmeth_alloc_file(bflow, 0x2000000, 0x10000); + if (ret) + return log_msg_ret("read", ret); return 0; } @@ -373,6 +378,13 @@ int distro_efi_boot(struct udevice *dev, struct bootflow *bflow) /* A non-zero buffer indicates the kernel is there */ if (bflow->buf) { + /* Set the EFI bootdev again, since reading an FDT loses it! */ + if (bflow->blk) { + struct blk_desc *desc = dev_get_uclass_plat(bflow->blk); + + set_efi_bootdev(desc, bflow); + } + kernel = (ulong)map_to_sysmem(bflow->buf); /* From patchwork Mon Apr 24 01:49:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772517 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=BHWd74wr; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4Slj3bmWz23hs for ; Mon, 24 Apr 2023 11:51:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 55CF086102; Mon, 24 Apr 2023 03:50:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="BHWd74wr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4906885350; Mon, 24 Apr 2023 03:50:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (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 84408860FE for ; Mon, 24 Apr 2023 03:50:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-76355514e03so371654739f.0 for ; Sun, 23 Apr 2023 18:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682301001; x=1684893001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4hfzUETJnGTOJa0Jdsj5WwHv8FeOGd2hlso6QmQ7gAw=; b=BHWd74wroKPoo+lBRJnl0w3MlR8lSCqp5Ke3mSTAACFJznUNUHXmPEBn4KZ1UObzL0 0g3cbMF6mrVXmkTG/rf0dGHLQy0+nq7AjodwDM9D/UmLEXiH6q+d9aB44HQiaKrR7EDo EdIf4arOYKWH6k03PU+CD3tba+/QumhmJ7Cjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682301001; x=1684893001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4hfzUETJnGTOJa0Jdsj5WwHv8FeOGd2hlso6QmQ7gAw=; b=PWP0sBDigTvPbDlOJ9nYQdpcnkV6GGgFxytD5q9DRmSMs+nbUfHD/ej1DP1yXHQLcV AnCP6aI9EiUp2Z+v1kfvUSLIKvqrbpM0NFuJrMS1cXliDo+ea7eBvr1c5HErw6tX+le1 f4fcVkuB9jJzvmbvgWA9eKcOA8QJIevnUK35RH1QfFE8Opppl2Q7RwsvBakgr1MP+WbM tnlMiJjxwSOaAHoWl5II3au6/3YAgOFFHFY7CVZiioWOslDKWQ/hkjJ5EVcXJr4p3uDA L1LiuyT8zyk+qIquGdif+xrrv4i16RFm9d228AMlw7mMQDRA8Kx/xX/0oPflhK9bnzvC LXfw== X-Gm-Message-State: AAQBX9eiEs3Po3oz4FP+/d+9eyxcQKCOMxbz+cJ9f4SBlQ8MUlPnSyzV HdOqZ/R3aGlM0Uv/sPwSnmWqAwEWkktRfCs5Cgc= X-Google-Smtp-Source: AKy350YV/EpoH4rR1RP1e8ere531mHiGZIBeSw3lqwuL5u6cCdLRXFbNcvVOyQcLBApb4Js3tY5JgA== X-Received: by 2002:a92:902:0:b0:325:fb39:8494 with SMTP id y2-20020a920902000000b00325fb398494mr4753768ilg.4.1682301001064; Sun, 23 Apr 2023 18:50:01 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:50:00 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v10 4/9] bootstd: Report missing labels only when asked Date: Mon, 24 Apr 2023 13:49:47 +1200 Message-ID: <20230424134946.v10.4.I34e1ec50c59a5a2427c692f612cd2cfa8d30d325@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 Use the -l flag to indicate whether to report missing uclasses. Also try to be more helpful when no devices are found. For example, when we see something 'scsi0' requested and nothing was found, this indicates that there are no SCSI devices, so show a suitable message. Move messages out of the low-level functions so that silent operation is possible. This means they are never reported unless BOOTSTD_FULL is enabled, since the -l flag cannot otherwise be set. Suggested-by: Tom Rini Signed-off-by: Simon Glass --- (no changes since v6) Changes in v6: - Add new patch to report missing labels only when asked boot/bootdev-uclass.c | 32 +++++++++++++++++++++++++------- include/bootdev.h | 2 +- test/boot/bootdev.c | 12 +++++------- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index d34b7e37cf79..91087981d213 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -364,7 +364,8 @@ int bootdev_unbind_dev(struct udevice *parent) * @seqp: Returns the sequence number, or -1 if none * @method_flagsp: If non-NULL, returns any flags implied by the label * (enum bootflow_meth_flags_t), 0 if none - * Returns: sequence number on success, else -ve error code + * Returns: sequence number on success, -EPFNOSUPPORT is the uclass is not + * known, other -ve error code on other error */ static int label_to_uclass(const char *label, int *seqp, int *method_flagsp) { @@ -394,8 +395,7 @@ static int label_to_uclass(const char *label, int *seqp, int *method_flagsp) id = UCLASS_ETH; method_flags |= BOOTFLOW_METHF_DHCP_ONLY; } else { - log_warning("Unknown uclass '%s' in label\n", label); - return -EINVAL; + return -EPFNOSUPPORT; } } if (id == UCLASS_USB) @@ -458,7 +458,6 @@ int bootdev_find_by_label(const char *label, struct udevice **devp, } log_debug("- no device in %s\n", media->name); } - log_warning("Unknown seq %d for label '%s'\n", seq, label); return -ENOENT; } @@ -577,9 +576,28 @@ int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp, log_debug("next\n"); for (dev = NULL; !dev && iter->labels[++iter->cur_label];) { - log_debug("Scanning: %s\n", iter->labels[iter->cur_label]); - bootdev_hunt_and_find_by_label(iter->labels[iter->cur_label], - &dev, method_flagsp); + const char *label = iter->labels[iter->cur_label]; + int ret; + + log_debug("Scanning: %s\n", label); + ret = bootdev_hunt_and_find_by_label(label, &dev, + method_flagsp); + if (iter->flags & BOOTFLOWIF_SHOW) { + if (ret == -EPFNOSUPPORT) { + log_warning("Unknown uclass '%s' in label\n", + label); + } else if (ret == -ENOENT) { + /* + * looking for, e.g. 'scsi0' should find + * something if SCSI is present + */ + if (!trailing_strtol(label)) { + log_warning("No bootdevs for '%s'\n", + label); + } + } + } + } if (!dev) diff --git a/include/bootdev.h b/include/bootdev.h index b92ff4d4f154..e72ef3650f7c 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -258,7 +258,7 @@ int bootdev_find_by_label(const char *label, struct udevice **devp, * @devp: returns the device found, on success * @method_flagsp: If non-NULL, returns any flags implied by the label * (enum bootflow_meth_flags_t), 0 if none. Unset if function fails - * Return: 0 if OK, -EINVAL if the uclass is not supported by this board, + * Return: 0 if OK, -EPFNOSUPPORT if the uclass is not supported by this board, * -ENOENT if there is no device with that number */ int bootdev_find_by_any(const char *name, struct udevice **devp, diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index 4fe9fd722084..0899c78c2c4a 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -124,7 +124,8 @@ static int bootdev_test_labels(struct unit_test_state *uts) mflags); /* Check invalid uclass */ - ut_asserteq(-EINVAL, bootdev_find_by_label("fred0", &dev, &mflags)); + ut_asserteq(-EPFNOSUPPORT, + bootdev_find_by_label("fred0", &dev, &mflags)); /* Check unknown sequence number */ ut_asserteq(-ENOENT, bootdev_find_by_label("mmc6", &dev, &mflags)); @@ -179,9 +180,8 @@ static int bootdev_test_any(struct unit_test_state *uts) /* Check invalid uclass */ mflags = 123; - ut_asserteq(-EINVAL, bootdev_find_by_any("fred0", &dev, &mflags)); - ut_assert_nextline("Unknown uclass 'fred0' in label"); - ut_assert_nextline("Cannot find bootdev 'fred0' (err=-22)"); + ut_asserteq(-EPFNOSUPPORT, bootdev_find_by_any("fred0", &dev, &mflags)); + ut_assert_nextline("Cannot find bootdev 'fred0' (err=-96)"); ut_asserteq(123, mflags); ut_assert_console_end(); @@ -512,9 +512,8 @@ static int bootdev_test_hunt_label(struct unit_test_state *uts) old = (void *)&mflags; /* arbitrary pointer to check against dev */ dev = old; mflags = 123; - ut_asserteq(-EINVAL, + ut_asserteq(-EPFNOSUPPORT, bootdev_hunt_and_find_by_label("fred", &dev, &mflags)); - ut_assert_nextline("Unknown uclass 'fred' in label"); ut_asserteq_ptr(old, dev); ut_asserteq(123, mflags); ut_assert_console_end(); @@ -525,7 +524,6 @@ static int bootdev_test_hunt_label(struct unit_test_state *uts) bootdev_hunt_and_find_by_label("mmc4", &dev, &mflags)); ut_asserteq_ptr(old, dev); ut_asserteq(123, mflags); - ut_assert_nextline("Unknown seq 4 for label 'mmc4'"); ut_assert_console_end(); ut_assertok(bootstd_test_check_mmc_hunter(uts)); From patchwork Mon Apr 24 01:49:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772515 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=fAxwOTn3; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4SlC38Dzz23hs for ; Mon, 24 Apr 2023 11:50:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9AF5286136; Mon, 24 Apr 2023 03:50:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="fAxwOTn3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2DF3885350; Mon, 24 Apr 2023 03:50:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 64BC186114 for ; Mon, 24 Apr 2023 03:50:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-32ad0eb84ffso10542645ab.3 for ; Sun, 23 Apr 2023 18:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682301002; x=1684893002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5ctM4bq4UM1+WYEx6AI8CIZtE8xjyB4GD1QZkjmDKeE=; b=fAxwOTn3TBZNUw6ceqbDVhgKMPF4x6HiI56RTnCL4qCm2j1PREjGNINEBAiK47v2e+ aMGgsli4Hc5il/eJ84BuNYpIlB/wV1GAxmidKCr3kCFDUNQ/ODXGprp51hRwVaoTaR6k 8bjnRWEoGl4SioIyDLUJJPa6v+JeXxaS/yowI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682301002; x=1684893002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5ctM4bq4UM1+WYEx6AI8CIZtE8xjyB4GD1QZkjmDKeE=; b=ZRJdFYw0bN/Wmoyu519+AQmSflkhFTpqcZx7Q+edOqUmjsmAOqPIAMheioVB3EZWgD S9uxeoNiUS7FQJzwItjrLNcbVaDtlwgKjfAUWofvksWB7ztg0u0bQByR2M8RQn+8dO4y jGWOWNKRYdGOtXeM57HYGuOfexXHUA1gffwCTL0UK0Ms0aV+EgcYBbtDLMxXeCA7JWWW WgeyUXsx/0zNsH+Otajuh14acHab4yBYAyIpB5AInmjUQVM39UIzFa69nB13bzM7GUMQ /6GE6/gFJrCz4VVwPN4eMFdyDiFMVmbOF3UiX5VSx/kjQn4wazg53E6lyH7Ibf2PtkzK JaZw== X-Gm-Message-State: AAQBX9fnx0fKwmCfnj/2g1yMPBQuJ3rs0N1et0lkp7N33EYzQ4s7exew SXEDYtnL82ZH+uJn365UNBBT3V2WI7M7wqLT8+A= X-Google-Smtp-Source: AKy350baWQQ5o3jlJBzqhlu2x4VFhGpsDKOanCmFjujto0UCTcDCC2ht2OhUDD9csCOnkz8u/bQ84g== X-Received: by 2002:a92:c64f:0:b0:325:cc57:df63 with SMTP id 15-20020a92c64f000000b00325cc57df63mr4405744ill.22.1682301001977; Sun, 23 Apr 2023 18:50:01 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:50:01 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v10 5/9] bootstd: Show a message sometimes if no bootflows are found Date: Mon, 24 Apr 2023 13:49:48 +1200 Message-ID: <20230424134946.v10.5.I53dbbf7d5e7585e4d1678117165a46de1d8d7eac@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 Enable some messages that might provide hints, but only for CMD_BOOTFLOW_FULL since otherwise the -l flag is not available. Signed-off-by: Simon Glass Suggested-by: Tom Rini --- (no changes since v6) Changes in v6: - Add new patch to show a message sometimes if no bootflows are found cmd/bootflow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/bootflow.c b/cmd/bootflow.c index 42f6e14a4370..aa06999e3db3 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -181,6 +181,9 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc, if (list) show_footer(i, num_valid); + if (IS_ENABLED(CONFIG_CMD_BOOTFLOW_FULL) && !num_valid && !list) + printf("No bootflows found; try again with -l\n"); + return 0; } From patchwork Mon Apr 24 01:49:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772518 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=fMlYxUkU; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4Slx6jh4z23hs for ; Mon, 24 Apr 2023 11:51:25 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 13A6386157; Mon, 24 Apr 2023 03:50:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="fMlYxUkU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 981378610B; Mon, 24 Apr 2023 03:50:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 67CF285C9B for ; Mon, 24 Apr 2023 03:50:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-3293e4b2cb5so36154195ab.3 for ; Sun, 23 Apr 2023 18:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682301003; x=1684893003; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SlRjbe0OQ9XscFRm4UY0Q9vSDtYuJfZaMPtEscBNaWQ=; b=fMlYxUkUQbeyOMdJvzp/r38dQ8nw3xjLmX5NavXgH19IcqIwDlC0dMw0lrcdKHwdgH 5cEhWTNlnqcgVYpdBbbjZtsck5mFhXxGK7D4dyfZjUqnE+rf11/ja7LG1wJaabuAswJS 85mWrV4v1DLcV/3WakqXDyeCnI9mlrJz+BdsE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682301003; x=1684893003; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SlRjbe0OQ9XscFRm4UY0Q9vSDtYuJfZaMPtEscBNaWQ=; b=fpQA/2/qXih8XI+qIyI25uy8UX2DanHKFrSilTngRWIC/MYtRpNh/92WQSQVlPwCXu Tqstx/76obKLlZIGlM+nc16pTWsFLMj5/zUg8NsQqnDZrw3T/KtZaCUeN0aKcVyhskOL ku7qY8mEX3Ja1zJzO5Fl75ZQ3nyQ19h7OdT4Q6BO2WD9SYpf/6NOUrOkOV9Sm/oyWaL+ ZkLv/drG67Xn24gGDcO5NoiZR7D5X0+MnIj7tJjcZDZJI/6kK3GVzvZyj/fx5QUSKgwO rdbDinVqF801qrjh7a85qnrKSJKdPpsi715Qrt0qyipuzcKQCh30KRUwWHNVipulnQo3 SwPw== X-Gm-Message-State: AAQBX9cf1Erwc6+svoa41DyG0h/dTLactlMBIn7q4ZYB8CwajqCYzG3O JaOm9pUWtbyU62hgdE7ptgW6Rx/IxXalOwRJExU= X-Google-Smtp-Source: AKy350Yl/LCDVWEl3CR6EQj/Pl72FqHASXj/us0ld4VbZ/5G32BpzFD2yg7/wFWKFyjRPwGirsh0qw== X-Received: by 2002:a92:d10a:0:b0:315:352e:d5d0 with SMTP id a10-20020a92d10a000000b00315352ed5d0mr4126160ilb.32.1682301002945; Sun, 23 Apr 2023 18:50:02 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:50:02 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v10 6/9] bootstd: Adjust code ordering to work around compiler quirk Date: Mon, 24 Apr 2023 13:49:49 +1200 Message-ID: <20230424134946.v10.6.Id1d2749652f1e5f4cb07d1ee6f2f71983086b308@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 At present when debugging is off, bootdev_find_in_blk() sometimes fails to find a valid bootflow, e.g. with virtio. Accessing the 'blk' variable later in the function seems to correct it. Move the 'ret' check before the debug statement and set the block device again aftewards, to work around this. Signed-off-by: Simon Glass --- (no changes since v8) Changes in v8: - Add new patch to adjust code ordering to work around compiler quirk boot/bootdev-uclass.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 91087981d213..57d294464764 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -174,6 +174,8 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk, } else { ret = fs_set_blk_dev_with_part(desc, bflow->part); bflow->state = BOOTFLOWST_PART; + if (ret) + return log_msg_ret("fs", ret); /* Use an #ifdef due to info.sys_ind */ #ifdef CONFIG_DOS_PARTITION @@ -181,8 +183,7 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk, blk->name, bflow->part, info.sys_ind, ret ? -1 : fs_get_type()); #endif - if (ret) - return log_msg_ret("fs", ret); + bflow->blk = blk; bflow->state = BOOTFLOWST_FS; } From patchwork Mon Apr 24 01:49:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772519 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=LJc35xyQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4Sm95hbMz23hs for ; Mon, 24 Apr 2023 11:51:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 61CFE8615B; Mon, 24 Apr 2023 03:50:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="LJc35xyQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F14B485350; Mon, 24 Apr 2023 03:50:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 E72C18611C for ; Mon, 24 Apr 2023 03:50:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-32b1c8ff598so34693315ab.3 for ; Sun, 23 Apr 2023 18:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682301004; x=1684893004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fe1bnlsfjCq5mKl1j4WWDucX0w7QflaE1M/esKHb7k4=; b=LJc35xyQKPEV9/H6lA60pqZevndweHGV2sDDl6bY9/+fcQNeieCbMMt3Tgo9+mbqEK Lbp4zmHM8t+ZtMJ10AvO4UHklDypJWIOBoKUVux/+aPrh5dAfwfGdlzWoCWKF/OU3rbt NIFk+4SOdx55EqQD3Yk2zw1qnCVWSvnXB11aw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682301004; x=1684893004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fe1bnlsfjCq5mKl1j4WWDucX0w7QflaE1M/esKHb7k4=; b=St7OCT3SOyHsFChHeVIlGeo79BNrsfrpwSI5rn3P5eWAlDrc+gzGVuFuu7T/5mKtjy Oeh3cot9B2rxK9H20Wd6f/Kdi7+L5F3sbbb2pExh8xdt8G89aWiZ1SU37O2MOUY5beuX KMSsm1tMHUQcsBq0ji9Z9HiHC4vchKLV9EPnkIGa5bfGn6+i0+5IHQ9Q8wovtoDau5cL qt+QeX2IgP1AL3Zz3J+UqSJQqSOBt5/1WalS2JabI+rTfCa9Hlj7rHExhMIAK+j/v2sN IJwPWEtAsou2B27eMkzvRcPJEFeKM4eRKSi79nFTQFhzlzwiX6lllECNdGg9nNAKGwEQ LkqQ== X-Gm-Message-State: AAQBX9cAVmgGfT7zaTh8FB6TdU+xtugIi3ARi9pVb2wU17inYOioYd1k Fzn8rFd+kG33EvJzytFWhTGe9IBf3ocCxWxpxLY= X-Google-Smtp-Source: AKy350ZOFSsFYxohpLcNKPOZhSTQhwhw1l0k+jMfYAZADu5LJVhO+OFpkXDbaMgbltN9b6zdl8906Q== X-Received: by 2002:a92:cc12:0:b0:32d:6163:596 with SMTP id s18-20020a92cc12000000b0032d61630596mr4659012ilp.20.1682301004105; Sun, 23 Apr 2023 18:50:04 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:50:03 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Mathew McBride Subject: [PATCH v10 7/9] bootstd: Use blk uclass device numbers to set efi bootdev Date: Mon, 24 Apr 2023 13:49:50 +1200 Message-ID: <20230424134946.v10.7.Ia5f5e39c882ac22b5f71c4d576941b34e868eeba@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 From: Mathew McBride When loading a file from a block device, efiload_read_file was using the seq_num of the device (e.g "35" of virtio_blk#35) instead of the block device id (e.g what you get from running the corresponding device scan command, like "virtio 0") This cause EFI booting from these devices to fail as an invalid device number is passed to blk_get_device_part_str: Scanning bootdev 'virtio-blk#35.bootdev': distro_efi_read_bootflow_file start (efi,fname=) distro_efi_read_bootflow_file start (efi,fname=) setting bootdev virtio, 35, efi/boot/bootaa64.efi, 00000000beef9a40, 170800 efi_dp_from_name calling blk_get_device_part_str dev=virtio devnr=35 path=efi/boot/bootaa64.efi blk_get_device_part_str (virtio,35) blk_get_device_by_str (virtio, 35) ** Bad device specification virtio 35 ** Using default device tree: dtb/qemu-arm.dtb No device tree available 0 efi ready virtio 1 virtio-blk#35.bootdev.par efi/boot/bootaa64.efi ** Booting bootflow 'virtio-blk#35.bootdev.part_1' with efi blk_get_device_part_str (virtio,0:1) blk_get_device_by_str (virtio, 0) No UEFI binary known at beef9a40 (image buf=00000000beef9a40,addr=0000000000000000) Boot failed (err=-22) Signed-off-by: Mathew McBride Signed-off-by: Simon Glass --- (no changes since v8) Changes in v8: - Add new patch to use blk uclass device numbers to set efi bootdev boot/bootmeth_efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index d8bc7fafd127..6f70f2229b9b 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -112,7 +112,8 @@ static void set_efi_bootdev(struct blk_desc *desc, struct bootflow *bflow) * this can go away. */ media_dev = dev_get_parent(bflow->dev); - snprintf(devnum_str, sizeof(devnum_str), "%x:%x", dev_seq(media_dev), + snprintf(devnum_str, sizeof(devnum_str), "%x:%x", + desc ? desc->devnum : dev_seq(media_dev), bflow->part); strlcpy(dirname, bflow->fname, sizeof(dirname)); From patchwork Mon Apr 24 01:49:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772521 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=l3Yfz5GJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4Smg5QTRz23hs for ; Mon, 24 Apr 2023 11:52:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2E5F48614E; Mon, 24 Apr 2023 03:50:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="l3Yfz5GJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F32E285350; Mon, 24 Apr 2023 03:50:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 B7AA686102 for ; Mon, 24 Apr 2023 03:50:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-32ad0eb84ffso10542745ab.3 for ; Sun, 23 Apr 2023 18:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682301005; x=1684893005; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z0CWdUBXuelCJJWBZb4sImznLCMYdCCZVk7mVmwr318=; b=l3Yfz5GJAfKEwovRglbLSPPT4+NuDDf9JvI/XRkgQ7Pbn2I8EZbG9Sz8PQhzII7gVF Q8kKRyr5IqXrKDs8OWSuptUkSlTPDaa9puy4bSf8MHx11c5IQuS83ixvkfxfPazX7bKq 1DUb60cw2ulbfed4Vw9JqmkEEcXEGa24IewH8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682301005; x=1684893005; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z0CWdUBXuelCJJWBZb4sImznLCMYdCCZVk7mVmwr318=; b=XipvO2OMQYmfiWwOJTxwULpz12kbPACKvJq1eEY0aswi92KRji3tKOkkPqa5uMvs7C S5LqUHdYiul+wfCDw0ZF3Dsw99AaX1AdxZJWIC/7FFqZrz+0FeHIljABZSKnste9y3Tn JyIONk2eEuvhVUgS5zRtO+n5JZTuW11TKavO8uEj5cocoSwWrf8uwG3SjCiEl+CZmqDq Ut2L04mfsW+Ts006Eh18INbUFDpnSbsITNpX1UwtFgcX9xtHYjly8QozfchXvpuDUwSt SAlEu57uTVUktGXFbBIgibc0MsRfKANTpVcqBQqG1xyP2Xfyg7KefWKlB+QH9lcI35Yr YwYA== X-Gm-Message-State: AAQBX9dS1OaY7CQdnI8KP/rMey+4kQkJ0z76rAcwso9DUKcKG/Xs7ERr VBtetOxyXBLSpBbmyth/jAkwgay2FEGvwaOC7cU= X-Google-Smtp-Source: AKy350bDILyic9s1LuIN0EPHJ8xVuwOWgtv69E3FTvdNqp21ukt0/Z1SeWvYJNS35BZAV+w/hlGOeA== X-Received: by 2002:a92:d8c1:0:b0:328:f4e8:8cfa with SMTP id l1-20020a92d8c1000000b00328f4e88cfamr3982796ilo.32.1682301005189; Sun, 23 Apr 2023 18:50:05 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:50:04 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Jonas Karlman Subject: [PATCH v10 8/9] rockchip: Move to standard boot Date: Mon, 24 Apr 2023 13:49:51 +1200 Message-ID: <20230424134946.v10.8.I4cf7708a1ba953b9abd81375d93af34665c7b251@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 Drop the distro-boot scripts and use standard boot instead. Signed-off-by: Simon Glass Tested-by: Jonas Karlman --- Changes in v10: - Drop DISTRO_DEFAULTS and add BOOTSTD_DEFAULTS for all rockchip boards as suggested by Jonas Karlman Changes in v4: - Add back BOOT_TARGETS Changes in v3: - Update rk3588 boards too Changes in v2: - Add new patch to move rockchip to standard boot arch/arm/Kconfig | 3 +- include/configs/px30_common.h | 3 +- include/configs/rk3036_common.h | 4 +-- include/configs/rk3066_common.h | 4 +-- include/configs/rk3128_common.h | 3 +- include/configs/rk3188_common.h | 4 +-- include/configs/rk322x_common.h | 4 +-- include/configs/rk3288_common.h | 4 +-- include/configs/rk3308_common.h | 3 +- include/configs/rk3328_common.h | 3 +- include/configs/rk3368_common.h | 6 ++-- include/configs/rk3568_common.h | 5 ++- include/configs/rk3588_common.h | 5 ++- include/configs/rockchip-common.h | 58 ------------------------------- include/configs/rv1108_common.h | 2 +- 15 files changed, 17 insertions(+), 94 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f0118e225419..a1df18cd2b21 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1956,8 +1956,7 @@ config ARCH_ROCKCHIP imply ADC imply CMD_DM imply DEBUG_UART_BOARD_INIT - imply DISTRO_DEFAULTS if !ROCKCHIP_RK3399 - imply BOOTSTD_DEFAULTS if !DISTRO_DEFAULTS + imply BOOTSTD_DEFAULTS imply FAT_WRITE imply SARADC_ROCKCHIP imply SPL_SYSRESET diff --git a/include/configs/px30_common.h b/include/configs/px30_common.h index 8df481b09788..6fbd2679f099 100644 --- a/include/configs/px30_common.h +++ b/include/configs/px30_common.h @@ -24,12 +24,11 @@ "kernel_addr_c=0x03e80000\0" \ "ramdisk_addr_r=0x0a200000\0" -#include #define CFG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h index ea6073f29446..c2abd14e114b 100644 --- a/include/configs/rk3036_common.h +++ b/include/configs/rk3036_common.h @@ -21,8 +21,6 @@ "kernel_addr_r=0x62000000\0" \ "ramdisk_addr_r=0x64000000\0" -#include - /* Linux fails to load the fdt if it's loaded above 512M on a evb-rk3036 board, * so limit the fdt reallocation to that */ #define CFG_EXTRA_ENV_SETTINGS \ @@ -30,6 +28,6 @@ "fdt_high=0x7fffffff\0" \ "partitions=" PARTS_DEFAULT \ ENV_MEM_LAYOUT_SETTINGS \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3066_common.h b/include/configs/rk3066_common.h index 1a6d3678df3e..d70c8f77d487 100644 --- a/include/configs/rk3066_common.h +++ b/include/configs/rk3066_common.h @@ -22,14 +22,12 @@ "kernel_addr_r=0x62000000\0" \ "ramdisk_addr_r=0x64000000\0" -#include - #define CFG_EXTRA_ENV_SETTINGS \ "fdt_high=0x6fffffff\0" \ "initrd_high=0x6fffffff\0" \ "partitions=" PARTS_DEFAULT \ ENV_MEM_LAYOUT_SETTINGS \ ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h index 8736b14d1015..d8269b0ec96f 100644 --- a/include/configs/rk3128_common.h +++ b/include/configs/rk3128_common.h @@ -22,11 +22,10 @@ "kernel_addr_r=0x62000000\0" \ "ramdisk_addr_r=0x64000000\0" -#include #define CFG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h index fcb274565e9e..a8cee1e44d4d 100644 --- a/include/configs/rk3188_common.h +++ b/include/configs/rk3188_common.h @@ -21,8 +21,6 @@ "kernel_addr_r=0x62000000\0" \ "ramdisk_addr_r=0x64000000\0" -#include - /* Linux fails to load the fdt if it's loaded above 256M on a Rock board, * so limit the fdt reallocation to that */ #define CFG_EXTRA_ENV_SETTINGS \ @@ -32,6 +30,6 @@ "partitions=" PARTS_DEFAULT \ ENV_MEM_LAYOUT_SETTINGS \ ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h index 39a40f4e2d10..15f77df3e17e 100644 --- a/include/configs/rk322x_common.h +++ b/include/configs/rk322x_common.h @@ -22,8 +22,6 @@ "kernel_addr_r=0x62000000\0" \ "ramdisk_addr_r=0x64000000\0" -#include - /* Linux fails to load the fdt if it's loaded above 512M on a evb-rk3036 board, * so limit the fdt reallocation to that */ #define CFG_EXTRA_ENV_SETTINGS \ @@ -31,6 +29,6 @@ "fdt_high=0x7fffffff\0" \ "partitions=" PARTS_DEFAULT \ ENV_MEM_LAYOUT_SETTINGS \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h index 71d2426d72a4..3063076a97af 100644 --- a/include/configs/rk3288_common.h +++ b/include/configs/rk3288_common.h @@ -23,8 +23,6 @@ "kernel_addr_r=0x02000000\0" \ "ramdisk_addr_r=0x04000000\0" -#include - /* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so * limit the fdt reallocation to that */ #define CFG_EXTRA_ENV_SETTINGS \ @@ -34,6 +32,6 @@ "partitions=" PARTS_DEFAULT \ ENV_MEM_LAYOUT_SETTINGS \ ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3308_common.h b/include/configs/rk3308_common.h index ba9ee112e2df..7d55fcd975c6 100644 --- a/include/configs/rk3308_common.h +++ b/include/configs/rk3308_common.h @@ -20,11 +20,10 @@ "kernel_addr_r=0x00680000\0" \ "ramdisk_addr_r=0x04000000\0" -#include #define CFG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "partitions=" PARTS_DEFAULT \ ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h index e565ccff8979..e920ec7e5ddb 100644 --- a/include/configs/rk3328_common.h +++ b/include/configs/rk3328_common.h @@ -22,11 +22,10 @@ "kernel_comp_addr_r=0x08000000\0" \ "kernel_comp_size=0x2000000\0" -#include #define CFG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3368_common.h b/include/configs/rk3368_common.h index 9aa256b59592..ccb5369b9018 100644 --- a/include/configs/rk3368_common.h +++ b/include/configs/rk3368_common.h @@ -23,11 +23,9 @@ "kernel_addr_r=0x280000\0" \ "ramdisk_addr_r=0x5bf0000\0" -#include - #define CFG_EXTRA_ENV_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ - ENV_MEM_LAYOUT_SETTINGS \ - BOOTENV + ENV_MEM_LAYOUT_SETTINGS \ + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3568_common.h b/include/configs/rk3568_common.h index d6b5e7d89022..1b7d3437b1ae 100644 --- a/include/configs/rk3568_common.h +++ b/include/configs/rk3568_common.h @@ -27,12 +27,11 @@ "kernel_comp_addr_r=0x08000000\0" \ "kernel_comp_size=0x2000000\0" -#include #define CFG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ - ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + ROCKCHIP_DEVICE_SETTINGS \ + "boot_targets=" BOOT_TARGETS "\0" #endif diff --git a/include/configs/rk3588_common.h b/include/configs/rk3588_common.h index b9f42717b751..46389d087d29 100644 --- a/include/configs/rk3588_common.h +++ b/include/configs/rk3588_common.h @@ -26,12 +26,11 @@ "kernel_comp_addr_r=0x08000000\0" \ "kernel_comp_size=0x2000000\0" -#include #define CFG_EXTRA_ENV_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ ENV_MEM_LAYOUT_SETTINGS \ - ROCKCHIP_DEVICE_SETTINGS \ - BOOTENV + ROCKCHIP_DEVICE_SETTINGS \ + "boot_targets=" BOOT_TARGETS "\0" #endif /* __CONFIG_RK3588_COMMON_H */ diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index 18544d75acc6..e9f4072b7e78 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -13,67 +13,9 @@ #ifndef CONFIG_SPL_BUILD -/* First try to boot from SD (index 1), then eMMC (index 0) */ -#if IS_ENABLED(CONFIG_CMD_MMC) - #define BOOT_TARGET_MMC(func) \ - func(MMC, mmc, 1) \ - func(MMC, mmc, 0) -#else - #define BOOT_TARGET_MMC(func) -#endif - -#if IS_ENABLED(CONFIG_CMD_NVME) - #define BOOT_TARGET_NVME(func) func(NVME, nvme, 0) -#else - #define BOOT_TARGET_NVME(func) -#endif - -#if IS_ENABLED(CONFIG_CMD_SCSI) - #define BOOT_TARGET_SCSI(func) func(SCSI, scsi, 0) -#else - #define BOOT_TARGET_SCSI(func) -#endif - -#if IS_ENABLED(CONFIG_CMD_USB) - #define BOOT_TARGET_USB(func) func(USB, usb, 0) -#else - #define BOOT_TARGET_USB(func) -#endif - -#if CONFIG_IS_ENABLED(CMD_PXE) - #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) -#else - #define BOOT_TARGET_PXE(func) -#endif - -#if CONFIG_IS_ENABLED(CMD_DHCP) - #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) -#else - #define BOOT_TARGET_DHCP(func) -#endif - -#if IS_ENABLED(CONFIG_CMD_SF) - #define BOOT_TARGET_SF(func) func(SF, sf, 0) -#else - #define BOOT_TARGET_SF(func) -#endif - #ifdef CONFIG_ROCKCHIP_RK3399 -#define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_MMC(func) \ - BOOT_TARGET_NVME(func) \ - BOOT_TARGET_SCSI(func) \ - BOOT_TARGET_USB(func) \ - BOOT_TARGET_PXE(func) \ - BOOT_TARGET_DHCP(func) \ - BOOT_TARGET_SF(func) #define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp spi" #else -#define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_MMC(func) \ - BOOT_TARGET_USB(func) \ - BOOT_TARGET_PXE(func) \ - BOOT_TARGET_DHCP(func) #define BOOT_TARGETS "mmc1 mmc0 usb pxe dhcp" #endif diff --git a/include/configs/rv1108_common.h b/include/configs/rv1108_common.h index 050d37bff0b5..3bf70a0e0ae2 100644 --- a/include/configs/rv1108_common.h +++ b/include/configs/rv1108_common.h @@ -28,6 +28,6 @@ ENV_MEM_LAYOUT_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ - BOOTENV + "boot_targets=" BOOT_TARGETS "\0" #endif From patchwork Mon Apr 24 01:49:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1772520 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=O1Z/BjEQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4SmR4lT3z23hs for ; Mon, 24 Apr 2023 11:51:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3629D8613B; Mon, 24 Apr 2023 03:50:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="O1Z/BjEQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B60385350; Mon, 24 Apr 2023 03:50:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) (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 DA0728610D for ; Mon, 24 Apr 2023 03:50:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-329627dabfbso39881375ab.0 for ; Sun, 23 Apr 2023 18:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1682301006; x=1684893006; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PV0RmMjqTc78LYvdCSRrTajNAJL3URuHZhVUdEwVLd0=; b=O1Z/BjEQjp1d3e59O8vMntsu8bwFqNNcoY5Z4fCZZ+BpPqo++rSOgYEX4g2ING4QIc dn2NzptTDuIyk5agMjRZEDecFr0APh1reUf4S5d40G7e7m9Fi40IX1mnPHO5OIZgo1nc Iet5ij1ypTX6ofPjXzFcUk0CJV6QKDd/Glctk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682301006; x=1684893006; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PV0RmMjqTc78LYvdCSRrTajNAJL3URuHZhVUdEwVLd0=; b=i3+piDKnB+ndIkBXzA6SO+pspQJSq+P8N/X2ZkG0IyfKXTl4QZdlx/YKwe0TvJWFcY vUgO+mdfBMKFUlU489rmQ90asRTl990Z8Yfa2lTPeDlPNsNypW5HQcFCKzFc/LATFXO6 nZrKsYwWhzDj0Be/QwjAWx37vj3Ztm/NIC6MpO7XB1zaVsf4J4xh8wDE+ztHRsL4H2um NpGJW3PHi9byK59nCrN8Bb+EBkmPWq6y4kvwDZgs/UFhog+4DWM+VnvHvNOLKy6S+uCP 7aU8YzYar06QT7ozLxukRrsbAosns+SZSgFBRHbqenpoLRoHkbuUJz6yJEUJNVxRhojs viRA== X-Gm-Message-State: AAQBX9fp1ER95LBgqGzc8I2gAkJ6+ww1o/Itag6FCLoQVBBgoU+FVr+F SIBu6DPdIZb9gBWoOhT6GUvwgGu+MqNkuY5omhE= X-Google-Smtp-Source: AKy350Y5YtMwXdsk44SpdLeUC5iq2gpxS+l/EMFToKWXefcHshUO52oXgtI9RgHVmeWfXPVWc/y3wA== X-Received: by 2002:a05:6602:2dd4:b0:760:f293:12d8 with SMTP id l20-20020a0566022dd400b00760f29312d8mr5590502iow.7.1682301006264; Sun, 23 Apr 2023 18:50:06 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id i10-20020a02600a000000b0040bbfad3e28sm2952311jac.96.2023.04.23.18.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:50:05 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Mark Kettenis , Vagrant Cascadian , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich Subject: [PATCH v10 9/9] rockchip: Use the same boot_targets for all boards Date: Mon, 24 Apr 2023 13:49:52 +1200 Message-ID: <20230424134946.v10.9.I3dd639e8c7824c9b0301884a1180cf3b9107766e@changeid> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog In-Reply-To: <20230424014952.552473-1-sjg@chromium.org> References: <20230424014952.552473-1-sjg@chromium.org> MIME-Version: 1.0 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 It doesn't really matter if we mention things which are not present. For example, if 'nvme' is included but the board does not support it, it just continues with the next item in the list. It is simpler to use the same target list for all boards, so drop the different one for rk3399. Signed-off-by: Simon Glass --- Changes in v10: - Adjust patch to always use standard boot Changes in v9: - Drop patches which enable BOOTSTD_DEFAULT Changes in v8: - Add cover letter Changes in v7: - Don't resync after defconfig changes Changes in v6: - Redo patch for the new approach Changes in v5: - Drop patch to relax the argument requirements for bootflow scan Changes in v4: - Rebase to -next - Add new patch to use the same boot_targets for all boards include/configs/rockchip-common.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index e9f4072b7e78..9121bba37384 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -13,11 +13,7 @@ #ifndef CONFIG_SPL_BUILD -#ifdef CONFIG_ROCKCHIP_RK3399 #define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp spi" -#else -#define BOOT_TARGETS "mmc1 mmc0 usb pxe dhcp" -#endif #ifdef CONFIG_ARM64 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"