From patchwork Fri Sep 19 20:14:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 28 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=1758312935; bh=NAe6H7i3fHElhT7lsfBeXW8KKLMQw1+n02GdCELRyEk=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=WnQnqNm8BnQdR0jh7aOf37BM4Kw0WkYuhErKw+L0qz5A23HeI0wn/CbwKjVhLoIvU xay14Xmdm2e99SYecvbw0oQqqBVD0qGv1ggpfJ+4oZdLA/VHl20+4iB56Su5UJZNj2 6ae+2xMRSn6iw7/7SdXcgMxydmPX88zue4RbxWJIGIaYindEWSp4F0FK1bV8tAJfyX pZ6zY+tgDRbMqqK+9pYU8XhorzQeSVdigXrOF7lIKJk+GwueTPrdAX+kEok/HZ8qng aKveki3XUf8YhZN/lOSo6crP0/cJT324+5AOY25b3DLd9asTMgih0hff2OBvqrKwfE YLncTeRBnvF1w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 862C267C5B for ; Fri, 19 Sep 2025 14:15:35 -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 F6vaWOU-RoLA for ; Fri, 19 Sep 2025 14:15:35 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312935; bh=NAe6H7i3fHElhT7lsfBeXW8KKLMQw1+n02GdCELRyEk=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=WnQnqNm8BnQdR0jh7aOf37BM4Kw0WkYuhErKw+L0qz5A23HeI0wn/CbwKjVhLoIvU xay14Xmdm2e99SYecvbw0oQqqBVD0qGv1ggpfJ+4oZdLA/VHl20+4iB56Su5UJZNj2 6ae+2xMRSn6iw7/7SdXcgMxydmPX88zue4RbxWJIGIaYindEWSp4F0FK1bV8tAJfyX pZ6zY+tgDRbMqqK+9pYU8XhorzQeSVdigXrOF7lIKJk+GwueTPrdAX+kEok/HZ8qng aKveki3XUf8YhZN/lOSo6crP0/cJT324+5AOY25b3DLd9asTMgih0hff2OBvqrKwfE YLncTeRBnvF1w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 75A8E67C0E for ; Fri, 19 Sep 2025 14:15:35 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312929; bh=5IPhd/ZIFxY5nAnviLqlm8ZYPC8RoSUS/so6mr3Px0U=; h=From:To:Cc:Subject:Date:From; b=GZ88CZ5lA8G0UqCnMPh/dqebLEh3rstt5zecLFVnsMaq2UrwLf2mbiw4OIft9PDIa pA88pZQ++INTNVPRUETQkhbvOy4at9cYgZQWRTSnv9xy9WTxVbHleIYfUQ2x0MNiYT rkBy+BFI46lzu+yIQSlz42zoVC+s6bI+srkO2O5DZDYb11gOTXd++wOpZphUTfZe7L sg1RT6ox20kd1NKJaOsFnOczMrR7puSujK2GfRVEYZuv1t5cWR9M+5LGM52TFwUetN L2bhsNtSQhZCB+KlhZhp8D+Gt7yg1oiZZEwIdG4TRJFGTZdTpShinij5N+FNi66PY/ Eq/glateUh2Sw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 53F1867B3B; Fri, 19 Sep 2025 14:15:29 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id B-4oS2Nkdbup; Fri, 19 Sep 2025 14:15:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758312924; bh=yJysMITl4NbcDqBD3x2felz9MaNu9qjDphwl4q2qpJk=; h=From:To:Cc:Subject:Date:From; b=nE/UUbMcgs6nrzai+t8Du0+zHU55frBEwAPYJ5QhGZJzhQWVCjt67wt/yyRFguMmz kL+SSswXlG7X8IBopsVzAUaMM8vvqWHjr2RPNn1Ad8g1tMkp/izeqZuRrUBec4hrIw VdpCVffl7bjJUGcf0nQQgS/2DR7lGDpPqv/SqQQ1MhYJ3e+iAATu75zFBA8zSDm0kw nSf8O7q+lP+1i0aomuMSZuEKnwgPWMpkZ+PmOZI6oZh6eGIbhPiq2AaahY8QOt3Nwm QmgnIUmycR1J1AmhkPAIBItrLuqMtDLDHc62G+IBA/1Z5vVwfNESUuKpuVlUCXjrc4 pXDlSggaqoGOQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 06BEB67A99; Fri, 19 Sep 2025 14:15:23 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 19 Sep 2025 14:14:07 -0600 Message-ID: <20250919201507.4024144-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 57JSFEM7SYFWWZD7XH6ZNGXRSMCQJHSN X-Message-ID-Hash: 57JSFEM7SYFWWZD7XH6ZNGXRSMCQJHSN X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/42] video: Support a cursor more generally 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 At present U-Boot does not support displaying a cursor on the console, except with expo. It is quite useful to have a cursor, particularly when using the command-line editor. This series adds tracking of the cursor position for both truetype and normal consoles. The cursor is shown when U-Boot is idle and is removed before writing characters to the display. A save-buffer ensures that the old display contents are provided. Some related improvements in this series include: - expo lineedit support with normal console - arrow keys now render correctly when editing commands with truetype - truetype console now also supports bitmap fonts The cursor is not currently supported for rotated consoles. A README for claude is provided, although so far I have not had too much success with it. A fix for an intermittent build is added as well, along with silencing some build messages noticed from Rust ulib. Simon Glass (42): Provide a README for Claude cyclic: Avoid showing messages when debugging video: Correct ops check for nominal, entry save/restore Makefile: Silence the example Rust build scripts: Fix conditional syntax for capsule ESL generation test: video: Split long strings video: Provide an option to enable the cursor snow: link: Disable the cursor video: console: Put fixed-font rendering into a shared file video: truetype: Rename the FONT_ENTRY() macro video: Move setting of the bitmap font into uclass video: Allow selection of bitmap fonts in truetype video: truetype: Handle rendering of bitmap fonts video: truetype: Use common cursor-drawing code video: Correct cursor handling when the the left side video: Convert to use uclass_id_foreach_dev() video: Provide an idle function for the console video: Provide state for the cursor video: Rename draw_cursor_vertically() to cursor_show() video: Update cursor_show() to take a simple pointer video: Move cursor drawing into the uclass video: Track the current CLI index video: Provide a way to indicate the start of CLI entry console: Add debugging for kerning video: truetype: Record the position where CLI entry starts video: truetype: Track characters and their widths expo: Enable the cursor when editing a textline video: Track whether the cursor is enabled video: Drop vidconsole_set_cursor_visible() video: Update normal console to use tracking information video: Add save and restore drivers for normal console video: Drop extra parameters from get_cursor_info() video: Support a cursor in multi-line text video: Drop extra parameters from vidconsole_show_cursor() video: Provide a buffer to hold pixels behind the cursor video: Support reading the framebuffer when writing video: Save overwritten pixels when drawing the cursor video: Show the cursor when idle video: truetype: Clear after the current char on insert video: truetype: Avoid clearing on backspace video: Add some notes about the cursor console: Add some cursor tests .claude/.gitignore | 1 + .claude/README.md | 69 ++++++ .gitignore | 1 + boot/scene_textline.c | 9 +- cmd/font.c | 3 - common/Kconfig | 9 + common/cli_readline.c | 5 + common/cyclic.c | 5 +- configs/chromebook_link_defconfig | 1 + configs/snow_defconfig | 1 + doc/usage/cmd/font.rst | 16 +- drivers/video/Kconfig | 8 + drivers/video/console_core.c | 195 ++++++++++++++--- drivers/video/console_normal.c | 140 ++++++++---- drivers/video/console_truetype.c | 326 ++++++++++++++++++---------- drivers/video/vidconsole-uclass.c | 176 ++++++++++++++- drivers/video/vidconsole_internal.h | 77 ++++++- drivers/video/video-uclass.c | 30 ++- examples/rust/Makefile | 3 - include/video_console.h | 164 ++++++++++++-- scripts/Makefile.lib | 5 +- test/cmd/font.c | 15 +- test/dm/video.c | 162 +++++++++++++- 23 files changed, 1173 insertions(+), 248 deletions(-) create mode 100644 .claude/.gitignore create mode 100644 .claude/README.md