From patchwork Fri Oct 10 03:42:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 581 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=1760067848; bh=ZK+3Y/M6EK8uQnVS3sDXRuuz/xzQ4EB/VieMhpKQT6s=; 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=MhaZIzmdpKPi9QOD92Yr0Ae7t+a4ZGz1wlf4llX6B09gSXI60iAw9XzSD3VzoAeLB 7ozI+4rNRsxN7j6XSsV+RvRNR6IZ2He9E5l/sTMwhlRSyH4feAYZ7kA+r3Mk2rMVMZ HOKvnxKGGiX47g7YnK9rGb+TjOrRquEQqrujZCtzYKe6vvLDmenIGeYRrtbGxAH7jJ eMNhag4TjGyhuRagRaBz49xR0ibk1R4HbVe2HmyzDeKA0vHtxYXFZtcEyq6a+Vmh+B SJRqewLhZC/tP5Ctg5JFvIrY8xgjOTWmPI8kWG5rbcdY8YoCGmMce3Y2/CS7o5MQaB U8SPEvvbDMV3g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4D04668087 for ; Thu, 9 Oct 2025 21:44:08 -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 5NBhzXj8YUcJ for ; Thu, 9 Oct 2025 21:44:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760067848; bh=ZK+3Y/M6EK8uQnVS3sDXRuuz/xzQ4EB/VieMhpKQT6s=; 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=MhaZIzmdpKPi9QOD92Yr0Ae7t+a4ZGz1wlf4llX6B09gSXI60iAw9XzSD3VzoAeLB 7ozI+4rNRsxN7j6XSsV+RvRNR6IZ2He9E5l/sTMwhlRSyH4feAYZ7kA+r3Mk2rMVMZ HOKvnxKGGiX47g7YnK9rGb+TjOrRquEQqrujZCtzYKe6vvLDmenIGeYRrtbGxAH7jJ eMNhag4TjGyhuRagRaBz49xR0ibk1R4HbVe2HmyzDeKA0vHtxYXFZtcEyq6a+Vmh+B SJRqewLhZC/tP5Ctg5JFvIrY8xgjOTWmPI8kWG5rbcdY8YoCGmMce3Y2/CS7o5MQaB U8SPEvvbDMV3g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3317B67FE9 for ; Thu, 9 Oct 2025 21:44:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760067845; bh=qXRoEYxv1pOf67j56tXy+cQdrL+D62GDF6kkBwfRlh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PQzxiNyNua9XdP/4vGq5awz8wMbz9Ve+PMXxzgKAga/0I+3QZ+GppVkIkLwOpiKPx 8afxhsnTo3bRaHZsNX3GI9dmIEYqenIwtJy9Rjbnf/L/5whhpRlVN1pTn95qLNYxM1 D80EsD75mLcXgbi7NQRGFAKO+qZwvXEpElfB2o/KxD7EgOZB/xXC8oFh+iWUpk9JgO 54xkMmXAwyhrMsH1Lj2Y7niMJfKWRPJbKfEoF/HAycRNuKFHQsFQK76IPAlYvduI2z dG4UGcAf7rPtqGAA5lR7+sOrrNHbWHbjOW+Vw2rhVCU4efHxx5lYKfrkhq0Njg0wNo /FaBnHQqBaxgg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EE0A868080; Thu, 9 Oct 2025 21:44:05 -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 10026) with ESMTP id kzXDILGxu4e9; Thu, 9 Oct 2025 21:44:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760067838; bh=naoXEBwBTXXedPdlfEXqOCyrMh352v9EBq3Bj4/LWWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWTbprKAkCALzxR6bxeDYKQVZx2kSpA0fYTLkVZTHC+tOfEviPfZEdAL9luy8Y5al KdTzHtBro2Ywk5O4K6ThaGaBmTgrqi+vzy+GI/RorMpLpnIAWSVG5emNnXvUJDXDSG BOYA1MIHpYmbZeO3t5K5Jl1xhqQYYb7m+fj31n+vEYWph/uJbptwR/eiEk4C3hMrCz AqHR7EmdeVmhnUKSTv9e22HJ+Z0KHKJVoLIWIILozmoKzxDvcZWUBO4go3E5bekWVz Wk+RC+CrFBnjUC5J7qskDRPf480xUMj0kIa327XfWwXYejIsgoBcjk4ru0hQhg0elW xWiVRxspW3oFg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2260867F7F; Thu, 9 Oct 2025 21:43:58 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 9 Oct 2025 21:42:42 -0600 Message-ID: <20251010034255.1099728-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251010034255.1099728-1-sjg@u-boot.org> References: <20251010034255.1099728-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RLXREXB2N5U5HIISVO22NYILLP3PT6AE X-Message-ID-Hash: RLXREXB2N5U5HIISVO22NYILLP3PT6AE 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: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/18] expo: Add a way to select settings 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 In some cases it is useful to provide a settings scene, or perhaps just a button to change the layout. Add support for this. Signed-off-by: Simon Glass --- boot/bootflow_internal.h | 2 ++ boot/bootflow_menu.c | 2 ++ boot/cedit.c | 1 + boot/scene_menu.c | 3 +++ include/bootflow.h | 3 ++- include/expo.h | 2 ++ 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/boot/bootflow_internal.h b/boot/bootflow_internal.h index b488ecc6102..0ae5b330bd4 100644 --- a/boot/bootflow_internal.h +++ b/boot/bootflow_internal.h @@ -13,6 +13,7 @@ * enum boomenu_id_t - expo IDs for elements of the bootflow menu * * @OBJ_OTHER_LOGO: Second logo (separate from the U-Boot logo) + * @OBJ_SETTINGS: Select settings / change layout * * The ranges below are as follows: * @@ -47,6 +48,7 @@ enum boomenu_id_t { OBJ_POINTER, OBJ_AUTOBOOT, OBJ_OTHER_LOGO, + OBJ_SETTINGS, /* strings for menu items */ STR_LABEL = 100, diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index bbc9a189c98..1f24215f392 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -314,6 +314,8 @@ int bootflow_menu_poll(struct expo *exp, int *seqp) case EXPOACT_QUIT: return -EPIPE; case EXPOACT_CLICK: + if (act.select.id == OBJ_SETTINGS) + return -ECOMM; /* layout change request */ default: return -EAGAIN; } diff --git a/boot/cedit.c b/boot/cedit.c index 70a0c22fe68..c82519a0eb3 100644 --- a/boot/cedit.c +++ b/boot/cedit.c @@ -221,6 +221,7 @@ int cedit_do_action(struct expo *exp, struct scene *scn, exp->done = true; break; case EXPOACT_CLICK: + case EXPOACT_SETTINGS: /* not supported by cedit */ break; } diff --git a/boot/scene_menu.c b/boot/scene_menu.c index d54b99979e1..f52d561094b 100644 --- a/boot/scene_menu.c +++ b/boot/scene_menu.c @@ -485,6 +485,9 @@ int scene_menu_send_key(struct scene *scn, struct scene_obj_menu *menu, int key, log_debug("menu quit\n"); } break; + case ' ': + event->type = EXPOACT_SETTINGS; + break; case '0'...'9': key_item = scene_menu_find_key(scn, menu, key); if (key_item) { diff --git a/include/bootflow.h b/include/bootflow.h index 351a6539978..17ecc80c2eb 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -743,7 +743,8 @@ int bootflow_menu_start(struct bootstd_priv *std, bool text_mode, * Return: 0 if a bootflow was chosen, -EAGAIN if nothing is chosen yet, -EPIPE * if the user quit, -EREMCHG if the expo needs refreshing, -ERESTART if * the user tried to move to a new selection but was unable (e.g. already - * at the top and tried to move up) + * at the top and tried to move up), -ECOMM if the user requests settings + * to be opened */ int bootflow_menu_poll(struct expo *exp, int *seqp); diff --git a/include/expo.h b/include/expo.h index 05f61cc9bd9..aa8e41af176 100644 --- a/include/expo.h +++ b/include/expo.h @@ -57,6 +57,7 @@ enum expo_id_t { * the menu closed, @id indicates menu opened) * @EXPOACT_QUIT: request to exit the menu * @EXPOACT_CLICK: click on an object + * @EXPOACT_SETTINGS: select menu settings */ enum expoact_type { EXPOACT_NONE, @@ -70,6 +71,7 @@ enum expoact_type { EXPOACT_REPOINT_OPEN, EXPOACT_QUIT, EXPOACT_CLICK, + EXPOACT_SETTINGS, }; /**