From patchwork Fri Jan 9 01:53:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1366 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767923641; bh=8/QHgYKmGmNq76LFz5oK4hClt13nWNvaqi3xOog3DVo=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WTW7UsRUhi6AfP+30Us1jH/jIk9eRzVcIWn/cAvlg9tXZU40X92kK7z/12X+tsI7F fxW4pagKa6biqpqc0a6UiPYTsX/XbPEb9OQGsFx6qbjkJpq0tI39LJX6FdAIR83cQl pDYcH7tyzprIptgQb1JvXk98qwGavAJl6kTbugKaTfrU/RMunxGFKY0hQLxvmsy92i DYHHumQ0c5UeESIl0BMA1Y1lCOXbqGKHIhCKwEO3JTdsfydBy8FbPJ7muwamiwxd6t 8qwC4PXz6B2MlrGl8af3B+V9iUULDrrsyXEUiIhdAsN0CWkWJZTFIJvgVBJRzhp0Nn +IXpoeQq4Whqg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A8D0469130 for ; Thu, 8 Jan 2026 18:54:01 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 5HtiYtjByWAd for ; Thu, 8 Jan 2026 18:54:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767923641; bh=8/QHgYKmGmNq76LFz5oK4hClt13nWNvaqi3xOog3DVo=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WTW7UsRUhi6AfP+30Us1jH/jIk9eRzVcIWn/cAvlg9tXZU40X92kK7z/12X+tsI7F fxW4pagKa6biqpqc0a6UiPYTsX/XbPEb9OQGsFx6qbjkJpq0tI39LJX6FdAIR83cQl pDYcH7tyzprIptgQb1JvXk98qwGavAJl6kTbugKaTfrU/RMunxGFKY0hQLxvmsy92i DYHHumQ0c5UeESIl0BMA1Y1lCOXbqGKHIhCKwEO3JTdsfydBy8FbPJ7muwamiwxd6t 8qwC4PXz6B2MlrGl8af3B+V9iUULDrrsyXEUiIhdAsN0CWkWJZTFIJvgVBJRzhp0Nn +IXpoeQq4Whqg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 92EAB691E7 for ; Thu, 8 Jan 2026 18:54:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767923639; bh=XoLHm4O/9KQsTZruzIJNvDx9UR85cqE26/s3Er8DCEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tqQY1GoLvKcOr4ckaadqpDC9WjvmMQTejmlzgMCzwMzq2J76bP2CDZWA2o8hqrcLU XBrQ84P/wwYutkb3N0b0SRhsu0tvBdp1+bqi5T5p0IgykjHd8ruFEoFqK8tIgqJEgB /J90SpGMTUJ5JW+h0HdqvSd2CataMhrjHtSVgc7qJrsliZnZFO2KjxO8H1npyHOidb NjyGxzjRbuPRSFYukCotpoLBZ18XEb+6Ltl9S/ZneWzhct81M52Tjv+U2imiA2BiQg hkjfsgHEh0gSd3KxxyPi4dMKxszvyMnsAuRKOvsSvCXgdE9ObywQ7OPZKO27LItfnx BiFXajpku0opg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7952669130; Thu, 8 Jan 2026 18:53:59 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id dkqLoR2Yoj05; Thu, 8 Jan 2026 18:53:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767923635; bh=f6D2ItlNpmK1E7rcx8Zy6YYmLKlQuqEjLn5xD9HVd/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lSAU48POwxxY8kPMVui5Q30+PjFbd5/0E8Ud2EJqnufJppGJBwf4wWsrvCc1g/7q3 RqIt7OUP8a1rHVy7pvpxVO261LIn3xDa+Y7jM8nNK36pWpZFRG8YR4qiNNnaYBxxSG k3zR6l8M9+2gKdtP24MMZT/Gys/nDtV5hG0AOZysOju279WwWkbQBt4ifK+B8Iqhix rON4PROewjkUWnuYJqFOyqXzt/bzV8EF+65B0xr80D4GEiRm+yoja9Fe0RvbcitwGK 9GtYF5AFmZvGd5N14XLYSRy4sNmspzEsTySwXfUK3KEYiuakZo+BdPMcM2zDZsi7rY 4OM86CeOjoyAA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E20CF6912D; Thu, 8 Jan 2026 18:53:54 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 8 Jan 2026 18:53:05 -0700 Message-ID: <20260109015323.3411528-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260109015323.3411528-1-sjg@u-boot.org> References: <20260109015323.3411528-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: LE3IYVYOYELAEYJYIJFITQL57P2LXMDN X-Message-ID-Hash: LE3IYVYOYELAEYJYIJFITQL57P2LXMDN X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/16] boot: pxe: Stop after first boot attempt on sandbox List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Sandbox cannot actually boot a kernel, so there is no point in trying subsequent labels after the first boot attempt fails. Return success after the boot attempt so that sysboot stops, allowing tests to verify that files were loaded correctly. This change only affects sandbox builds. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- boot/pxe_utils.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 981023a3012..ba1f7c41512 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -849,9 +849,15 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) label_run_boot(ctx, label, kern_addr_str, kern_addr, kern_size, initrd_addr, initrd_size, initrd_str, conf_fdt_str, conf_fdt); - /* ignore the error value since we are going to fail anyway */ - return 1; /* returning is always failure */ + /* + * Sandbox cannot boot a real kernel, so stop after the first attempt. + * On real hardware, returning is always failure, so try next label. + */ + if (IS_ENABLED(CONFIG_SANDBOX)) + return 0; + + return 1; } /*