From patchwork Mon Dec 8 02:32:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 840 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765161205; bh=GnjBrIChJOERqSSgd/u+AxKRZwSlqC2Ge3lXmly+u+U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=wxOefq0fzG7bOw8/6ZKaAN2XGa50dmvFZv4ueZvl8urvtetsA/AyU0jXBkJxghN+f o/z7F7eluIj34/cxTP1Sc6yqEvaqbKyqZ0+Y4mqiss/zyvMhgXIUCt/swX2ngCOqFh rhniPRdo5VywUa6zQtVv2GiRXRAZVt77leDcGCJsYdJ1XhK88529qSxTJTwrmtKPki TKPRj3qDiM1xtwWWmmvsLqTQea0OgTy43Ca1myLhfxd9voguc/Qe7kcYsumgLLFiJf lNZD0h7n1ZPPBLYuarEYP8kL3hv/j56ruUb8jIe+MerMmtz6tDE5k+JUkEQ07YpXJE DU5uplMbxxPSw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ABE39689C7 for ; Sun, 7 Dec 2025 19:33:25 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id viVKqs4JPWGD for ; Sun, 7 Dec 2025 19:33:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765161205; bh=GnjBrIChJOERqSSgd/u+AxKRZwSlqC2Ge3lXmly+u+U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=wxOefq0fzG7bOw8/6ZKaAN2XGa50dmvFZv4ueZvl8urvtetsA/AyU0jXBkJxghN+f o/z7F7eluIj34/cxTP1Sc6yqEvaqbKyqZ0+Y4mqiss/zyvMhgXIUCt/swX2ngCOqFh rhniPRdo5VywUa6zQtVv2GiRXRAZVt77leDcGCJsYdJ1XhK88529qSxTJTwrmtKPki TKPRj3qDiM1xtwWWmmvsLqTQea0OgTy43Ca1myLhfxd9voguc/Qe7kcYsumgLLFiJf lNZD0h7n1ZPPBLYuarEYP8kL3hv/j56ruUb8jIe+MerMmtz6tDE5k+JUkEQ07YpXJE DU5uplMbxxPSw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9C3CB689C2 for ; Sun, 7 Dec 2025 19:33:25 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765161204; bh=eFEEA+tkc4lEZQHUI2bV+JVX7Q9Id117CoExaaxI7zk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rClOcjlo9r49SxkG5SX0HpKkiFhN+0rJsoAQRQBevwraLKgTa0TXLxbMvzhprLbYy 6WZlAX+lPrxISQGn3YBboYVUbLFZ54WhztV7emfn+xcsPfvdoRlJ4BdrA2GyXxhPbt Tk0ZNKDiscYMMtv4tDrfKlRAimitvYmolPAjzVYiiWJR2tdi0zQ6i3dn0xfUi1HpfO 7VFt2HjGSjaLrF7AdpKfpN73FMEO1sy0AECF3AYX/P3WZmsUtirD341rO+p6bszGp0 2E4vf4KYNUz+Xg0iIWoWwdmIu6o56RUnYx5wocDAlaC0pytDdD7xDJkao7D8EkLXMG OYbhimS/wVCTA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 999936894D; Sun, 7 Dec 2025 19:33:24 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id HX9t4bASvcfl; Sun, 7 Dec 2025 19:33:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765161199; bh=/8IkOUgWKBRtC/LnGWAMtBNLFEgLgyayQd+1POfJ58s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Si74j7jcJjJHhWYSLiq2QZZv8S8HV7izN4YJ1t/Qn7Os3FxO3hCcDXpDD9FPNEOZu u/gn6f5iHROp4gzBbJIpY/AbDgAjEwNX68SBRaNjNUJmDjX8mGSjk/oNnPJNiI2t4w SMa3EYPgq6hq12sXIlMFKaszKmORQ9Wcsuogyb7fole/l8hpLwL0m4BRZ7eks1A7r0 WXTEISj3nfkHvFRWQXJqfTfw/RwrpY1YC8HxpIFC/Y2MnawNfjuwSoQ1Cg4/9/QXl0 bY6VgUuWyvnqWs2hT9ggM8UVTftNZk4JBJpjLJJLTxf2g6fADPjV6N12b/GonaHCyf m4N5LsZEUyHRw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 323C068900; Sun, 7 Dec 2025 19:33:19 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 7 Dec 2025 19:32:10 -0700 Message-ID: <20251208023229.3929910-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251208023229.3929910-1-sjg@u-boot.org> References: <20251208023229.3929910-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: DYVIHIRDHJV3BM7PKW5TQ4GR222TYSH2 X-Message-ID-Hash: DYVIHIRDHJV3BM7PKW5TQ4GR222TYSH2 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/19] bootctl: Show a lock symbol for locked disks List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass When an OS is using disk encryption, show a lock symbol next to it. Signed-off-by: Simon Glass --- boot/bootctl/multi_ui.c | 8 ++++++++ test/boot/bootctl/bootctl.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/boot/bootctl/multi_ui.c b/boot/bootctl/multi_ui.c index f663bcdac61..11e5a46c911 100644 --- a/boot/bootctl/multi_ui.c +++ b/boot/bootctl/multi_ui.c @@ -140,11 +140,15 @@ static int multiboot_set_item_props(struct scene *scn, int i, IMAGES_Y + 5); scene_obj_set_pos(scn, ITEM_VERIFIED + i, x + BOX_MARGIN + 40 + 32, IMAGES_Y + 80 + 21); + scene_obj_set_pos(scn, ITEM_LOCKED + i, + x + BOX_W - BOX_MARGIN - 24, IMAGES_Y + BOX_MARGIN); ret |= scene_obj_set_hide(scn, ITEM_PREVIEW + i, false); ret |= scene_obj_set_hide(scn, ITEM_BOX + i, false); ret |= scene_obj_set_hide(scn, ITEM_VERSION_NAME + i, false); ret |= scene_obj_set_hide(scn, ITEM_VERIFIED + i, false); + ret |= scene_obj_set_hide(scn, ITEM_LOCKED + i, + !(bflow->flags & BOOTFLOWF_ENCRYPTED)); /* Hide key in multiboot mode (not used with mouse) */ ret |= scene_obj_set_hide(scn, ITEM_KEY + i, true); @@ -422,6 +426,10 @@ static int multiboot_ui_add(struct udevice *dev, struct osinfo *info) logo = video_image_getptr(tick); ret |= scene_img(scn, "verified", ITEM_VERIFIED + seq, logo, NULL); + + logo = video_image_getptr(lock); + ret |= scene_img(scn, "locked", ITEM_LOCKED + seq, logo, + NULL); } ret = bootstd_get_priv(&std); diff --git a/test/boot/bootctl/bootctl.c b/test/boot/bootctl/bootctl.c index 532a73d6336..ff1a9722fe3 100644 --- a/test/boot/bootctl/bootctl.c +++ b/test/boot/bootctl/bootctl.c @@ -396,7 +396,7 @@ static int check_multiboot_ui(struct unit_test_state *uts, ut_assertok(bc_ui_add(ui_dev, &info[0])); ut_assertok(bc_ui_add(ui_dev, &info[1])); ut_assertok(bc_ui_render(ui_dev)); - ut_asserteq(13702, video_compress_fb(uts, vid_dev, false)); + ut_asserteq(17279, video_compress_fb(uts, vid_dev, false)); /* dump after render - buf2 is golden for multiboot_ui */ uc_priv = dev_get_uclass_priv(ui_dev); @@ -435,7 +435,7 @@ static int check_multiboot_ui(struct unit_test_state *uts, /* switch back to multiboot UI style and check against buf2 */ ut_assertok(bc_ui_switch_layout(ui_dev)); ut_assertok(bc_ui_render(ui_dev)); - ut_asserteq(13702, video_compress_fb(uts, vid_dev, false)); + ut_asserteq(17279, video_compress_fb(uts, vid_dev, false)); /* dump after switch back to multiboot - buf4 should match buf2 */ ut_assertok(membuf_new(&buf4, 4096));