From patchwork Tue Oct 14 11:12:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 596 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org Authentication-Results: mail.u-boot.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Drce94oq; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C01876813C for ; Tue, 14 Oct 2025 05:13:57 -0600 (MDT) 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 pS9ffYZhZDfO for ; Tue, 14 Oct 2025 05:13:57 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DC7136814F for ; Tue, 14 Oct 2025 05:13:55 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7667668151 for ; Tue, 14 Oct 2025 05:13:52 -0600 (MDT) 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 s2D-CWkT01-L for ; Tue, 14 Oct 2025 05:13:52 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.175; helo=mail-il1-f175.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) by mail.u-boot.org (Postfix) with ESMTPS id CDF876813B for ; Tue, 14 Oct 2025 05:13:48 -0600 (MDT) Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-42f9f5a9992so33877665ab.2 for ; Tue, 14 Oct 2025 04:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440428; x=1761045228; darn=u-boot.org; 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=l2CIHeXOfNr7FGmo/dX1mJsxtwENoOYGgO/2pAlU3ak=; b=Drce94oqjub1YLf+qJ0/dBxvlrDMWk6PK0He6hBwMFomTyEiwF7OZlbUQKtOKmjW8X KAEDm0/hzfTLqehuuK4Wv+X2JhdObvd5StHeEAF40LsAvjJpPCnyrxLMrjzeAsyA/HfY C6G1BYHapab/sumvFdSAT+8rrTrRzlLNyeN90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440428; x=1761045228; 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=l2CIHeXOfNr7FGmo/dX1mJsxtwENoOYGgO/2pAlU3ak=; b=cyA5iZHqDopmNzzY4+yPzTxc2Po6uUlfBg2iMl0NRf7eALbGxZaMjhFBj8c9zmCHN2 dloCiglzwKiQ9wgsc4vq//7flkVCFeissZr5Ava1BkEtZmcEY+0jpHDY5+dY4NFrDICG ehm/elXbcts+j0WmzwxQHL0dkAUninsZkKKXcrhlwSgmP6+RN87S2Dvtu0QckTRxXDDk 8jbvvBihXs0mk0p74+9Ar2FdbmzBYjAosW6QLpGnHLIXnKdci1USGZhudiCF112USqlR 3cH7Tws/ebreyMpxpMWNj4ijrQOAZsY9GtiRtPrSXcXOIyqDTn5rhBAZFd64DpbkTra8 nhnw== X-Gm-Message-State: AOJu0YyuoBwJSYUX2nB3ad3No29Aldwa3bevS2Rq+9Shpg8k7FKP5tNi Ijha0W9sPKlFvyrXeTcoE6QplfIvSuSCboUxmGv1HBVILctsMBy1pCAyG/WlbaF0gfcp7c7AAiM yKhowdBC+wA8= X-Gm-Gg: ASbGncv0RUum0Bm4Vd4viK3seARirzHDw/m9M5D6hBhln1Mt1i8slWsFrSKkvnXczCj e41xISLVl/X+TDXTW678SD7wEKrhp4UmL5UrYC5ExOi4+XKu415DTFLEaWpZGfIQYMu+LI8UgSd mxW/dWZOW1te5En4lJfGYLWyNdNayr9hHDZQo5fCmb2R18Twn4lj9yxecdmRqpDt3FEpDT5+ntN r679bZg3IUdJl8UO9LK/ZP3j/KO9dqaBofSAIDByZufkCwpHhzw70hvatnbbWDCS3dTM6pxypMj LuDokz1+SAWVrMoILAx69ODBysF4DeJCYnSUOqg6X+97OSipzMOgB1k6n2nrH2AiGnqMGIHCRWn 93Rg8TvNN9wPdn4YvbdjAPz/LBndU5DEjX/NVWFffitzgPQ== X-Google-Smtp-Source: AGHT+IHnZJuevT+B+5qbJdCxJ+jvK0FeuNJZeer83yzKmuY0O252I90Les8dMKWPRJTtUXtZmt0NiQ== X-Received: by 2002:a05:6e02:4412:b0:42f:9187:f6e0 with SMTP id e9e14a558f8ab-42f9187f8edmr228297165ab.13.1760440427687; Tue, 14 Oct 2025 04:13:47 -0700 (PDT) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-430a3869174sm4608785ab.15.2025.10.14.04.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:47 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:49 -0600 Message-ID: <20251014111301.1059317-13-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251014111301.1059317-1-sjg@chromium.org> References: <20251014111301.1059317-1-sjg@chromium.org> MIME-Version: 1.0 Message-ID-Hash: 6KYY2BNFCSHP4TDRFAB5DOJZBOYRHBBT X-Message-ID-Hash: 6KYY2BNFCSHP4TDRFAB5DOJZBOYRHBBT X-MailFrom: sjg@chromium.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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 12/16] boot: Add the distro version and box into the menu List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: These can be used if desired, so add them to the menu. Since they are not part of the simple menu, hide them in that case, via a new function which sets up the properties of items. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 686769e57b5..057ebee01a1 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -32,6 +32,22 @@ struct menu_priv { struct udevice *last_bootdev; }; +static int bootflow_menu_set_item_props(struct scene *scn, + int i, const struct bootflow *bflow) +{ + int ret; + + scene_obj_set_hide(scn, ITEM_PREVIEW + i, true); + ret = scene_obj_set_hide(scn, ITEM_BOX + i, true); + ret |= scene_obj_set_hide(scn, ITEM_VERSION_NAME + i, true); + scene_obj_set_hide(scn, ITEM_VERIFIED + i, true); + ret |= scene_obj_set_hide(scn, ITEM_KEY + i, false); + if (ret) + return log_msg_ret("msp", ret); + + return 0; +} + int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, const char *title) { @@ -216,6 +232,10 @@ int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq, bflow->name, NULL); ret |= scene_txt_str(scn, "key", ITEM_KEY + seq, STR_KEY + seq, key, NULL); + ret |= scene_box(scn, "item-box", ITEM_BOX + seq, 1, false, NULL); + ret |= scene_txt_str(scn, "version", ITEM_VERSION_NAME + seq, + STR_VERSION_NAME + seq, "", NULL); + preview_id = 0; if (bflow->logo) { preview_id = ITEM_PREVIEW + seq; @@ -227,9 +247,13 @@ int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq, ITEM_DESC + seq, preview_id, add_gap ? SCENEMIF_GAP_BEFORE : 0, NULL); - if (ret < 0) return log_msg_ret("itm", -EINVAL); + + ret = bootflow_menu_set_item_props(scn, seq, bflow); + if (ret) + return log_msg_ret("itp", -EINVAL); + priv->num_bootflows++; *scnp = scn;