From patchwork Sun Jan 18 20:42:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1596 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=1768769019; bh=mdO1icx33cmC1lqqY6gDUIgJVPANY+7eht9OCRPkpMQ=; 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=nl70YtGi9wEKbHXRiG/LKjjAnKGRCiXfA6SOQPiM4e5skoG6EymrJC8YPF8jo84ff atF9waiNUktjI8cAdC7OlH6S3SUn6i6jX9ETCIFxy9k0WRYD4afhb9KGjnjwjJE104 TbemSNXmxXQHPR7Vu/gynzG4OUtGPYS3VFdIRAkapuwKalNoITvfAASMSekCfnY++s CusEX0EFgOYwZGdoQ6PFJtH7XWIWUh5t7b/ppFCjVmF4g6rZTeZW3CQjG2840xlsLZ TLdFOBFXUeeVRgsvLtq2GqV2RE+Fg8G09ZNUvArfQJRtLKWXmVPQ01TUN9rFKCaMGV Xbqb5aMtYFZSw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E9E856949B for ; Sun, 18 Jan 2026 13:43:39 -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 05YNFRhDtuBD for ; Sun, 18 Jan 2026 13:43:39 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768769019; bh=mdO1icx33cmC1lqqY6gDUIgJVPANY+7eht9OCRPkpMQ=; 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=nl70YtGi9wEKbHXRiG/LKjjAnKGRCiXfA6SOQPiM4e5skoG6EymrJC8YPF8jo84ff atF9waiNUktjI8cAdC7OlH6S3SUn6i6jX9ETCIFxy9k0WRYD4afhb9KGjnjwjJE104 TbemSNXmxXQHPR7Vu/gynzG4OUtGPYS3VFdIRAkapuwKalNoITvfAASMSekCfnY++s CusEX0EFgOYwZGdoQ6PFJtH7XWIWUh5t7b/ppFCjVmF4g6rZTeZW3CQjG2840xlsLZ TLdFOBFXUeeVRgsvLtq2GqV2RE+Fg8G09ZNUvArfQJRtLKWXmVPQ01TUN9rFKCaMGV Xbqb5aMtYFZSw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D8C3A69494 for ; Sun, 18 Jan 2026 13:43:39 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768769019; bh=c0glyGhW2spS9/5G/6IwjLlnNbQnKNPu8p2El58CRr8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TN11MEUoSSqrIetCHYWcJtRpqhq+ctcLtgbdwFZSDroMLxAxVncPcFTos8c+akVvb PF14dhA9bRT5djTOWVyB2i32n97jlwKSagVG6U11zM/5o5hLBmk5mBuVgkdROOhP8w TkPVWt+cMLiOo8UlsUOlU+aBEM8BdkSLRnd8D6o3xnPBsECR0erbtfBz/eUigO9npW rFfDm1HlMTo2oz6UmsqaVnxLTiGiTtudbxWmzMNeG+ftflRErcLPG81nlffhu7jg7X tkcA2li1pClCGftfZbkAdIe2H0D79zRDjTfbW4amt+x/7rsUC+vE3FQI5rIdDByOYn Pz6BjjQhzKt/Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2CBFE6948C; Sun, 18 Jan 2026 13:43:39 -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 1DxilYQpxuO9; Sun, 18 Jan 2026 13:43:39 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768769015; bh=p5uyj91zpKlZyn6jIRmZp9yQxarnGlKvLx8a22YZtwk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b3AcFBaKA+Q4SOrDlGbiYpRzGsejsGJxuoVCUBSve3YY4IsRObkHNDESqyfpZZZx+ +5e2XH43R+5pCOh3IwdcKoyjBclgZQ40flXNbLthk9JDdfVaEYZcEd8ay+jFSFWu/U 1gykRixWHR5CHvsoOf8K9sb0hU8mpJ0wHf9+4HacKAGVtPSYWizY7APVkwM96bAiUM Acb3LRuivF8t/MRLx3KV7qp+HADZpvoMxvvc8FbuLWyZiUlwtAOes1gNNAswSyAiK1 gJm/95P8fGziK/sCN4wNJ5EE7WMgdTbKK7xG0cqJsUknX9hbtFkOQj5OadDc+jIICS Ubd+TUiNZNyJw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D64426946A; Sun, 18 Jan 2026 13:43:34 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 18 Jan 2026 13:42:44 -0700 Message-ID: <20260118204303.1982533-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260118204303.1982533-1-sjg@u-boot.org> References: <20260118204303.1982533-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: VVUL4CZGED5CWHE7LDEFJQRRAIVIHPDJ X-Message-ID-Hash: VVUL4CZGED5CWHE7LDEFJQRRAIVIHPDJ 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 05/16] expo: Wire up putch callback for textline editing 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 Add a scene_textline_putch() callback that outputs characters to the vidconsole using vidconsole_put_char(). Set this callback in scene_textline_open() so that CLI line editing output goes to the correct vidconsole rather than the default console. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- boot/scene_textline.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/boot/scene_textline.c b/boot/scene_textline.c index 20e2d7f33c4..082b39f2497 100644 --- a/boot/scene_textline.c +++ b/boot/scene_textline.c @@ -213,6 +213,22 @@ int scene_textline_render_deps(struct scene *scn, return 0; } +/** + * scene_textline_putch() - Output a character to the vidconsole + * + * This is used as the putch callback for CLI line editing, so that characters + * are sent to the correct vidconsole. + * + * @cls: CLI line state + * @ch: Character to output + */ +static void scene_textline_putch(struct cli_line_state *cls, int ch) +{ + struct scene *scn = container_of(cls, struct scene, cls); + + vidconsole_put_char(scn->expo->cons, ch); +} + int scene_textline_open(struct scene *scn, struct scene_obj_textline *tline) { struct udevice *cons = scn->expo->cons; @@ -232,6 +248,7 @@ int scene_textline_open(struct scene *scn, struct scene_obj_textline *tline) vidconsole_entry_start(cons); cli_cread_init(&scn->cls, abuf_data(&tline->buf), tline->max_chars); scn->cls.insert = true; + scn->cls.putch = scene_textline_putch; ret = vidconsole_entry_save(cons, &scn->entry_save); if (ret) return log_msg_ret("sav", ret);