From patchwork Tue Oct 14 11:12:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 585 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=nz8aU5BV; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0DB1068112 for ; Tue, 14 Oct 2025 05:13:31 -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 kaqx-5AEb25j for ; Tue, 14 Oct 2025 05:13:30 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0ECC16811C for ; Tue, 14 Oct 2025 05:13:29 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 04AF966DD8 for ; Tue, 14 Oct 2025 05:13:25 -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 VgZIHwxBtcCd for ; Tue, 14 Oct 2025 05:13:24 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.43; helo=mail-io1-f43.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by mail.u-boot.org (Postfix) with ESMTPS id D345068123 for ; Tue, 14 Oct 2025 05:13:22 -0600 (MDT) Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-912d4135379so209060439f.1 for ; Tue, 14 Oct 2025 04:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440401; x=1761045201; 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=PKjIYkPr4WPfFSvyFsrjFVuLyJ7pHtapT9IL68pW4rE=; b=nz8aU5BV5i6Y6OcbH197P54Aj8z9zTr6fDLEWcdsN4bE+SiXhvE9y6nl4vKc4k8Lta 7lhcBQMJqBB4jIJzZIMqYkm1QE06KXFV2qbmcGersODXPyx5xIwUQUAEjY7dikooie4m fyPx1mX0T9nfBCKWtzk6YCJC65djiEC7Wb450= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440401; x=1761045201; 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=PKjIYkPr4WPfFSvyFsrjFVuLyJ7pHtapT9IL68pW4rE=; b=ZXfZuQyM0b6np6+CesIc8sSwBpaP69Z3v5cWaQKPbI+Mfd2jO7RsQasBKWaOXju8Wo w7CFr1r2YBfVqyaRd5t8e8evMAm8T6TokpNyJYno2vF8bhZbGYo/wzSmrRBFPSbJG8i5 8Rg4gLHeHeX52s8fhnvdkZ7dIRrWpYdhd/hTT4MdtzeO33Tg7UcU1k95+NvTuxmy/xZJ ANNoNXkigbRnH0ScsN0mTPmpXjI7qdvDFTFcEgcMerwHAM8znINmQnVUsH8511AtPwUk DkvTZtewYjyd1JW8/fuIRC7cBGjtw10d5Ng8+wR+j6j+x4NQQLxpgGbmmI9dFGFaffuT leug== X-Gm-Message-State: AOJu0YztPWWl3sKmhckPBOXcAwl+iITlJFbgN4xxPrKMGDylR2QvJ5k9 5kH6g/6oU1bHfV/hgrC8EUaK00a8YIVPue00uB+IfMsZ4TBQ8LSTPaQAzilMrAiV663Hoe3G8JE 39jQFPj5KRqU= X-Gm-Gg: ASbGncsRFKWS0Vz9TWARkFdJNWpUT2rstcan+xt3mh8e+jOVPVwJORHoxkH8dRgF1yA zH9n7vlsnz3gu1aeCj2sFwOJhszMInEfpTvBCEm+/l4NlUmFWcr3OxnW3MUoP931bK29qDutlXi nuOvGUlIbZBVPg1nY9dH/omI/tavlnVGfB2nKts3MjUwbPY8DeEvkNHFruWipmcfoX0EcPcG7jV 6BZXGhqEmYaw5EqdA6Bvrq3iQfZ94zJVELVjb/5mxz41Ts9gk6XUidZogrdhl3LmZ0H2qTXSson BtGj1EivrZK0GQrGxMes1UUIKZrnJ9Ee+ot8dtF8Op5QHHIlIw9UpY5QjlYU2M6kEdiYtO3vcwh WVniVgl2yRoAy/0H8Lz8rqb0MKdAdlIrQerskmMOQuxwSgQ== X-Google-Smtp-Source: AGHT+IERSU4U2tDFsCC8/qP9lLGggmZaebvPdtsfYITD7ngZassyiBbo31eSmK/Bq/Lqoi/Zmo+G3w== X-Received: by 2002:a05:6e02:1a6a:b0:42f:9eb7:759b with SMTP id e9e14a558f8ab-42f9eb775f9mr136619675ab.28.1760440401570; Tue, 14 Oct 2025 04:13:21 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:20 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:38 -0600 Message-ID: <20251014111301.1059317-2-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: JLAOAXSC3IW4DALIZ7TZYCAXOZYTD6FC X-Message-ID-Hash: JLAOAXSC3IW4DALIZ7TZYCAXOZYTD6FC 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 01/16] scripts: build-efi: Use the USB mouse List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The USB mouse seems to have an absolute-pointer driver which can be enabled in OVMF. Switch to this for x86. Signed-off-by: Simon Glass --- scripts/build-efi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-efi b/scripts/build-efi index 21c2b656530..032b9f7b1ab 100755 --- a/scripts/build-efi +++ b/scripts/build-efi @@ -114,7 +114,7 @@ class BuildEfi: extra += ['-display', 'default,show-cursor=on'] else: # x86 extra += ['-device', 'qemu-xhci', '-device', 'usb-kbd', - '-device', 'usb-tablet'] + '-device', 'usb-mouse'] extra += ['-serial', 'mon:stdio'] serial_msg = '' if self.args.kvm: From patchwork Tue Oct 14 11:12:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 586 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=U7HRTDrj; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E5BB768112 for ; Tue, 14 Oct 2025 05:13:33 -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 eWf3yDfIvDdl for ; Tue, 14 Oct 2025 05:13:33 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B2AB86811C for ; Tue, 14 Oct 2025 05:13:33 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 62F696813F for ; Tue, 14 Oct 2025 05:13:31 -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 iDAdklqZrLEb for ; Tue, 14 Oct 2025 05:13:31 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.53; helo=mail-io1-f53.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by mail.u-boot.org (Postfix) with ESMTPS id 90AA166DD8 for ; Tue, 14 Oct 2025 05:13:25 -0600 (MDT) Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-93ba2eb817aso508679039f.2 for ; Tue, 14 Oct 2025 04:13:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440404; x=1761045204; 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=9iPXih7tZGPLN+IwYMbMrgJStOpE/82CTIl7kRjUX70=; b=U7HRTDrjM34LdAf2f/nD3DOOwOe7fL+bN/+/UPF/pZNF3OtHbLFQSw3jT4HVN6duXx 0dHBCvUYBMXuMhDKEvJzi1SSYHVnhBJySPUyAoCUsrbby84kf8BocLM+Jhw2xKYARWAc XNhMRME0N61+vzKYac3VG686gjNM39IGvJLBo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440404; x=1761045204; 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=9iPXih7tZGPLN+IwYMbMrgJStOpE/82CTIl7kRjUX70=; b=mkTWlQyBtMBpS/6ARADkiAZQFXPvzAzkdBQzCVahpbUUxXHkhayl2dsbMsrBlszS+n w2mTN8HiglP0ID0bo1w1I5YDDRNKmUuBn48Q8OC3hjkXJTFxlldcWrDAFsuWovlHJprw VjKpxvs4j4mJfxT2sqC4COWwxG64HHtQ2TTRv/TMVDivGw4lgmoTKgWO2EXkKGOepLp9 cY/gkw9Vd4XRypPnHH6PYYMogSOAy0OLdV9X7rxAy6mkSp2v04MwkoC2H3/tlZMcnoRl wi5cYmGVackmEFKeoMrq/IrGFANv8JIC0RdhNg1GVtkkGQd9w8f+rRyEy8ev5U7S86st ce2w== X-Gm-Message-State: AOJu0YzDj/34WF5n/YrC2jAty0KMk2ukmFssVIz5KxdkOPcTkN85vIjZ eBK8sLEa6I6y9Y8DGXj/NUP5aaG8DzcNuHumTo+n+2JCwlAbDTFbyEt8IZIaPAlyQjC/oo3tGxl WGtf8IQ7m63I= X-Gm-Gg: ASbGnctwZvarJYcsJXGy7S50Ifo2wkKSCaqnPLJ14npR9avTe5/rihGjw8MdHZigz9f GfCfKQASIBnKJZYvSGWtt3jKzP6uRFF8LAzFNDlvX/YNE+ds14vCJfxwjWpGRwh8A9BHWo+JUvH IBcVkS+v3NsBPikMrTkwFETGNZ6YguKybbl6rU/m/ujc/dr7Aww/AvphK4hsU/H2tmAf+/qDfkk trLU3d3X5hb0hSeNZlNyzn8Ti2k7J76wlQj6OM9xq9geKJNfu8L5hF/CB3+xlViUKbv6bVlLQ5s TlNOsYYYsAmA0mhDHgy9bxir9z8avXJHK1jCmoskiZkuTc2d5KZ13wIEm7vqK4YN/vjgqSRzPli gloKnmGxnz4lJfhm4IVBJEIFuW5GnVaAGCF8= X-Google-Smtp-Source: AGHT+IEj0NC9dD2joOstTYh98waCkHrY5sXJy6VGZakVCHq+a6SnPGIZcikwAQh8sIdpIGlk4BevgQ== X-Received: by 2002:a05:6e02:1885:b0:430:a66b:4ec7 with SMTP id e9e14a558f8ab-430a66b50b2mr8640755ab.27.1760440404352; Tue, 14 Oct 2025 04:13:24 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:22 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:39 -0600 Message-ID: <20251014111301.1059317-3-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: VJNSR2URQG7MQAFDDRBTCYPXY2GYYLMW X-Message-ID-Hash: VJNSR2URQG7MQAFDDRBTCYPXY2GYYLMW 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 02/16] video: Report failure to write a frame to a file List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Rather than just printing a message (which is suppressed unless -v is used) fail the test if it is not possible to write to the provided directory. Signed-off-by: Simon Glass --- test/dm/video.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/dm/video.c b/test/dm/video.c index e51ff7789c7..616aee3f84d 100644 --- a/test/dm/video.c +++ b/test/dm/video.c @@ -169,9 +169,10 @@ int video_compress_fb(struct unit_test_state *uts, struct udevice *dev, snprintf(filename, sizeof(filename), "%s/frame%d.bmp", state->video_frames_dir, state->video_frame_count++); ret = video_write_bmp(uts, dev, filename); - if (ret) - printf("Failed to write frame to %s: %d\n", filename, - ret); + if (ret) { + ut_reportf("Failed to write frame to %s: %d", + filename, ret); + } } /* provide a useful delay if -V flag is used or LOG_DEBUG is set */ From patchwork Tue Oct 14 11:12:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 588 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=ENVlAxsT; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5BB0E66DD8 for ; Tue, 14 Oct 2025 05:13:38 -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 roSZPE11U9_2 for ; Tue, 14 Oct 2025 05:13:38 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A18266813B for ; Tue, 14 Oct 2025 05:13:37 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8754C6813C for ; Tue, 14 Oct 2025 05:13:34 -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 eb2FxqOCkZ_q for ; Tue, 14 Oct 2025 05:13:33 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.174; helo=mail-il1-f174.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by mail.u-boot.org (Postfix) with ESMTPS id 90F5067C83 for ; Tue, 14 Oct 2025 05:13:27 -0600 (MDT) Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-42f90b88beaso19578765ab.3 for ; Tue, 14 Oct 2025 04:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440406; x=1761045206; 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=S/tg/3+ZojFwF/y9jx5f9/BRn7aldjATwyiDYBGM+Zg=; b=ENVlAxsT1HNT2R733oOdrDv5yxkKQ1XE0uVz0oCtDb3moy5ggjG0ecvoLBMjBaJJdT H1vMC0eAJA01c+nhCxzWiSCd+WsLq1moWItTBT6Z46EU0Re2txN91ekC/bZu/NZrP/mc 9keBkyrSou7C7nqpaCMEZEYxNFfVaGOf/CUVI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440406; x=1761045206; 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=S/tg/3+ZojFwF/y9jx5f9/BRn7aldjATwyiDYBGM+Zg=; b=kj2skGatGmFYabZmpHFmUPhQlZF6q2OdQ12al7+ukNgARO/ZkQuN2VFIaMB4Mc3pGj oiDLhYklzbdedbxPp+JHa9ZRypkZFUglOi2/ssBYbuJ5c2PGr5rAdrN4ogKXc3iHFt7q a/2DHpDEPa3K5yPUWekQIkbp3O13COPYcG+05JxzD7Ms1rsFdbmIvA7i1ExHspmpyVNk D4nYFEIzGMmXahhz8DEn/E7bMU6ZAxB714bldDwJeT04nJtNaCVTLDnRGXGqgIueoHzQ DhtLwObfMFWufBeSS39STiSKRKs4ZZdWFIVgY4lVYV7drHp+bI20pS7rwwKSNv0/YtBq cvTw== X-Gm-Message-State: AOJu0Yx+/huMt7C1TO+NmS0TT3DtZXqFrl0quoK1dc1xiLzwkgr2VKV7 M/YCzm7rymeC2jndEvffoKX22LkIr8LVoadg8okE47LLmQDWeUOJ8D/Gx+jlWxYubUghOECEI/T 8uXzsQheGcX8= X-Gm-Gg: ASbGncuwHgNCGMwOxOCK/BRG+/zrjjDqeA0BUekbFo/RwLYFkHs+zy11CsFgjuwDsb2 imdLw9m5B8+zO3TaUozjquvqvpbWSlgEaVXiwZkOnQWb0oQ/2WgB55jhHL3wAcmOmgdWMBAqzgt BnU1djkPoGo+YCZzMFo7cvWMAkuTbjmufDPS1/2gURLthB1YNGG2VlNnuu7j2Anh38+suoKTCXL ZcaA7N6UWtxKSpNWyH+3WEKXlh5UeeJbSYlwl59Ee+udpinUkv9JmRXzWgJGuiL8nv9QxLgYVSa Rf7F8y70TWVwOePc/41fCgVZrGOmjqkeNW1tZh0Eg1b7wJlk18LtqH03dCiTR1Khz8zzHKk6ShA NuAfiiNpfn4dfC2T4oIoxHtXrn5yXqTEbKcs= X-Google-Smtp-Source: AGHT+IEjztcHrYErUspi8HToEDYNApt+IvQrlubCLcLjB7ditt69Q2CyR++22BDYS6LPsOOEir4htQ== X-Received: by 2002:a05:6e02:184c:b0:42f:9c5d:81b1 with SMTP id e9e14a558f8ab-42f9c5d821fmr179739165ab.32.1760440406348; Tue, 14 Oct 2025 04:13:26 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:25 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:40 -0600 Message-ID: <20251014111301.1059317-4-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: C6Y6CO7CCO6ELVEIW43Z6EPS2Q5T7XCI X-Message-ID-Hash: C6Y6CO7CCO6ELVEIW43Z6EPS2Q5T7XCI 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 03/16] expo: Check the mouse once the video device is known List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: For expos which are designed to use the mouse, the mouse is normally enabled when the expo is created. Setting the display comes later, so move the display-related mouse to expo_set_display() Also get the current mouse position if available. Signed-off-by: Simon Glass --- boot/expo.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/boot/expo.c b/boot/expo.c index 1fb6d6e9417..432e81d3552 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -151,6 +151,17 @@ int expo_set_display(struct expo *exp, struct udevice *dev) exp->display = dev; exp->cons = cons; + if (IS_ENABLED(CONFIG_MOUSE) && exp->mouse_enabled) { + /* + * Tell the mouse driver about the video device for coordinate + * scaling + */ + ret = mouse_set_video(exp->mouse, exp->display); + if (ret) + return log_msg_ret("msv", ret); + mouse_get_pos(exp->mouse, &exp->mouse_pos); + } + return 0; } @@ -189,11 +200,6 @@ int expo_set_mouse_enable(struct expo *exp, bool enable) if (ret) return log_msg_ret("sme", ret); - /* Tell the mouse driver about the video device for coordinate scaling */ - ret = mouse_set_video(exp->mouse, exp->display); - if (ret) - return log_msg_ret("msv", ret); - /* Get mouse pointer image and dimensions */ exp->mouse_ptr = video_image_getptr(riscos_arrow); if (exp->mouse_ptr) { From patchwork Tue Oct 14 11:12:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 587 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=DOKiqrbQ; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9DFBA68112 for ; Tue, 14 Oct 2025 05:13:37 -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 IVihe7mKKjig for ; Tue, 14 Oct 2025 05:13:37 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2B9446813C for ; Tue, 14 Oct 2025 05:13:36 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9A7986813D for ; Tue, 14 Oct 2025 05:13:31 -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 fju5uyS4qp29 for ; Tue, 14 Oct 2025 05:13:31 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.179; helo=mail-il1-f179.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) by mail.u-boot.org (Postfix) with ESMTPS id 9A4ED6813C for ; Tue, 14 Oct 2025 05:13:29 -0600 (MDT) Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-42d857dcf92so19508445ab.1 for ; Tue, 14 Oct 2025 04:13:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440408; x=1761045208; 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=llFYByEXVSXvkjnhx61gplMVcwMBkxq2MIneFVC5oJc=; b=DOKiqrbQm45+9xVzvR3MlmfayO7bJneItV2HtsAkgZ8CF2+yBguISFXqqXtkXMEi0P HGYA9I9mSGBi1s39Ml42V0SathABPipKiz9ls3bRRKciT+cPZWMx4L4pWVjGLRGxyi7p xoLL+GVKZjcIPOSJpUX6coGVylX6mxzetExQo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440408; x=1761045208; 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=llFYByEXVSXvkjnhx61gplMVcwMBkxq2MIneFVC5oJc=; b=cz/E7dCDWCBqMvyVW3Jo7tpsdxpfTgFi8nVr313aXsS6XCBYU4V6jkTwkMP6zklpgy UKnk3/5ooS8I91x4t6aM0bKcd4ZcbViJU74SI/FCnXd1buzuX1O8KDeMuFHGr7vNWzgc LEkyDeBmHc75FRRmS1ySZ69339ham+y3Hi99j6suFnivCwBVBTQqLZdP9dAavDEYJBPE cymzUIfPhSMeyzag+KzX2t+66mOxzLH9BF+6J/4XPsVUiVKxI7feaO7i2qdjI0CLMd0s DhGiX/PxiL/sMttUeB4mBaC7lSpBvYwMO0uMsBj9dHMluHuTaOoPzZU1dZnL8HjAiDSn SwwA== X-Gm-Message-State: AOJu0Yz74LXWw7XMfVSRGFzBaT9Mqvc/cvUCLUAHe66ZqcRY3U9nW5pc 1sPp+64i7MaoPAxA66Yf2eIXTmTSH19u566wPjLUC7obp0IQGSJcQt61PQNyrgCBg1ZvocLsj8J 6MVJEB9iZ2B4= X-Gm-Gg: ASbGncs8YMtEdV6BJQCwejpFhQYgJdLQGKk+zdxc7axsln52545PTEz3+48BMWCiKQ0 deSiLs+jtVk70gBqonHPNFxRWF6G2GLge9h0voCpKVCSfEl7widPx5K6Sn1tR+l0lmL32pesaW5 KByxRO5siY36aN3i9y0DhPGKkrNf94yFM59V74w04uUm1YQqIjIYzfia0VHH3SonDzHa0ga1OHv pvnDyPUwx7wfo+kWSX8ilcb/LkdTykvD0htOjlcz4S++I/Sqszl59hwq2yfYU5EkpGD3AOFQm8b ftHobdwdgBLgPSnc5XUE4kxd9bHSqn6qJO90PYwVL6vifexznKUHr+u8KFTMSyv+ju6iTVHdhJm kKSaLeHPZevuEZH2v4U+P8OTa6cvpjOzqs06A3jHhDFljy4f3Xs9BPqPS X-Google-Smtp-Source: AGHT+IGBLjTuc0auzGFD6OZUinB90pGZm3cf7MYc75HN4KzT2XzO0ZUHnx41eWErX/6T//zE5vItsQ== X-Received: by 2002:a05:6e02:1fe3:b0:42f:95a1:2e8 with SMTP id e9e14a558f8ab-42f95a104bfmr161881245ab.24.1760440408396; Tue, 14 Oct 2025 04:13:28 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:27 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:41 -0600 Message-ID: <20251014111301.1059317-5-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: 565ANPPOIZH7KEVNL4AUOP5J7S7BR5QO X-Message-ID-Hash: 565ANPPOIZH7KEVNL4AUOP5J7S7BR5QO 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 04/16] expo: Avoid setting SCENEOF_SIZE_VALID with calculated size List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: When the size of an object is calculated from its contents, we should not set the SCENEOF_SIZE_VALID flag. This flag prevents the object from resizing if the font is changed, for example. The flag is intended to mean that the size was explicitly set by the controller, so we should generally not set it in the expo implementation. It is also inefficient to search for the object ID when we already have the object. Update scene_set_default_bbox() to just set the size and request that it be synced. Signed-off-by: Simon Glass --- boot/scene.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/boot/scene.c b/boot/scene.c index dd13b74b4d7..04a5e8a03e2 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -803,10 +803,12 @@ static int scene_set_default_bbox(struct scene *scn) switch (obj->type) { case SCENEOBJT_IMAGE: case SCENEOBJT_TEXT: - if (!(obj->flags & SCENEOF_SIZE_VALID)) { - scene_obj_set_size(scn, obj->id, obj->dims.x, - obj->dims.y); - } + if (obj->flags & SCENEOF_SIZE_VALID) + break; + obj->req_bbox.x1 = obj->req_bbox.x0 + obj->dims.x; + obj->req_bbox.y1 = obj->req_bbox.y0 + obj->dims.y; + obj->flags |= SCENEOF_SYNC_SIZE; + break; default: break; } From patchwork Tue Oct 14 11:12: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: 589 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=jsQ8L8gH; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 627DE68112 for ; Tue, 14 Oct 2025 05:13:41 -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 jmrXFKrn4TUg for ; Tue, 14 Oct 2025 05:13:41 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DDC1F680C5 for ; Tue, 14 Oct 2025 05:13:40 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3FDE468149 for ; Tue, 14 Oct 2025 05:13:37 -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 J9oO0707npSr for ; Tue, 14 Oct 2025 05:13:37 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.170; helo=mail-il1-f170.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by mail.u-boot.org (Postfix) with ESMTPS id AEC9966DD8 for ; Tue, 14 Oct 2025 05:13:31 -0600 (MDT) Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-42f8da689a6so51217285ab.2 for ; Tue, 14 Oct 2025 04:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440410; x=1761045210; 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=JelhD7NLh6+w1bRzVrl6Bm5Rn7Ir0fPOyxJVbS3oKSQ=; b=jsQ8L8gHklU747l/eb278m8ClAcJZm5eKmtwU04yZ6ViGVP2RKBplX5VQWWR3vlWuy FdTsqs6wnUadAvvlSW1KD/DeRnl4U02VbOfhy5uiowz23anyUSe7Tr9pEH4ya5mlaCis 70rtGdxw9b0gR6m8D3ArnICG/nC60dXY8t0/c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440410; x=1761045210; 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=JelhD7NLh6+w1bRzVrl6Bm5Rn7Ir0fPOyxJVbS3oKSQ=; b=VGRMmYPrQmjMCHo3+3jlWsP5XHkMCVevCohXZBJLAbZhxbwX33BR1TzwFeWMFqrzmx Y+hTbgsytvt4I1q1q0U7EPI9ke3Ge1AUNDYjzCJyrXPEmmxqq0+Gzj9BvoVU2SRm69L2 sV3QxafsC3RWGWawTRev8JpjZ4l8hUuZw1z//1ZFHUfMZgQrpuwSFr7y+GnhweAOXy92 +ZYdbTQyOpaYpYKQVvQP3vK/Zxdo7D0qsW4iB/BMFY7VdgmDzJVRkeN+XdAfmlsRrjwA 99iw2lvqH+fnvIr9XW0K743qz0FWumqT+sbiZfN2AAspNxD+Fl9RpL2IxHXqjP53/RL9 XiKw== X-Gm-Message-State: AOJu0Yyg8lEpVuWjwMWleKrbHbnQz1+63hd808evRb2XAVgZjbCN8u7u VNlxObW4yD2l6Y57/QaVYmgrxp2+Srcc9x9w3AanvQumRbTlxPIn++nJ+EJQbzPyedqrVqcrQsW wuRaXIYw47VQ= X-Gm-Gg: ASbGnct437zXdk3D2r/2r89KRRXzz9xavpYB0LMjYAA/e0sQLemcGfm+Tov3gflViQB tl6Ekt6AF7b9/qnKcEfFg4AV1+UeOodKorQiwJdaXja2A3zrTEwxK3JOxuK3nMIUME/xOPNLnaH 3JHZHN3w+JVy4O4NVTZ4273w42ONI4zNo7WAi+Swkx13dqRN7ZEjXFwn6YeMZ59FM1X5HVgonZi BJFUpBC9n7l4O7KjQSlh0xchRMR70VTwI3I7fERLE2q63QsbF40uMs52pW3aM5ZdWKyZ0jTI0hd Ip3ntl2sPyeOk2RQITH+vDwzrUFsNAaETNvj/2sXyw7lTvI1gfD20NEJNdSGd5nyXtSPt8PJK7G byrngTYYnFpZ1sPQKS+LKaQMeYXQihoLj7LvewdwYYssUa9fqcBnPwemF X-Google-Smtp-Source: AGHT+IGfU2ZpP5GUQb2r/asM8dIS/gU3gVSChJ51xhEwRuAK5LoECKroNJMo+bfcetu5zboDXW9N/A== X-Received: by 2002:a05:6e02:1c26:b0:430:9f96:23c8 with SMTP id e9e14a558f8ab-4309f962599mr41422425ab.14.1760440410398; Tue, 14 Oct 2025 04:13:30 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:29 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:42 -0600 Message-ID: <20251014111301.1059317-6-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: THQNMQ7TP4J7IGN5C35WUCYOLYEOAWPV X-Message-ID-Hash: THQNMQ7TP4J7IGN5C35WUCYOLYEOAWPV 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 05/16] expo: Avoid setting SCENEOF_SIZE_VALID with menu items List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The font size of menu items might change, thus requiring the size to be updated. So it is not correct to mark the items as fixed size. Drop this code. Signed-off-by: Simon Glass --- boot/scene.c | 9 +++++++-- boot/scene_menu.c | 13 +++++++------ include/expo.h | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/boot/scene.c b/boot/scene.c index 04a5e8a03e2..c2d106738f5 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -316,7 +316,7 @@ int scene_obj_set_size(struct scene *scn, uint id, int w, int h) return 0; } -int scene_obj_set_width(struct scene *scn, uint id, int w) +int scene_obj_set_width_flags(struct scene *scn, uint id, int w, uint flags) { struct scene_obj *obj; @@ -324,11 +324,16 @@ int scene_obj_set_width(struct scene *scn, uint id, int w) if (!obj) return log_msg_ret("find", -ENOENT); obj->req_bbox.x1 = obj->req_bbox.x0 + w; - obj->flags |= SCENEOF_SYNC_WIDTH; + obj->flags |= flags; return 0; } +int scene_obj_set_width(struct scene *scn, uint id, int w) +{ + return scene_obj_set_width_flags(scn, id, w, SCENEOF_SYNC_WIDTH); +} + int scene_obj_set_bbox(struct scene *scn, uint id, int x0, int y0, int x1, int y1) { diff --git a/boot/scene_menu.c b/boot/scene_menu.c index f52d561094b..6aa217ecfab 100644 --- a/boot/scene_menu.c +++ b/boot/scene_menu.c @@ -359,13 +359,14 @@ int scene_menu_arrange(struct scene *scn, struct expo_arrange_info *arr, y += height + theme->menuitem_gap_y; } + /* line up the right size of each set of items */ list_for_each_entry(item, &menu->item_head, sibling) { - scene_obj_set_width(menu->obj.scene, item->label_id, - dims[SCENEBB_label].x); - scene_obj_set_width(menu->obj.scene, item->key_id, - dims[SCENEBB_key].x); - scene_obj_set_width(menu->obj.scene, item->desc_id, - dims[SCENEBB_desc].x); + scene_obj_set_width_flags(menu->obj.scene, item->label_id, + dims[SCENEBB_label].x, 0); + scene_obj_set_width_flags(menu->obj.scene, item->key_id, + dims[SCENEBB_key].x, 0); + scene_obj_set_width_flags(menu->obj.scene, item->desc_id, + dims[SCENEBB_desc].x, 0); } if (sel_id) diff --git a/include/expo.h b/include/expo.h index aa8e41af176..7307c3aef98 100644 --- a/include/expo.h +++ b/include/expo.h @@ -943,6 +943,20 @@ int scene_obj_set_pos(struct scene *scn, uint id, int x, int y); */ int scene_obj_set_size(struct scene *scn, uint id, int w, int h); +/** + * scene_obj_set_width_flags() - Set the width of an object, with flags + * + * The given width is marked as 'requested' and will be applied when the scene + * is next arranged. The object flags are ORed with @flags + * + * @scn: Scene to update + * @id: ID of object to update + * @w: width in pixels + * @flags: Flags to OR with the current flags + * Returns: 0 if OK, -ENOENT if @id is invalid + */ +int scene_obj_set_width_flags(struct scene *scn, uint id, int w, uint flags); + /** * scene_obj_set_width() - Set the width of an object * From patchwork Tue Oct 14 11:12:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 590 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=UQuYwfed; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D5DE468147 for ; Tue, 14 Oct 2025 05:13:44 -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 nkn2glRSQ23G for ; Tue, 14 Oct 2025 05:13:44 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8B14F68112 for ; Tue, 14 Oct 2025 05:13:44 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5DB1368148 for ; Tue, 14 Oct 2025 05:13:38 -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 K_h-RdagufrI for ; Tue, 14 Oct 2025 05:13:38 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.174; helo=mail-il1-f174.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by mail.u-boot.org (Postfix) with ESMTPS id 65B8B6811C for ; Tue, 14 Oct 2025 05:13:34 -0600 (MDT) Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-42d8b15548eso25676905ab.2 for ; Tue, 14 Oct 2025 04:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440413; x=1761045213; 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=aaUZ5zxh/Bf6pZH1lU0INbX0Plr5AEjyUC3/d1G0q2Y=; b=UQuYwfedZ6Q0Zfs5MZUC4KVmWPryAB2Ad5xRSfo8yyRDYjCRXqUQQvni0a1/qp5Pw1 TzsKiDQunYemRg/7gsqSfb67ExuwRq9c1wBouQCBRTII4c+8M6XmFoDRjx2EpHESdaHZ djtUdAjK4CTKpKCh7APmAUvt8eWQ4Wy3qo9Fw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440413; x=1761045213; 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=aaUZ5zxh/Bf6pZH1lU0INbX0Plr5AEjyUC3/d1G0q2Y=; b=e9mVDZqmERN5gD8LNvbvStmjIIabb5ndQuOxMM/SbABmITwT6g6fDHIVj+//zh5YJa kzMBineusHXR6PtfVDq6ja7c6++PwE0ZKLWRt1jCceeMffzGinyrSGGjUrKBrDd6Oa01 Xh9Fi0vz+fnIE3JZvJjcwwjTJQkuZjBqCu45URC2F8N4dF2JQuHai0sxwE4LEk9rG3hi EXeJvFQS4eAIArh+6xcCl9k+Ngdu/Mvm5YUW2Vfz8rHcKLoOgCoDXFg17hoEz7USp74+ HQBNytV/W3NlNU52bOgKL/rSSa48T5ioWldLPNSkweCtOWMxaMRf3dGuAX8LY8BFwN2/ vyQw== X-Gm-Message-State: AOJu0YyWfRAMPR4V04x4Z9Va4VG5G3J/E88aSStoBdf9NcVJ0MZxWlYE DpMDdxK2UJF25rU2822NvpB4zlwKEWOERWz8tx7Mfpb0xa+j3YkJBA8ZOkPUAiS5MLI/4aJAx+3 rbko2Tk1jh/g= X-Gm-Gg: ASbGnctUUrMYHLGY7qhkmywBBKLq4JoxJvrPWG53htF5Tvl6JKuAe7xa6+CNy84Mvla WSeNMlAO8k1Zk9atSbjl001VcQ5R262feI9QXA6K/kS7crflT6GZu84yGaUgKQyVgbH0NV6TggV cz8NV6AYGZKdOselLxcNuZzKidHB7xpe4keiBDoOsDVpMXCIr4GqFtPHihc4MaH1V72DwFlmC1Q XoFODTmk58wYeWSJZM7FraogrjC8FhMgIrn07sW4Ez9HCH7or/L6GTB3GMtOD+jamfCtHBvXNV9 cVU/3zM4derajB27IfTadX6wnKSrGIh5p5MiBLer4wjI141c7+OLrmbDymu5B5esZwcD0SKAceg hOl96hRpizz/3vtoDF1U3Eq+mdxr11yQa42tGOPCq7eR9kg== X-Google-Smtp-Source: AGHT+IH65IP6TRKBfJlokpEaHs5yd4wwbxsGRr8jw/MnHbVXGhUq88lUJUVkZkjya9PhuGxuV1qKqg== X-Received: by 2002:a05:6e02:1a48:b0:42f:9dd5:3ebc with SMTP id e9e14a558f8ab-42f9dd540fbmr158478275ab.23.1760440413232; Tue, 14 Oct 2025 04:13:33 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:31 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:43 -0600 Message-ID: <20251014111301.1059317-7-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: AFHZER3UYJKHNINMGK5UEA72U6WKWOOB X-Message-ID-Hash: AFHZER3UYJKHNINMGK5UEA72U6WKWOOB 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 06/16] expo: Allow applying the theme to just the display List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In some cases it is useful to apply the display-related theme elements without touching the objects. Add an argument to expo_apply_theme() to support this. Signed-off-by: Simon Glass --- boot/expo.c | 16 +++++++++------- include/expo.h | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/boot/expo.c b/boot/expo.c index 432e81d3552..30f3cbeb9ef 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -432,7 +432,7 @@ int expo_action_get(struct expo *exp, struct expo_action *act) return act->type == EXPOACT_NONE ? -EAGAIN : 0; } -int expo_apply_theme(struct expo *exp) +int expo_apply_theme(struct expo *exp, bool do_objs) { struct expo_theme *theme = &exp->theme; struct scene *scn; @@ -440,12 +440,14 @@ int expo_apply_theme(struct expo *exp) if (exp->display) video_set_white_on_black(exp->display, theme->white_on_black); - list_for_each_entry(scn, &exp->scene_head, sibling) { - int ret; + if (do_objs) { + list_for_each_entry(scn, &exp->scene_head, sibling) { + int ret; - ret = scene_apply_theme(scn, theme); - if (ret) - return log_msg_ret("asn", ret); + ret = scene_apply_theme(scn, theme); + if (ret) + return log_msg_ret("asn", ret); + } } return 0; @@ -468,7 +470,7 @@ int expo_setup_theme(struct expo *exp, ofnode node) &theme->textline_label_margin_x); theme->white_on_black = ofnode_read_bool(node, "white-on-black"); - ret = expo_apply_theme(exp); + ret = expo_apply_theme(exp, true); if (ret) return log_msg_ret("asn", ret); diff --git a/include/expo.h b/include/expo.h index 7307c3aef98..454889d5db9 100644 --- a/include/expo.h +++ b/include/expo.h @@ -1163,9 +1163,10 @@ int expo_setup_theme(struct expo *exp, ofnode node); * The theme to be applied must be set up exp->theme * * @exp: Expo to update + * @do_objs: Apply theme to objects as well (normally this should be true) * Returns: 0 if OK, -ve on error */ -int expo_apply_theme(struct expo *exp); +int expo_apply_theme(struct expo *exp, bool do_objs); /** * expo_build() - Build an expo from an FDT description From patchwork Tue Oct 14 11:12:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 591 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=jq9x1I2a; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3F30E66DD8 for ; Tue, 14 Oct 2025 05:13:46 -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 hVQjuNume_0k for ; Tue, 14 Oct 2025 05:13:46 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1076568146 for ; Tue, 14 Oct 2025 05:13:46 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B69956811C for ; Tue, 14 Oct 2025 05:13:38 -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 scspoyi300zt for ; Tue, 14 Oct 2025 05:13:38 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.54; helo=mail-io1-f54.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by mail.u-boot.org (Postfix) with ESMTPS id 3A1C168147 for ; Tue, 14 Oct 2025 05:13:37 -0600 (MDT) Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-93607aec358so88999839f.0 for ; Tue, 14 Oct 2025 04:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440416; x=1761045216; 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=+54P9w6/JL1N8AW+NgMQDnTdvVAKrVznrMO3pwHp85o=; b=jq9x1I2aIHf1MMsHnSwD1tcVsyKcrmhkFZlyWr1EeGXwjfN7MtWnVWX0VeB2+L2ZRp iXw6w4CfOqfkrOmMF294qIB3lan8L+hIuJBViLsNHifmKEOwOIhUuaOeHEM+wpMFwIHK J5/ZFMUvc4iVoUM1dm1j/KnqjECoRO+BxRcow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440416; x=1761045216; 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=+54P9w6/JL1N8AW+NgMQDnTdvVAKrVznrMO3pwHp85o=; b=KjxYUOEtOItJ/dwks8L3hxw/BgAHLIuirXp7B0fEvDEoWSzb7SX/1ISPgYyWFZRqX0 6UyoAzNpA9u3YKsfR4jXue2aKI5tmq/rP1fvfilaeucerAk0haxqwoIsWurnyILrNNdx GTglxErcS7/ATzmrY2Xlk014tWHKJUynwGvLsxzyrAZSfGl5wPNa3XdZteHvATPCO6CI Sfr7RhSGkO2KW/62Q+7Knn+Kxtqv9DHOTpIawBUNW9e6e/o/je0VsZf+L8JN2qa5lgci Ls1CU2ovzDoJr+pL61XqxYkW2iHnE5zzusCMDBXpBKk0F5Ixx1JEfJpy5GTwQeLHkSQV U+tA== X-Gm-Message-State: AOJu0YyMtnJg19z3G83sIS8BbxL4rZcnRBTwHOTC6KGAo3+Nkg+O/cI3 leUTqsWRNbWyFrOg8GveydtDJaSBWGsQgHN4bJl2nvJxSuvatLAanrMXL+3j3VANFIKVtFyTm9q lgAi3R/RZ0ig= X-Gm-Gg: ASbGncvLxde33rqiBJu6Rn6Hb2J2Q2570RZZjpApXucNZgbNEf6asX934bG18FC3J1M b+jm7HmwfDvQEl/2j3XexB+z9L3fzhzUOlY3HS56APbXIsjjE/l/s/eJSnWRwcEicE90lqKbWS3 eKTIsLo53Mokq3n1URACyY5xyRSPOxMAjniK2S8rjaDNy4FX5xy9sqVXxbCfIOobx+8SGJFPB/7 g9OtEcU95t1KbUUZkPGxsRJJa3MTSMad52XTr315I4ioZUAH6rOUGIJxrAQ5PbILSCXf0JqCPEL 1rGsq7+gVDtt4OPItbCIZVAOUXNU+vxRlttqgIPb8SixA3+7CjHnV5jRUAvQnKG0NidFEc+Jxfu Qu2MYyNdizmNf1KZhuMsK8Du0sQLipCA2E+/7LobM8/7KQg== X-Google-Smtp-Source: AGHT+IGMp8D7YyTb6jK3zVc7fQxpQY3L8LxX/g3EnCOyP7auWQ2IqVHAbxIzB8xMsE0jCPZn8s4KXg== X-Received: by 2002:a05:6e02:1529:b0:3f3:4562:ca92 with SMTP id e9e14a558f8ab-42f8736a83fmr275957205ab.10.1760440416016; Tue, 14 Oct 2025 04:13:36 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:34 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:44 -0600 Message-ID: <20251014111301.1059317-8-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: 55GX42P5GD25TAW7TNM5C2R4I62YATNV X-Message-ID-Hash: 55GX42P5GD25TAW7TNM5C2R4I62YATNV 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 07/16] expo: Clarify that text objects are not string IDs List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add a reminder in the struct comments that a text ID is not a string ID. Signed-off-by: Simon Glass --- include/expo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/expo.h b/include/expo.h index 454889d5db9..2f32ff0aa72 100644 --- a/include/expo.h +++ b/include/expo.h @@ -444,7 +444,7 @@ struct scene_obj_txt { * - a preview object which shows an image related to the current item * * @obj: Basic object information - * @title_id: ID of the title text, or 0 if none + * @title_id: ID of the title text object (not string ID), or 0 if none * @cur_item_id: ID of the current menu item, or 0 if none * @pointer_id: ID of the object pointing to the current selection * @pointer_xofs: x position of pointer relative to the left side of the menu @@ -504,8 +504,8 @@ struct scene_menitem { * A textline has a prompt and a line of editable text * * @obj: Basic object information - * @label_id: ID of the label text, or 0 if none - * @edit_id: ID of the editable text + * @label_id: ID of the label text object (not string ID), or 0 if none + * @edit_id: ID of the editable text object (not string ID) * @max_chars: Maximum number of characters allowed * @buf: Text buffer containing current text * @pos: Cursor position From patchwork Tue Oct 14 11:12:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 592 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=YIAvc5MR; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 66DAE68143 for ; Tue, 14 Oct 2025 05:13:49 -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 7bTHQAy8ZPio for ; Tue, 14 Oct 2025 05:13:49 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1E3F168112 for ; Tue, 14 Oct 2025 05:13:48 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 76D51680C5 for ; Tue, 14 Oct 2025 05:13:43 -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 89UGkkXdU-3R for ; Tue, 14 Oct 2025 05:13:43 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.176; helo=mail-il1-f176.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by mail.u-boot.org (Postfix) with ESMTPS id 71A2A66DD8 for ; Tue, 14 Oct 2025 05:13:39 -0600 (MDT) Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-43094e0aeaeso17205045ab.2 for ; Tue, 14 Oct 2025 04:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440418; x=1761045218; 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=d5ne2Jvg3AIRxiUi7tHFF5uYdS5ay58wxYooYAijM/Q=; b=YIAvc5MRXZdwVQ17eTzx+YJWdVGGOvwOLtNZHt3ZNprX6fKxcRyOnKixRb3gmI/YZ1 iEqaNemJFAAxQhQapBg+cq6cJ3Zesq/o1HrjpA1wwFuPErpoHtuTgGnrHHVyXUVsHKK1 osQEX3tKtpBjqsk+q3TPqNI9x+2SwBaBDj4Ec= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440418; x=1761045218; 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=d5ne2Jvg3AIRxiUi7tHFF5uYdS5ay58wxYooYAijM/Q=; b=pTFi5SS4fI9EHocPRwosbMRjaOYmPZA4/EPuZolCV21tmU7wugDKpU5pYRIg4OPkbK YLOLMf+TgszsuSK1tuafDfQD3PlCGhEBLiUBLylh8ovgyUdsO+98OjdHHblVguS8SATE 79Vum+eankfxtnrbZ0zH5NB3fiQIMn9lPlMJ5GJSEOujpqHCLNUsBnZbuyzTiUbEfliU U9+/Ngb2MCjBTJ+eVTrAdipVJHeOyT9qMzo2sgtLUS37+0WaTBk5FbNeqJIg937xaMCo 7sEkZf6Gk9NLoMeQ0zvlJmjJQfxG+L1NebEgjQfqtduzaTP8tTZamx4UE8ts3JHHdkhY NVBw== X-Gm-Message-State: AOJu0YxWGhuYR0MVLgpXUxXD9BTAjKxqQ76WR270gxykDbLD8ZWl0eTC ayoAJsyreO/FhDo3sbqEGzCd9LTcvVVYmPFX7KVaNGjLa0F5EIMcjqKwfFKE9PhgIrXFWOKYM8h a+YRABzmwJlk= X-Gm-Gg: ASbGnctKUxn64orKVvH0ZZusfMi63h3Wh6YM3Vlu1c/HCt3x2Vl64l/tECBQQoaA+Vv Greq0NOw0G1zC+DLZiolsbNsFjmOenim8dHVC5vXdHxaJa6zpMHT4/3kOtvdhzrU6tXomPHqmdo M+a1HZa8Pkw9G7rrjB5DGX5gs7ZVH81KzM9h3CAXqPOB4LAL6MRZPuqkGWbFNAGlShsZ8b6hDFQ Fd6pPDnVhcYAx5KSQpE9hIlgWOuGecqA5HpQzk5Qn1nNcB5lGdcAG2AiAbDsmvQc/O1sAWxVvyk +XT2N1dDDw/2g4yivBB944pliPEw8Ais+Fl5qbdGuNgCVtZ2dezw7PJKwfD/vMLmAHhIREEgpYd 9PBS5xDDGxPGc4mPzQ1IGr0/9/Sa18nsbgi6UxPmPUHiI1rzGNQte+nPz X-Google-Smtp-Source: AGHT+IFDSbRzL182aYusHTkkOqIGjgDKSzgZFUhBXddSpMnutORjWe5Xz0eOi9bawWuEhx4CHzz0uQ== X-Received: by 2002:a05:6e02:3497:b0:430:9f96:23ce with SMTP id e9e14a558f8ab-4309f96255amr40127775ab.8.1760440418056; Tue, 14 Oct 2025 04:13:38 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:36 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:45 -0600 Message-ID: <20251014111301.1059317-9-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: LEVNJRE4SKJXRTIJAXU55PP6OM263TIU X-Message-ID-Hash: LEVNJRE4SKJXRTIJAXU55PP6OM263TIU 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 08/16] mouse: Place mouse in the middle of the display List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: When starting the expo, put the mouse in the middle of the display so it is more visible to the user. Signed-off-by: Simon Glass --- drivers/input/mouse-uclass.c | 2 ++ include/mouse.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/input/mouse-uclass.c b/drivers/input/mouse-uclass.c index 16a391532ae..dea8babf5fe 100644 --- a/drivers/input/mouse-uclass.c +++ b/drivers/input/mouse-uclass.c @@ -97,6 +97,8 @@ int mouse_set_video(struct udevice *dev, struct udevice *video_dev) if (video_dev) { uc_priv->video_width = video_get_xsize(video_dev); uc_priv->video_height = video_get_ysize(video_dev); + uc_priv->last_pos.x = uc_priv->video_width / 2; + uc_priv->last_pos.y = uc_priv->video_height / 2; } else { uc_priv->video_width = 0; uc_priv->video_height = 0; diff --git a/include/mouse.h b/include/mouse.h index 1a3a93801e2..92609cfd0e0 100644 --- a/include/mouse.h +++ b/include/mouse.h @@ -168,6 +168,8 @@ int mouse_set_ptr_visible(struct udevice *dev, bool visible); * Sets up the video device in the mouse uclass private data so mouse drivers * can scale coordinates to match the display resolution. * + * This also places the mouse in the middle of the display + * * @dev: Mouse device * @video_dev: Video device * Returns: 0 if OK, -ve on error From patchwork Tue Oct 14 11:12:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 594 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=dKU6OiFs; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 27A0568103 for ; Tue, 14 Oct 2025 05:13:53 -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 Va37tDDxgLZv for ; Tue, 14 Oct 2025 05:13:53 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A164868146 for ; Tue, 14 Oct 2025 05:13:52 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CFB026813F for ; Tue, 14 Oct 2025 05:13:45 -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 eDJSwwt7DMbn for ; Tue, 14 Oct 2025 05:13:45 -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 33F2D67C83 for ; Tue, 14 Oct 2025 05:13:42 -0600 (MDT) Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-430a4322b12so3534415ab.0 for ; Tue, 14 Oct 2025 04:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440421; x=1761045221; 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=AmUTsPbuwWe+aouQ3TjCHFby58DsvGmUuGo/npHRlZs=; b=dKU6OiFsh13PGoo7Ev0tnR5EDAcIKd4Mc1uHZ30KOVbXPmv49B5XRgEnvhrhrIrzOi TCpca3HAiPWVys7b6OAw3XPAq7R3Z1A75QJy8/MYZSAZbpSUHs4BQy4lYjFehr+85CU9 xaX+2NCQ64E5XgtyXH5ArwH9845ZHAsTFKYRQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440421; x=1761045221; 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=AmUTsPbuwWe+aouQ3TjCHFby58DsvGmUuGo/npHRlZs=; b=RdIvjB/ZFgImfp/TFbUrVs6ew6F00c2fK77Dnaxmbc1uh4EOI+5vnaJeDvEO3smYd8 bQQ6m77yf5EmWy4g1ArExjKVr+Xd+hCwkPvZ8Ebt+zX4+yxo9yNgdU+2aY1MW0xxe6t0 fk0d/ej8IDOVlTYM899OTtbYGJ6XVjuPZnQ4fAyM8N3v1fDqHXriEIphrd4z3JIzCfF7 i2uxkpqBYpKEB2arxN1Q1mdth4tr9qIPsb1XZl/YlzBW3WziEQ5VBbmELOGvHJhsnb+L 2ejykUApYxesqU7STFiJGZiIJIT4Ypz6DVowZCU/ieV32Mbj3vFnNFNbilRp6YgUY3rj lOVg== X-Gm-Message-State: AOJu0YwToM36cPSA/Lq1yTiAMr2MaFEqiO3jf4SDffR5Taev4oZRliAC EYlEnkkO/eVOEmiQ09JeNO2cL1MSDnpZ26sqNrZq28gB37yKhk0nGvXeiLOXdnoH2EIAcjm2P8c kgLPfDaA2fXA= X-Gm-Gg: ASbGncvtNPFK2rQpJbXsPRMSlmO66qx6eIOAiKbx8izSQ6Cw9H1HB3+Ho/si/vIyg6o YY3uwYh8ml+nAyX0X1D+Poul5pMp7ImjyOo/7hdqS+y/sGRcGW9CvHxJPzvQtP3UZ9Ba6ph/01o LgDo+PKF7bcsA+KCWIG6Aqw6yUxXlz14ojfEkzT9NoZrTvYQtXl4obsEfhd8QCtODfkHwsp4cWC 1uBNrAXdklefjnhk+TPlVD8HGUGxZsElW5HC0+64lkjOe/lvC4Im2e7V0PC8f667+8peunNtQlH 6mcKU3W2Kqkb7VgL36GPsxy9cMTXrQWJbmlBQtVBoZOZoIJ7KHQ5YXImrXEz9h8hrQhPxZ96+0o 1vYl3DJrGJiPSqQi/GPhSXqDH1c5ySKp0BHeGzVj/Y7jl3Q== X-Google-Smtp-Source: AGHT+IFuTP6V14oDGF8JpnBIiXOuCwER+p/9KusX5aqnFkKazgEeiyd5rGlKZVm4qIl57RScfVkiJw== X-Received: by 2002:a05:6e02:3c04:b0:42e:712c:b15 with SMTP id e9e14a558f8ab-42f87351fefmr250281565ab.1.1760440420796; Tue, 14 Oct 2025 04:13:40 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:39 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:46 -0600 Message-ID: <20251014111301.1059317-10-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: B3FQOSJO3DDHTFYTMIGMCPNMLYWZ7CBA X-Message-ID-Hash: B3FQOSJO3DDHTFYTMIGMCPNMLYWZ7CBA 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 09/16] boot: Split out setting menu properties from menu creation List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The existing menu is functional but basic. It would be useful to be able to create the objects but apply a different layout or style for them. The bootflow_menu_new() function is quite long in any case. Split out the parts which adjust the position, alignment, etc. of the objects into a separate function. We can (later) call this from elsewhere to apply the basic styling. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 75 +++++++++++++++++++++++++++----------------- include/bootflow.h | 12 +++++++ 2 files changed, 58 insertions(+), 29 deletions(-) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 1f24215f392..b66ab2d3b73 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -32,13 +32,54 @@ struct menu_priv { struct udevice *last_bootdev; }; +int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo) +{ + int ret = 0; + bool use_font; + + ret |= scene_obj_set_bbox(scn, OBJ_BOX, 30, 90, 1366 - 30, 720); + ret |= scene_obj_set_pos(scn, OBJ_MENU, MARGIN_LEFT, 100); + ret |= scene_obj_set_bbox(scn, OBJ_MENU_TITLE, 0, 32, + 1366, 60); + ret |= scene_obj_set_halign(scn, OBJ_MENU_TITLE, SCENEOA_CENTRE); + + if (has_logo) + ret |= scene_obj_set_pos(scn, OBJ_U_BOOT_LOGO, 1165, 100); + + ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1A, 0, 590, + 1366, 590 + 40); + ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1B, 0, 620, + 1366, 620 + 40); + ret |= scene_obj_set_bbox(scn, OBJ_PROMPT2, 100, 650, + 1366 - 100, 700); + ret |= scene_obj_set_bbox(scn, OBJ_AUTOBOOT, 0, 720, + 1366, 750); + ret |= scene_obj_set_halign(scn, OBJ_PROMPT1A, SCENEOA_CENTRE); + ret |= scene_obj_set_halign(scn, OBJ_PROMPT1B, SCENEOA_CENTRE); + ret |= scene_obj_set_halign(scn, OBJ_PROMPT2, SCENEOA_CENTRE); + ret |= scene_obj_set_valign(scn, OBJ_PROMPT2, SCENEOA_CENTRE); + ret |= scene_obj_set_halign(scn, OBJ_AUTOBOOT, SCENEOA_CENTRE); + ret |= scene_menu_set_pointer(scn, OBJ_MENU, OBJ_POINTER); + + if (ret) + return log_msg_ret("msp", ret); + + use_font = IS_ENABLED(CONFIG_CONSOLE_TRUETYPE); + scene_obj_set_hide(scn, OBJ_PROMPT1A, use_font); + scene_obj_set_hide(scn, OBJ_PROMPT1B, !use_font); + scene_obj_set_hide(scn, OBJ_AUTOBOOT, use_font); + + exp->show_highlight = true; + + return 0; +} + int bootflow_menu_new(struct expo **expp) { struct scene_obj_menu *menu; struct menu_priv *priv; struct scene *scn; struct expo *exp; - bool use_font; void *logo; int ret; @@ -60,21 +101,14 @@ int bootflow_menu_new(struct expo **expp) ret = scene_box(scn, "box", OBJ_BOX, 2, false, NULL); if (ret < 0) return log_msg_ret("bmb", ret); - ret |= scene_obj_set_bbox(scn, OBJ_BOX, 30, 90, 1366 - 30, 720); ret = scene_menu(scn, "main", OBJ_MENU, &menu); - ret |= scene_obj_set_pos(scn, OBJ_MENU, MARGIN_LEFT, 100); ret |= scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE, "U-Boot - Boot Menu", NULL); - ret |= scene_obj_set_bbox(scn, OBJ_MENU_TITLE, 0, 32, - 1366, 60); - ret |= scene_obj_set_halign(scn, OBJ_MENU_TITLE, SCENEOA_CENTRE); logo = video_get_u_boot_logo(NULL); - if (logo) { + if (logo) ret |= scene_img(scn, "ulogo", OBJ_U_BOOT_LOGO, logo, NULL); - ret |= scene_obj_set_pos(scn, OBJ_U_BOOT_LOGO, 1165, 100); - } ret |= scene_txt_str(scn, "prompt1a", OBJ_PROMPT1A, STR_PROMPT1A, "Use the \x18 and \x19 keys to select which entry is highlighted.", @@ -89,32 +123,15 @@ int bootflow_menu_new(struct expo **expp) ret |= scene_txt_str(scn, "autoboot", OBJ_AUTOBOOT, STR_AUTOBOOT, "The highlighted entry will be executed automatically in %ds.", NULL); - ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1A, 0, 590, - 1366, 590 + 40); - ret |= scene_obj_set_bbox(scn, OBJ_PROMPT1B, 0, 620, - 1366, 620 + 40); - ret |= scene_obj_set_bbox(scn, OBJ_PROMPT2, 100, 650, - 1366 - 100, 700); - ret |= scene_obj_set_bbox(scn, OBJ_AUTOBOOT, 0, 720, - 1366, 750); - ret |= scene_obj_set_halign(scn, OBJ_PROMPT1A, SCENEOA_CENTRE); - ret |= scene_obj_set_halign(scn, OBJ_PROMPT1B, SCENEOA_CENTRE); - ret |= scene_obj_set_halign(scn, OBJ_PROMPT2, SCENEOA_CENTRE); - ret |= scene_obj_set_valign(scn, OBJ_PROMPT2, SCENEOA_CENTRE); - ret |= scene_obj_set_halign(scn, OBJ_AUTOBOOT, SCENEOA_CENTRE); - - use_font = IS_ENABLED(CONFIG_CONSOLE_TRUETYPE); - scene_obj_set_hide(scn, OBJ_PROMPT1A, use_font); - scene_obj_set_hide(scn, OBJ_PROMPT1B, !use_font); - scene_obj_set_hide(scn, OBJ_AUTOBOOT, use_font); ret |= scene_txt_str(scn, "cur_item", OBJ_POINTER, STR_POINTER, ">", NULL); - ret |= scene_menu_set_pointer(scn, OBJ_MENU, OBJ_POINTER); if (ret < 0) return log_msg_ret("new", -EINVAL); - exp->show_highlight = true; + ret = bootflow_menu_set_props(exp, scn, logo); + if (ret < 0) + return log_msg_ret("nep", -EINVAL); *expp = exp; diff --git a/include/bootflow.h b/include/bootflow.h index 17ecc80c2eb..9ee11b33dbf 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -560,6 +560,18 @@ int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq, */ int bootflow_menu_apply_theme(struct expo *exp, ofnode node); +/** + * bootflow_menu_set_props() - Apply properties for the menu + * + * This sets up the positions of the objects in the basic menu. It also + * enables show_highlight + * + * @exp: Expo to update + * @scn: Scene to update + * @has_logo: true if a logo should be visible + */ +int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo); + #define BOOTFLOWCL_EMPTY ((void *)1) /** From patchwork Tue Oct 14 11:12:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 593 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=Nl+9Z8I+; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C3BC46813B 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 6n1r27FAkoiE for ; Tue, 14 Oct 2025 05:13:52 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3DC9568112 for ; Tue, 14 Oct 2025 05:13:51 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9057F68148 for ; Tue, 14 Oct 2025 05:13:45 -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 MiqV7OZ9p-qe for ; Tue, 14 Oct 2025 05:13:45 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.173; helo=mail-il1-f173.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by mail.u-boot.org (Postfix) with ESMTPS id 90AB26813F for ; Tue, 14 Oct 2025 05:13:44 -0600 (MDT) Received: by mail-il1-f173.google.com with SMTP id e9e14a558f8ab-42f9353c810so21073995ab.0 for ; Tue, 14 Oct 2025 04:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440423; x=1761045223; 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=igU6Kbeh2O78EqgdfSdpCF0s3uHBXmBjXBfWnNuQYzg=; b=Nl+9Z8I+Htmc8tKzO8NP/6UNeUI9+6Ooo4+h0V3SGKw7BRjO/7jilNoTN2TO1CJLYp oZPLdGCgS2xi8E8gcZndey9W8gU11G53OYR1QPchY+WlIHd5LfTFTDQEmI1E9vlTjERc 1C+ir14blIUvRe08Y2Ly4015uG/6q3JxTjMhs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440423; x=1761045223; 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=igU6Kbeh2O78EqgdfSdpCF0s3uHBXmBjXBfWnNuQYzg=; b=jnhCVgXT/3Oo6CyBbuMXULqKPIFIXKOqg7lc5i7LzPvAwYzkJGmVJqjY1oECORgnpM QlOOSAvpiQHqdukxp91Ziu7/7f8509Xg/BEuZTDfO0Uee+5hdfLH3r7oS+Wzd+KgbHQ0 Vy65wPktnCtHeW7g8CuxvLq8ALdocTbr+wnZXAy+VLvZeujU+F9KoOskGVpp4pjYnOnj VspDmJpyT5OYYlhz2TrzDi31TwmDcJgvYj0EEHMf+CkuUXgv2qjosQ4p5yLGoetmrwnC 1Y3eU2R0fZN2wdh+4czp+gcCHk4OoMo7yco+5naFAXWWdSZK3b6h9avdaY/s4RyHjsoa ehLg== X-Gm-Message-State: AOJu0YwVUQ9eu5wg7OIP8RHdU/F+ZXZER5cb+iJIZRU0xqFm2tUtEwBt LfOeppRdEjN5Q0YSvn9Yx99eY2sS4SVYNqC4yTNFJ5pjWnYZKe4OP1EWVbXERu1P7kW0/U0CWUt 8f3VopNRYiZc= X-Gm-Gg: ASbGncvMtqv52E9obGm1UAlcigd7Aq/L82DU12VMOukj6BZtQCkG+NxmK4a/XynTNVq uAIyXm3fMsViuQVUSskW1U/DDLv3sT5+ASKi0UjhM9gJw/7uX3GhT2KJKlKXzJkoMhjj6gmg+Rj GDU0JJWpGgN+f3oZ0zB744c9Z9cAZDGONZNJpaOJqPOPkA2gzdIpL4tpdwgQ2lXyaukoyXsZpIA Lij4xuDsWGflRwpMiM/n7vaLrtBl0bZszuUIRd05NRYci1WscURjQXQpGqTRoXVJhvtpL40BWG6 H06aqiMV2Bu3T8AtEvS96UXwywUeofLl2flCWDrXB8RySh93HmUDTYHE3WfLKAXvXeZ8YH6Nz+L bWmBGP+L2SWAKZQPt5IgHvtvNN4M8DuMv0Em/3wEkR9s9Kw== X-Google-Smtp-Source: AGHT+IGdYwovnbbd01EzYrU4ilNC0AWMDto9bVsrf9iUHnH5FaAb3oGft+mvtRF2ZCallsr6apizPg== X-Received: by 2002:a92:c26e:0:b0:42d:86fb:d871 with SMTP id e9e14a558f8ab-42f873ed35amr212098925ab.21.1760440422770; Tue, 14 Oct 2025 04:13:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:41 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:47 -0600 Message-ID: <20251014111301.1059317-11-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: G7HW35KAZPCKDTWAOX56XXE2KQLJPEBY X-Message-ID-Hash: G7HW35KAZPCKDTWAOX56XXE2KQLJPEBY 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 10/16] boot: Move prompt strings into bootflow_menu_set_props() 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 strings are part of the basic menu and may be different for other menus. Rather than setting them up on creation, add them as part of setting the properties of the objects. Provide a way to set the title as well. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 40 ++++++++++++++++++++++++++++++---------- include/bootflow.h | 4 +++- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index b66ab2d3b73..3df15959c0e 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -32,8 +32,10 @@ struct menu_priv { struct udevice *last_bootdev; }; -int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo) +int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, + const char *title) { + struct abuf *buf; int ret = 0; bool use_font; @@ -69,6 +71,28 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo) scene_obj_set_hide(scn, OBJ_PROMPT1B, !use_font); scene_obj_set_hide(scn, OBJ_AUTOBOOT, use_font); + /* Set the title and prompt texts */ + ret = expo_edit_str(exp, STR_MENU_TITLE, NULL, &buf); + if (ret) + return log_msg_ret("mss", ret); + abuf_printf(buf, "%s", title); + + ret = expo_edit_str(exp, STR_PROMPT1A, NULL, &buf); + if (!ret) + abuf_printf(buf, "Use the \x18 and \x19 keys to select which " + "entry is highlighted."); + + ret = expo_edit_str(exp, STR_PROMPT1B, NULL, &buf); + if (!ret) + abuf_printf(buf, "Use the UP and DOWN keys to select which " + "entry is highlighted."); + + ret = expo_edit_str(exp, STR_PROMPT2, NULL, &buf); + if (!ret) + abuf_printf(buf, "Press enter to boot the selected OS, 'e' to " + "edit the commands before booting or 'c' for a " + "command-line. ESC to return to previous menu"); + exp->show_highlight = true; return 0; @@ -104,22 +128,18 @@ int bootflow_menu_new(struct expo **expp) ret = scene_menu(scn, "main", OBJ_MENU, &menu); ret |= scene_txt_str(scn, "title", OBJ_MENU_TITLE, STR_MENU_TITLE, - "U-Boot - Boot Menu", NULL); + "", NULL); logo = video_get_u_boot_logo(NULL); if (logo) ret |= scene_img(scn, "ulogo", OBJ_U_BOOT_LOGO, logo, NULL); ret |= scene_txt_str(scn, "prompt1a", OBJ_PROMPT1A, STR_PROMPT1A, - "Use the \x18 and \x19 keys to select which entry is highlighted.", - NULL); + "", NULL); ret |= scene_txt_str(scn, "prompt1b", OBJ_PROMPT1B, STR_PROMPT1B, - "Use the UP and DOWN keys to select which entry is highlighted.", - NULL); + "", NULL); ret |= scene_txt_str(scn, "prompt2", OBJ_PROMPT2, STR_PROMPT2, - "Press enter to boot the selected OS, 'e' to edit the commands " - "before booting or 'c' for a command-line. ESC to return to " - "previous menu", NULL); + "", NULL); ret |= scene_txt_str(scn, "autoboot", OBJ_AUTOBOOT, STR_AUTOBOOT, "The highlighted entry will be executed automatically in %ds.", NULL); @@ -129,7 +149,7 @@ int bootflow_menu_new(struct expo **expp) if (ret < 0) return log_msg_ret("new", -EINVAL); - ret = bootflow_menu_set_props(exp, scn, logo); + ret = bootflow_menu_set_props(exp, scn, logo, "U-Boot - Boot Menu"); if (ret < 0) return log_msg_ret("nep", -EINVAL); diff --git a/include/bootflow.h b/include/bootflow.h index 9ee11b33dbf..3a5c7bce847 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -569,8 +569,10 @@ int bootflow_menu_apply_theme(struct expo *exp, ofnode node); * @exp: Expo to update * @scn: Scene to update * @has_logo: true if a logo should be visible + * @title: Title to use for the boot menu */ -int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo); +int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, + const char *title); #define BOOTFLOWCL_EMPTY ((void *)1) From patchwork Tue Oct 14 11:12:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 595 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=SKGvcEPr; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 74D0668148 for ; Tue, 14 Oct 2025 05:13:55 -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 zI4yug49E95e for ; Tue, 14 Oct 2025 05:13:55 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 517936813B 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 DC7FE6814D for ; Tue, 14 Oct 2025 05:13:51 -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 ApltYAaFqksU for ; Tue, 14 Oct 2025 05:13:51 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.180; helo=mail-il1-f180.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by mail.u-boot.org (Postfix) with ESMTPS id EBC0768123 for ; Tue, 14 Oct 2025 05:13:46 -0600 (MDT) Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-430a4322b12so3534925ab.0 for ; Tue, 14 Oct 2025 04:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440426; x=1761045226; 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=2oOu/fJw5PbBL/muuAR76Q1lOclN/hhbEHD4jX9cyB4=; b=SKGvcEPryRBIrTFo9hBDn0penUPw3HVGW1EymPSjfRUaCkjtpKYngiDtUJtaWP1igc Xl39jJqg99B9TkMLEn5rkWtp74dN9lHl90bOY5axXJK3HGEM9VshX1FHm2SvSudx9GZw ot/RSoY53agbV1RpgY5es45Nv64CMS5l2Gf1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440426; x=1761045226; 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=2oOu/fJw5PbBL/muuAR76Q1lOclN/hhbEHD4jX9cyB4=; b=RkdY64ax543D5IFCX3SfLv2RhD8fepcRN+vpEBep910ysPmr2LinXa69lRKm+EfYQ1 y24Eam3NRRfv8eyGsmXh7Rdg0o1OvJrnZaXHyHi3WexjeE8uMcWYARXF9gdp7i4iHM++ WkOLFtiSLlisQQlPqQ77vHgCEi54jmpAeijrS13GL/CtA0K8NJn2tgZctoXJwLEraTVw /WITj/sTrV77g2OdU8/nzeJcvQjacUShFkFmcMOq3S6h2vAy7kXkaHdhxJDlpChlxazc q4wi0xrHx1lHxi1mjqOoQcI2e7r4Yb/yL+eGibk60CgIzfbqVMqNMEa8ikWxodxD8s5P 7bGA== X-Gm-Message-State: AOJu0YxWAb8oulpm9riBrkJhbA9DLbDKMc0VH/CKNl8aUTjQ+wKX+2aX wimEbA5GboirvbbzE/Loko3I1u1GQcbTTOISqgr7XCrSe+8jWYkMrzZdqE0YM8HgzaQIyqd7w5h g2nJ/RzUJT3g= X-Gm-Gg: ASbGncvG4PKjR5X49xrMHmVi6/XZTpPD6W9E4OoG4fnsCabLPDufJDG47iK6B1x+J8o vGgjM8q2tkqMY5OSmf3B0tKQTlBWwfe/EhQDtZFGB8aqdu7hT4oskRAGDXpQgTEfZJDnBBv/sLq 08huCqhN2/khChH27fWSVrlhxcqzxBQKZ9tK4JdzY/fqsoKJ7uInUuwM28X27IP6pYHKOZmjDIP rIOa0O9MqkMwwPNTk6Fxyh3TMehIRz0WZgCHDyOtco9d7h1hk5JF80SYzK1aNUox0hZ7myAk+Zz OK4O+uNbLLkfFc/l5eIISbLxXDz85/jmDf5N5jur4GKFY5GdtokyQ9sIjPT2y38A1PVSXdklxIh eb+wWTg8OksGYbYOWje5kYdQafZtERYgjKeQ= X-Google-Smtp-Source: AGHT+IFZ+LdHKwBG+42ckxZh9sHfbUMWyT6dckBXxzQogOauFWVnVcDb8AKqTjot2767u7jxOFWLYg== X-Received: by 2002:a05:6e02:12ee:b0:42f:9dd5:3ebb with SMTP id e9e14a558f8ab-42f9dd540c5mr147514875ab.24.1760440425742; Tue, 14 Oct 2025 04:13:45 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:44 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:48 -0600 Message-ID: <20251014111301.1059317-12-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: DQEDXMBS2OZ7BSY3TIJEQBYJQM3HOHKE X-Message-ID-Hash: DQEDXMBS2OZ7BSY3TIJEQBYJQM3HOHKE 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 11/16] boot: Hide unwanted objects and show the menu pointer List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The basic menu uses a pointer to show the current menu item. Show this and hide some other objects which are not wanted. Mark the box as unfilled, since this is how it is used with the basic menu. Explicitly disable the mouse pointer. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 3df15959c0e..686769e57b5 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -40,6 +40,7 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, bool use_font; ret |= scene_obj_set_bbox(scn, OBJ_BOX, 30, 90, 1366 - 30, 720); + scene_box_set_fill(scn, OBJ_BOX, false); ret |= scene_obj_set_pos(scn, OBJ_MENU, MARGIN_LEFT, 100); ret |= scene_obj_set_bbox(scn, OBJ_MENU_TITLE, 0, 32, 1366, 60); @@ -93,6 +94,17 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, "edit the commands before booting or 'c' for a " "command-line. ESC to return to previous menu"); + /* hide a few things we don't use */ + scene_obj_set_hide(scn, OBJ_OTHER_LOGO, true); + scene_obj_set_hide(scn, OBJ_SETTINGS, true); + scene_obj_set_hide(scn, OBJ_HELP, true); + + /* select the menu and hide the pointer */ + scene_set_highlight_id(scn, OBJ_MENU); + scene_obj_set_hide(scn, OBJ_POINTER, false); + + expo_set_mouse_enable(exp, false); + exp->show_highlight = true; return 0; 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; From patchwork Tue Oct 14 11:12:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 597 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=Icn/fUYT; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 02FBB6814F for ; Tue, 14 Oct 2025 05:13:58 -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 R_FSHIMUKdWm 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 44D3768146 for ; Tue, 14 Oct 2025 05:13:56 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A98B36814D 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 60ncQRGRPI1f for ; Tue, 14 Oct 2025 05:13:52 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.170; helo=mail-il1-f170.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by mail.u-boot.org (Postfix) with ESMTPS id DE25468143 for ; Tue, 14 Oct 2025 05:13:50 -0600 (MDT) Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-42f9f5a9992so33877875ab.2 for ; Tue, 14 Oct 2025 04:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440430; x=1761045230; 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=g6AUsZ9yBb3k2sGL0hOy+0NxPU/cXV09Z63e3XRI5hE=; b=Icn/fUYT0+r2KtzUMknD19gufh7A6Og5dqskiedRPm4Z5B6RIaM7AgGDCOq/pB4MVz rfDaIYYB9qtDz5lI0umVHs32kyEKR4284U129g/d7zz6YrWfyPTQjY13Dz+C3KB9CUA1 rMDiuuN8bHrQ9kXgvXlf8LAeCbFVpm814SlbQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440430; x=1761045230; 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=g6AUsZ9yBb3k2sGL0hOy+0NxPU/cXV09Z63e3XRI5hE=; b=nehWDdgti6J9f5wnwxGkXZIGRcWHqnN1sYjH/Vhw0Nr5EXn3mpPXYxYFK7I/aOK3kF dBnp7IjRqdqbqMYuiMs9VT/ugxADE5f58XUUETb4J2hdX1GNke+xPb5RcxOz3CTGHPaW kJYvXqA7Vrk+uEdNbeIgMylskgFbJ1Rkvq15zNyMEA2YhlajMCcEyBphgUi65/dQnmOY K/OU9O3t+Prc0EvrgBMO8YqveKvj/7iYnOT3omtefScTxrvCwAsIX2KUT3HEAXIbiLdd HKK2qrIcZfFb1kV7kk0VTCZroY077mfrx6Z4719+iNFH6gqreM2iGGC7/icBqA8pDQ9W 7/WQ== X-Gm-Message-State: AOJu0Yy5+3IIJBWa6G6sOCerguq6YHWakts4WDln3xHsKhZEwA+bmGCE StX2fAgpHySAZLwXIYhA0brfovXB238cSClkXJYRSv8TH64d1fhCCo4QzNptu8kLLBnkhwM2Gx/ 0DbxxLozxDmE= X-Gm-Gg: ASbGncthTUQd+yAa711sF9WL+WvUjAKhp/wBE1lxVxSVXItRdxeQ5YnL7xGpXbmfFER z3yNzJUS5RRYsSksKZV9D7GOwUbT8o7E3BbrpYvrOvKHCwmBcvPlKba35FYbWAPf0EcgPa2+oPY lMarSGGcR+/e1dfeyirZgAgjpu/YB0H1djPY95jauhJyNJkuMv6aZw+lA0RFVU6pLaiWr6hfwwc hToxLjoHwDBCFZe92i1Z8IIf4Wvx3URt5BFIqPM2wdqAMtnnkHa95Nq7ljYEgH5hb0wuCgm25EV TRImUwR7bYhC4nXgAbHoZntCvOgIFpmte67+X3H6AM6B27xrl9qqtR5W+mr5YJV5w3W6ZLHe2F2 LTae0vomk69lXXRALjfH8wwWR3uhQx/M96OQ= X-Google-Smtp-Source: AGHT+IFV6FZ/qQOeWOyR8R92Jcdc5VJ+TJAkjOy7kn5tla7BXglW3Z78RyIJs9yU0VCLUFvD25J3jQ== X-Received: by 2002:a92:cd8c:0:b0:42f:989d:ae59 with SMTP id e9e14a558f8ab-42f989daf5emr181024545ab.28.1760440429612; Tue, 14 Oct 2025 04:13:49 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:48 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:50 -0600 Message-ID: <20251014111301.1059317-14-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: RNEXUNORAHITAUHLG5J7AJ2LLUWSPCDD X-Message-ID-Hash: RNEXUNORAHITAUHLG5J7AJ2LLUWSPCDD 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 13/16] boot: Move text for desc and label items to after setup List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use the bootflow_menu_set_item_props() to set the text in these items, since it can be presented differently depending on the layout. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 057ebee01a1..5f559e2220c 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -35,6 +35,8 @@ struct menu_priv { static int bootflow_menu_set_item_props(struct scene *scn, int i, const struct bootflow *bflow) { + struct expo *exp = scn->expo; + struct abuf *buf; int ret; scene_obj_set_hide(scn, ITEM_PREVIEW + i, true); @@ -45,6 +47,15 @@ static int bootflow_menu_set_item_props(struct scene *scn, if (ret) return log_msg_ret("msp", ret); + ret = expo_edit_str(exp, STR_DESC + i, NULL, &buf); + if (ret) + return log_msg_ret("msr", ret); + abuf_printf(buf, "%s", bflow->os_name ? bflow->os_name : bflow->name); + + ret = expo_edit_str(exp, STR_LABEL + i, NULL, &buf); + if (!ret) + abuf_printf(buf, "%s", bootflow_guess_label(bflow)); + return 0; } @@ -190,9 +201,8 @@ int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq, struct scene **scnp) { struct menu_priv *priv = exp->priv; - char str[2], *label, *key; + char str[2], *key; struct scene *scn; - const char *name; uint preview_id; uint scene_id; bool add_gap; @@ -210,14 +220,6 @@ int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq, if (!key) return log_msg_ret("key", -ENOMEM); - name = bootflow_guess_label(bflow); - label = strdup(name); - - if (!label) { - free(key); - return log_msg_ret("nam", -ENOMEM); - } - add_gap = priv->last_bootdev != bflow->dev; /* disable this gap for now, since it looks a little ugly */ @@ -226,10 +228,9 @@ int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq, ret = expo_str(exp, "prompt", STR_POINTER, ">"); ret |= scene_txt_str(scn, "label", ITEM_LABEL + seq, - STR_LABEL + seq, label, NULL); + STR_LABEL + seq, "", NULL); ret |= scene_txt_str(scn, "desc", ITEM_DESC + seq, STR_DESC + seq, - bflow->os_name ? bflow->os_name : - bflow->name, NULL); + "", 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); From patchwork Tue Oct 14 11:12:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 598 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=N4glRjMM; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 65FE368112 for ; Tue, 14 Oct 2025 05:14:00 -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 gledllE4sn3e for ; Tue, 14 Oct 2025 05:14:00 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A7B4568122 for ; Tue, 14 Oct 2025 05:13:59 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 37A0968152 for ; Tue, 14 Oct 2025 05:13:58 -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 lVtJFJCVrQrV for ; Tue, 14 Oct 2025 05:13:58 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.177; helo=mail-il1-f177.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) by mail.u-boot.org (Postfix) with ESMTPS id 81417680C5 for ; Tue, 14 Oct 2025 05:13:53 -0600 (MDT) Received: by mail-il1-f177.google.com with SMTP id e9e14a558f8ab-4242bb22132so50315505ab.3 for ; Tue, 14 Oct 2025 04:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440432; x=1761045232; 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=hcSES6CC13e9ZPA5TlWfQRJNJt+Sq+CpmDnd1F+3r2o=; b=N4glRjMMyKUfbBNP2iE8UiWQL0Wgz23N4s+g7vQAvuRjv9vkXdcFpimkkd2xAGDdbW T9fWFaXvImMCWXv6fTNa2OTql3YCgfKOhW5fwj6HfYotI/o/YcMY1VJbaLgZYcwSx18F cCcIrpwvlmXylaq8w1SrOgee/f9ORFmM5Tcpw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440432; x=1761045232; 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=hcSES6CC13e9ZPA5TlWfQRJNJt+Sq+CpmDnd1F+3r2o=; b=AoMONUqVV3R1RROETmLG5rjNs8FbzH6SEDRcZC7SxCgjYL2EkwaoLLwaoWIgFk1zyF DDtjhAwIuCQT71oNSWTj13sTV78+ITgJ+lCcwtMPP1t5VHcfUhjL+7Dx+8zVVrUX78hw qJ2l8v4HRgi09GNOf1friYnmMOVYKfkLFnCguRXt7+s5UsuPtxFbsOLZRoe40+amx8wS qTNBaBVhGdB8/nzrLsDFO9aQW4NcaXgEgVlWCMF5+swwgXasB1+Fdxz7888BC/fmC9wM vECPFYJITM4ttQKDAHPSzT+fZmVVNXB+h4EY3Ir9ZglZxgN5xrDO06nUpolZk3VoPckP sykQ== X-Gm-Message-State: AOJu0Yyyq2poXzmAqUGMAqXUK6NFgLVpb48hez4TuKx0Uc50AGr3pYi1 IGlklr4Tvome5kqpY7TFJ3jHbbl7reyJe9vLHQAZnij+1MCeOH6hvCGgxswaUXNLblZKIkevZwd OK4PFXqVb290= X-Gm-Gg: ASbGncv4QcVu1XDp/7822PEN75/tYeMofSSJCFxUNrey4u9ms3gDbp6Wh6my2gBXgLs JpPc6Cptm4WNrZ0ktJJSlCYhaYbEjnCHL84yrLDlWQK3tcp4NSQYCq5hpzXVM4akILF7smBBKUo miJ3WdS8sVCPxuWUFPVrMC46pUaKsvMF3uyfBroSWSv6KTGBdPeLzFEFBrBcmfv/ajv2C+8HlNU uMSvVbFOD4oOl/+OinF2V3ac2mTD8kLDbtADsYn7CLFCQUZnOo3hW5wViA7sUBV8sIoMqnzrp7o ziVEQ6aRVfPHSvDA/WmFRMoqjDHT5/avwXuhG8JzIvRYpbJFjpbfI2s3dlFj8JgSDc/kaPwsYKE TZcoMdE9fGa0L0+BYd9k8JJg+b8Vtt0Mdq/sOJ9z9Y3JpnQ== X-Google-Smtp-Source: AGHT+IHfUjIeBXv1PzXml+VJoYI6LPmtr1hX+i+9bfxpthD2hJ4FUV1zDZoSbskQi69TbByVeQEDhw== X-Received: by 2002:a05:6e02:2709:b0:42e:741f:b608 with SMTP id e9e14a558f8ab-42f873be948mr263524085ab.18.1760440432387; Tue, 14 Oct 2025 04:13:52 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:51 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:51 -0600 Message-ID: <20251014111301.1059317-15-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: FE6JHFNJRLSFCCX5OZ77XICKCX6CKJNV X-Message-ID-Hash: FE6JHFNJRLSFCCX5OZ77XICKCX6CKJNV 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 14/16] boot: Explicitly request that the menu position its objects List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Manual mode is not enabled by default, but we should explicitly clear it with the basic menu, since a different style may have set the flag. Set manual mode to false in bootflow_menu_set_props() Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 5f559e2220c..2f60ccd59ce 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -130,6 +130,9 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, scene_set_highlight_id(scn, OBJ_MENU); scene_obj_set_hide(scn, OBJ_POINTER, false); + /* tell the menu to lay out its objects */ + scene_obj_set_manual(scn, OBJ_MENU, false); + expo_set_mouse_enable(exp, false); exp->show_highlight = true; From patchwork Tue Oct 14 11:12:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 599 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=UYm3EVwN; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A3869680C5 for ; Tue, 14 Oct 2025 05:14:02 -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 LMSLWlcHC0IT for ; Tue, 14 Oct 2025 05:14:02 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5FA9A68112 for ; Tue, 14 Oct 2025 05:14:02 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4A40C6814C for ; Tue, 14 Oct 2025 05:14:00 -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 IDkj-PHqrGsI for ; Tue, 14 Oct 2025 05:14:00 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.47; helo=mail-io1-f47.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by mail.u-boot.org (Postfix) with ESMTPS id 4611D68153 for ; Tue, 14 Oct 2025 05:13:56 -0600 (MDT) Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-911520e43edso226637639f.0 for ; Tue, 14 Oct 2025 04:13:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440435; x=1761045235; 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=53URjMUJjo4REOpHPJ/VWmqPiBeIEwqHacz9brS8/7E=; b=UYm3EVwNpm6lOdmDsG398O298TxWTFCyAuRp2n7juTOxTU+ixdbEDHUwRB8qOOJfPR hv+aLJY6uiwUWkBlLAkDqKiUx2VNEmvhukpfyrD8Z9ShXNC7fPEyEdYI58I0+p0lAyP9 jZ0xt4PHBUaSpS6F6OSB4kxQxRgxz5PVMgAzk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440435; x=1761045235; 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=53URjMUJjo4REOpHPJ/VWmqPiBeIEwqHacz9brS8/7E=; b=PDNwoNeq/ESJLGj4Zi35qxwkUxdjWizqqLcb1QWR3YPkqe8MK8yCA40nfpbxrBnzt2 XS/MW5ObBlFtUKcH/XkMge3Ao/QfhV4eCPSE2PsyUgIHhVJvyyiex3r/v9axZkUzMX6W Ww9kjm8/KkCs39U5V/JiINoSRgnBsDwcoku3mqHfutosBmMlo1M7Vud88D6kHzNTye5P rXUwdtzkVX5Syka9RhjFsRU7gOK0yZiqKG+L7+iabzYw8OZ+h0Leec/GgZIh9xfxpSgZ psLZtWkmcA0LdoumC8WfP33L5rWD5tmf4EGQjnL8FGfdm50xKAOtrQJJY24qIN/TyLz3 OAAw== X-Gm-Message-State: AOJu0Yy3CGTWveRRcdUeAww4FBYmVmAJsFaEzMD8p712ukF8wkMIgasG i9Gp2figoqW8ZvVRetbZA5sFA2S3Aq5PSV1J9wTaBG93LMq7xiOIZ7ccfdsDsr3xqaF+MWF+7Db 4gqWt+sNTZHY= X-Gm-Gg: ASbGncsOJKpMQkVlesn8dl8+7jHWCqhbdbnuVPyfnJrOVN2Ck1Su8AFXEjCQQUcMUmU k7S9g3uXI3BVDx9/sJDTGtzLU5mPAG+rrFwS/yQ3xaLnbZodXRcWXPtLbu5JwCEjMDOVnMi3hNK js0yGErDFFnXlqpo0QvIYMPDoSTJNg2x/Ygp4HxANP0N61anOwDlEFmSI30v5SlsnzWvntaFDq9 4a0/DYFcBdkhKZm8h9Ar1/y8L2o2etYgRKfeDJx54U14ukMf/on3bm0uAxLMc2ByntjfopLIOIT 6Kqv0ZtBKAbKS2sHhoXtI1VVAHUfW7CZ6I6QHAqKjFmysVfmqW4D2xIvbkenbbYMBYdEcQr/ZH0 Z9KsfsL9J5TVSLif4YK/inu/G4dEpXLOiEBD20Rb3nhiuSA== X-Google-Smtp-Source: AGHT+IEH4yNrQUHb326dhn0p0lx0PVX/e77iMAAm0FYPAdF+VWiuDKD+0kspfm7ixDEvpnCs5KYoNw== X-Received: by 2002:a05:6e02:178b:b0:425:744b:52d3 with SMTP id e9e14a558f8ab-42f87380d9dmr250198245ab.11.1760440435096; Tue, 14 Oct 2025 04:13:55 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:53 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:52 -0600 Message-ID: <20251014111301.1059317-16-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: VDYQHJU6OGPBQSF57GLGS7K5T4WBCE5O X-Message-ID-Hash: VDYQHJU6OGPBQSF57GLGS7K5T4WBCE5O 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 15/16] boot: Explicitly set up the theme with the boot 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: Set up the theme colour and apply it in bootflow_menu_set_props() so that the simple menu always looks the same when selected. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index 2f60ccd59ce..d731a8a8c8c 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -62,6 +62,7 @@ static int bootflow_menu_set_item_props(struct scene *scn, int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, const char *title) { + struct expo_theme *theme = &exp->theme; struct abuf *buf; int ret = 0; bool use_font; @@ -133,6 +134,13 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, /* tell the menu to lay out its objects */ scene_obj_set_manual(scn, OBJ_MENU, false); + scene_obj_set_hide(scn, OBJ_POINTER, false); + + theme->white_on_black = true; + ret = expo_apply_theme(exp, true); + if (ret) + return log_msg_ret("mat", ret); + expo_set_mouse_enable(exp, false); exp->show_highlight = true; From patchwork Tue Oct 14 11:12:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 600 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=g2VVTX/o; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EE1D16814E for ; Tue, 14 Oct 2025 05:14:02 -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 GeKgQaCZo1EA for ; Tue, 14 Oct 2025 05:14:02 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D2FCD68150 for ; Tue, 14 Oct 2025 05:14:02 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 546BC6814C for ; Tue, 14 Oct 2025 05:14:00 -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 vqWnS8DtaWWq for ; Tue, 14 Oct 2025 05:14:00 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.171; helo=mail-il1-f171.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by mail.u-boot.org (Postfix) with ESMTPS id 1E4F8680C5 for ; Tue, 14 Oct 2025 05:13:59 -0600 (MDT) Received: by mail-il1-f171.google.com with SMTP id e9e14a558f8ab-430a4322b12so3536285ab.0 for ; Tue, 14 Oct 2025 04:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440438; x=1761045238; 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=qyNGzIyi1exC3acWhLfboj7KMLKniiw39cqvn7Mmeig=; b=g2VVTX/o/LMq5ouh7QYsHtuB+GqyYDNpxs/ry/DbCq4rydRkDXAYbmKIErQbgyl5G4 AU8SLQsMoRmkg8NH/QQDIZBmZgpPgaeiZ1b6s9PqYRHyp/uphmTqXMCZ/ahd832SyzJC U3omHVdNg9s9vS0/JVnkRpO5K/yCJW2hOKD+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440438; x=1761045238; 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=qyNGzIyi1exC3acWhLfboj7KMLKniiw39cqvn7Mmeig=; b=k6qhtFD3DIMQGKKAvKuHljvHS+TEF7aGTV98L1A9TNdJA83uQfCh7WxEyXCFimg2xX ankhmjs2CV+J3zKi62bKnZfz5RkxOdyO9whXfWplMNfemuS6iUmrgUL3vP8rQBuMXhHd ccBETcDz+YRmaDmwY/gwsqXMBRSkmyICKp0uhP5raHWbOXDshwhbhBkObZfzt5QmA3S5 bENdQsWkzDZbabvo0YewxXqm8lesvnuq/HHmP6Po5PX5eHfAtIONm4CSML6IPcBdaNkh cYWSs8ubc8eOOMtLy1prt6T/tdwbOG+fX6XNNYl2aUd+gKLZKsk0ItHy4+6khUp/HhAk pnqw== X-Gm-Message-State: AOJu0YzoyjpWExW5nyKTn4P4zGOkR8LpyO30j+M6sE2lzoNDhUNlfbAb 9QvwWrshJuOFgDbtEw9P6jcDHzDCQvvPxzEIyaXyKbYhM0mU/S3YkmPbg59jidj0LEZV1d8FRzL 3XgipFr1f1bQ= X-Gm-Gg: ASbGncsHoQltUJrzmvOk6hv6AYsPnszwqVB1xqMyNSJXjH12nvlxtjeif67dubJcCSr MpZ/uVy8KM88CC/ZxxLFcZDmM3fj+XgRt9RTcA4nRmGC4T4ibsBew2FRr5lWjSzXBFF0jjtOjyt x4VBGNOwckm1cjAY0KO98nplYokmLDeO+pRMl4q/iM1p5QpRS0vXctghADMIfDQlbr0SQS7sKgg kU72g9cvzXBQHnyjkt2ilwf3cqOWjWbjf1120a+MxDl5KvsKo7vzzbqZ4Z/UyV5kDYS9s4z8M4D GUu9Nqk5XFm5B42Cbcb+ZrOKLGfTgbVGdGeQ/kmRuWHcXR6Nqnh8n41CbG8E9PSmRr2vTu8fuL5 c9xpsJ3mvWtl+d6dO369zuugPHlEFNhXP/Nk= X-Google-Smtp-Source: AGHT+IES6fcQq0jVPVodIbHSJ5yVUxPq0XdyibawhIc5nYmoadoDq2Ug1oPa0MfIsOyYWgKRVua5ZQ== X-Received: by 2002:a05:6e02:18cb:b0:430:a5e3:fd69 with SMTP id e9e14a558f8ab-430a5e3ff03mr12214495ab.12.1760440437925; Tue, 14 Oct 2025 04:13:57 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:56 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:53 -0600 Message-ID: <20251014111301.1059317-17-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: ZVT37GS6UFLQAY6UMQVFMY4XTYBFRZ6D X-Message-ID-Hash: ZVT37GS6UFLQAY6UMQVFMY4XTYBFRZ6D 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 16/16] boot: Set the item properties with the boot 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: Initially there may be no items. But when switching to the basic menu there may well be items already present. Set up their properties so that they follow the basic-menu theme. Signed-off-by: Simon Glass --- boot/bootflow_menu.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c index d731a8a8c8c..161c5a42401 100644 --- a/boot/bootflow_menu.c +++ b/boot/bootflow_menu.c @@ -63,8 +63,10 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, const char *title) { struct expo_theme *theme = &exp->theme; + struct menu_priv *priv = exp->priv; + struct bootstd_priv *std; struct abuf *buf; - int ret = 0; + int i, ret = 0; bool use_font; ret |= scene_obj_set_bbox(scn, OBJ_BOX, 30, 90, 1366 - 30, 720); @@ -145,6 +147,21 @@ int bootflow_menu_set_props(struct expo *exp, struct scene *scn, bool has_logo, exp->show_highlight = true; + ret = bootstd_get_priv(&std); + if (ret) + return ret; + + for (i = 0; i < priv->num_bootflows; i++) { + const struct bootflow *bflow; + + bflow = alist_get(&std->bootflows, i, struct bootflow); + if (!bflow) + return log_msg_ret("bmb", -ENOENT); + ret = bootflow_menu_set_item_props(scn, i, bflow); + if (ret) + return log_msg_ret("mst", ret); + } + return 0; }