Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6D97C77B7A for ; Thu, 1 Jun 2023 16:24:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6EA478630B; Thu, 1 Jun 2023 18:24:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dOjExKZg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1ED098615F; Thu, 1 Jun 2023 18:24:14 +0200 (CEST) Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D16C68615F for ; Thu, 1 Jun 2023 18:24:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-33bea381adcso3627575ab.3 for ; Thu, 01 Jun 2023 09:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685636649; x=1688228649; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QCBMD6OeHzGoT68wDc6kW0VMttfWgV0DPW1us+WvzFk=; b=dOjExKZg4wWoilfcPQh69OaqhuyIymF8nHiXwago8pPRcMgZJFNumho3pM+f7Rwf5A nVJPQHXS+9+ttGKCc1EdKgIp2iycoqRxJ+6MAlPFtbkwycNGk4A+5YSHyHWYE0aQgvis shRYW1NztmX9EPrSKfSX14zt/FsolCgfzj91E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685636649; x=1688228649; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QCBMD6OeHzGoT68wDc6kW0VMttfWgV0DPW1us+WvzFk=; b=Z9hTlvORKa5Z7iCA4aGSNjM5O/3xPisdX0w6LxALRGjKsq5Ju6auJJSRpWMWmALiRX YDnv+yzDVC6FFRFAUFlal4/LHoKJwv3H9uuxma1mtfviuzBhRxQdc9JMuuZWudQiTAf1 tqNN2UCW8+YK1wyORsLsjj5bZBty/olaa3PYBZroWXxdPc72lTrTFAzFNpB8NyYaM3Gd IinVxN2sdyS+egBGEyQi69DPr2S+tzj8+8ws/QhK8iIuODMRcpYVviwtEaSZgFl0BqLP BhjdW+1euv2F5xtMBSjQGuyPey6q0IXI0ZOb3LMBarjJK4yJSHqQEdvV08xAsnkT8y6E lyuA== X-Gm-Message-State: AC+VfDycYSVB3oUF87K0NBQ4NNw0Z3c0J8lxI5NrSrHdpFv/W19aIVvo CMuTjWE0Uur6lEOIuNNOaimat7S9+EjleLni/tI= X-Google-Smtp-Source: ACHHUZ6uh+cFbQZjcSdqmrk5ZVxXgqnus8fSZX6qUBhJbQ7PsM18NJICvTImwifNrnw5pZKgSx/tcw== X-Received: by 2002:a92:d581:0:b0:33b:848:378b with SMTP id a1-20020a92d581000000b0033b0848378bmr6413847iln.8.1685636649341; Thu, 01 Jun 2023 09:24:09 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id l1-20020a922901000000b0033a6e7ee4e3sm3862098ilg.1.2023.06.01.09.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 09:24:08 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass , Alper Nebi Yasak , Anatolij Gustschin , Heiko Schocher , Jan Kiszka , Jerry Van Baren , Marek Vasut , Neha Malcom Francis , Pavel Herrmann , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH 00/40] expo: Add an initial configuration editor Date: Thu, 1 Jun 2023 10:22:24 -0600 Message-ID: <20230601162404.220488-1-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This series provides a means to edit board configuration in U-Boot in a graphical manner. It supports multiple menu items and allows moving between them and selecting items. The configuration is defined in a data format so that code is not needed in most cases. This allows the board configuration to be provided in the devicetree. This is still at an early stage, since it only supports menus. Numeric values are not supported. Most importantly it does not yet support loading or saving the configuration selected by the user. To try it out you can use something like: ./tools/expo.py -e test/boot/files/expo_layout.dts \ -l test/boot/files/expo_layout.dts -o cedit.dtb ./u-boot -Tl -c "cedit load hostfs - cedit.dtb; cedit run" Use the arrow keys to move between menus, enter to open a menu, escape to exit. Various minor fixes and improvements are provided in this series: - Update STB TrueType library to latest - Support clearing part of the video display - Support multiple livetrees loaded at runtime - Support loading and allocating a file - Support proper measuring of text in expo - Support simple themes for expo This series is available at u-boot-dm/cedit-working Simon Glass (40): binman: Correct coverage gap in control expo: Correct some header-file comments expo: Convert to using a string ID for the scene title sandbox: Fix quiting when the LCD window is closed test: Restore test behaviour on failure gpio: Avoid using an invalid ofnode dm: core: Avoid registering an inaccessible tree video: Drop #ifdefs from console_truetype video: Provide a way to clear part of the console expo: Store the console in the expo expo: Avoid automatically arranging the scene console: Correct truetype spacing error expo: Rename exp_set_text_mode() fs: Create functions to load and allocate a file cat: Update command to use fs_load_alloc() fdt: Align the start of the livetree fdt: Clarify the fdt pre-relocation warning fdt: Allow more general use of livetree bootstd: Add a separate log category for expo video: Correct docs for video_index_to_colour() video: Allow temporary colour changes console: Allow measuring the bounding box of text expo: Allow setting the start of the dynamic-ID range video: Use enum with video_index_to_colour() expo: Add width and height to objects expo: Use flags for objects expo: Calculate text bounding-box correctly expo: Set up the width and height of objects expo: Support simple themes expo: Move menu-item selection into a function expo: Support drawing of popup menus expo: Rename EXPOACT_POINT to EXPOACT_POINT_ITEM expo: Draw popup menus in both opened and closed states expo: Draw the current opened menu on top expo: Implement the keypress logic for popup menus expo: Add spacing around menus and items expo: Support building an expo from a description file expo: Add a configuration editor expo: Add tests for the configuration editor RFC: video: Update stb_truetype arch/sandbox/cpu/sdl.c | 3 +- arch/sandbox/dts/cedit.dtsi | 64 + arch/sandbox/dts/sandbox.dtsi | 6 + arch/sandbox/dts/test.dts | 13 + boot/Kconfig | 14 + boot/Makefile | 3 +- boot/bootflow_menu.c | 6 +- boot/bootmeth-uclass.c | 30 +- boot/cedit.c | 163 +++ boot/expo.c | 102 +- boot/expo_build.c | 401 +++++ boot/scene.c | 361 ++++- boot/scene_internal.h | 84 +- boot/scene_menu.c | 290 +++- cmd/Kconfig | 9 + cmd/Makefile | 1 + cmd/cat.c | 47 +- cmd/cedit.c | 93 ++ common/log.c | 1 + configs/sandbox_defconfig | 1 + doc/develop/expo.rst | 305 +++- doc/usage/cmd/cedit.rst | 31 + doc/usage/index.rst | 1 + drivers/core/ofnode.c | 27 +- drivers/gpio/gpio-uclass.c | 2 +- drivers/video/console_truetype.c | 259 ++-- drivers/video/stb_truetype.h | 2257 ++++++++++++++++++++++++++--- drivers/video/vidconsole-uclass.c | 42 + drivers/video/video-uclass.c | 54 +- fs/fs.c | 58 + include/dm/of.h | 2 + include/dm/ofnode.h | 10 + include/expo.h | 209 ++- include/fs.h | 38 + include/log.h | 2 + include/of_live.h | 10 + include/test/cedit-test.h | 29 + include/test/ut.h | 36 +- include/video.h | 22 +- include/video_console.h | 78 + lib/of_live.c | 11 +- test/boot/expo.c | 241 ++- test/boot/files/expo_layout.dts | 84 ++ test/dm/ofnode.c | 45 + test/dm/video.c | 6 +- test/py/tests/test_ut.py | 10 + tools/binman/control.py | 2 +- tools/expo.py | 130 ++ 48 files changed, 5110 insertions(+), 583 deletions(-) create mode 100644 arch/sandbox/dts/cedit.dtsi create mode 100644 boot/cedit.c create mode 100644 boot/expo_build.c create mode 100644 cmd/cedit.c create mode 100644 doc/usage/cmd/cedit.rst create mode 100644 include/test/cedit-test.h create mode 100644 test/boot/files/expo_layout.dts create mode 100755 tools/expo.py -- 2.41.0.rc0.172.g3f132b7071-goog