Message ID | 20220925150248.2524421-37-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) 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=D7tuPCQk; 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 4Mb8R70DvCz1yq1 for <incoming@patchwork.ozlabs.org>; Mon, 26 Sep 2022 01:08:35 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1FD8484D8A; Sun, 25 Sep 2022 17:04:42 +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="D7tuPCQk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BBE3E848C2; Sun, 25 Sep 2022 17:03:52 +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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) (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 6269A84C44 for <u-boot@lists.denx.de>; Sun, 25 Sep 2022 17:03:49 +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-xd2a.google.com with SMTP id z191so3403735iof.10 for <u-boot@lists.denx.de>; Sun, 25 Sep 2022 08:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=VCpccSmEEhPs6cw9AJCtLZ2zLGOAVEDgKfODG+HFyuQ=; b=D7tuPCQkzpCU8Wr+6WzV5NRFucyoMZJSym2eKtTvsvdRYntcLlsRwM+loXU/CfaTuk OGoBMheKFbWoQduEU5wVzDZP07XYQBDD8PlakjNbjCoQKh0b/DtdpKAx0vBzznOwNEWW LwENfouyKRYxmBf6KyJTF4js6FPYBwRiHZ76M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=VCpccSmEEhPs6cw9AJCtLZ2zLGOAVEDgKfODG+HFyuQ=; b=Rw+T1XO6KCy9zZ8NIr4M9t5ALfZm/fiuV+DlFME2jrVTeetUkyytZ9ohB7UFEGBZb8 bVm9PkCJ96jOcedVyHVrqVMJx9AqxadD4XXyB5nwn3/d/TZ6o4GoakDXsAQZkH4nrXqy NryP/u6n6ixVG/KKmXAw30O9QvOcgEaB00Dg574qx48nWd5vvpy4E25FgKHJJwpPEa/Q NfKp8gO797cVcrFdk+pLF33GiDY5RP+SB/tq/NYgDKQHGV7w36ODdt7oridIxKGab346 VV7j+M8wWGQLgxPLDtR1uM+9YTamDk9cdq2DYPgMsPHJWnekJo0VC7OzrLCtR3bGFvNg Nzng== X-Gm-Message-State: ACrzQf3kxqb3tH0AG+4iUadolP8w7+Sb+U85Uug+/C0GyPKhAU0m0rDT 9CF2WQW19x6MppLtR2IZxxSWszqEi9SlPA== X-Google-Smtp-Source: AMsMyM5iSp1VF13C55QtS44K2wVpWqz33Z2F59qQagCPc89G9K8nZW14xBbnBSV9z/yhjP8g1Lck0A== X-Received: by 2002:a05:6638:40a3:b0:35a:3f2d:a21c with SMTP id m35-20020a05663840a300b0035a3f2da21cmr9599614jam.221.1664118228636; Sun, 25 Sep 2022 08:03:48 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id u19-20020a926013000000b002f19d9838c6sm5360578ilb.25.2022.09.25.08.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 08:03:48 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH 36/45] vbe: Drop the U-Boot prefix from the version Date: Sun, 25 Sep 2022 09:02:39 -0600 Message-Id: <20220925150248.2524421-37-sjg@chromium.org> X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog In-Reply-To: <20220925150248.2524421-1-sjg@chromium.org> References: <20220925150248.2524421-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
vbe: Implement the full firmware flow
|
expand
|
diff --git a/boot/vbe_simple_os.c b/boot/vbe_simple_os.c index 7761b9ef656..058db6154b0 100644 --- a/boot/vbe_simple_os.c +++ b/boot/vbe_simple_os.c @@ -18,7 +18,7 @@ int vbe_simple_fixup_node(ofnode node, struct simple_state *state) { - char *version; + const char *version, *str; int ret; version = strdup(state->fw_version); @@ -31,7 +31,12 @@ int vbe_simple_fixup_node(ofnode node, struct simple_state *state) ret = ofnode_write_u32(node, "cur-vernum", state->fw_vernum); if (ret) return log_msg_ret("num", ret); - ret = ofnode_write_string(node, "bootloader-version", version_string); + + /* Drop the 'U-Boot ' at the start */ + str = version_string; + if (!strncmp("U-Boot ", str, 7)) + str += 7; + ret = ofnode_write_string(node, "bootloader-version", str); if (ret) return log_msg_ret("bl", ret); diff --git a/test/boot/vbe_simple.c b/test/boot/vbe_simple.c index faba9e8f90b..a50785dbbf6 100644 --- a/test/boot/vbe_simple.c +++ b/test/boot/vbe_simple.c @@ -77,7 +77,7 @@ static int vbe_simple_test_base(struct unit_test_state *uts) bl_version = ofnode_read_string(node, "bootloader-version"); ut_assertnonnull(bl_version); - ut_asserteq_str(version_string, bl_version); + ut_asserteq_str(version_string + 7, bl_version); return 0; }
We don't need the U-Boot prefix on the version and in fact it is harmful since pytest gets confused seeing the U-Boot banner bring displayed when the version is printed. Drop the prefix from the string. We could produce an entirely new string from the component parts, but this adds to the rodata size and would break the use of version_string as the only thing which holds this information. Signed-off-by: Simon Glass <sjg@chromium.org> --- boot/vbe_simple_os.c | 9 +++++++-- test/boot/vbe_simple.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-)