From ae3695f691c6325f1a504ee3df7f22d75c7a0c96 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 29 Apr 2025 07:21:59 -0600 Subject: patman: Move capture_sys_output() into terminal and rename This function is sometimes useful outside tests. Also it can affect how terminal output is done, e.g. whether ANSI characters should be emitted or not. Move it out of the test_util package and into terminal. Signed-off-by: Simon Glass --- doc/develop/binman_tests.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/develop') diff --git a/doc/develop/binman_tests.rst b/doc/develop/binman_tests.rst index a632694a6fe..5e44686b8ad 100644 --- a/doc/develop/binman_tests.rst +++ b/doc/develop/binman_tests.rst @@ -431,11 +431,11 @@ error message produced by Binman. Sometimes you need to add several tests, each with their own broken image description, in order to check all the error cases. Sometimes you need to capture the console output of Binman, to check it is -correct. You can to this with ``test_util.capture_sys_output()``, for example: +correct. You can to this with ``terminal.capture()``, for example: .. code-block:: python - with test_util.capture_sys_output() as (_, stderr): + with terminal.capture() as (_, stderr): self._DoTestFile('071_gbb.dts', force_missing_bintools='futility', entry_args=entry_args) err = stderr.getvalue() @@ -572,7 +572,7 @@ In the above example, here are some possible steps: def testNxpImx8ImageMkimageMissing(self): """Test that binman can produce an iMX8 image""" - with test_util.capture_sys_output() as (_, stderr): + with terminal.capture() as (_, stderr): self._DoTestFile('339_nxp_imx8.dts', force_missing_bintools='mkimage') err = stderr.getvalue() -- cgit v1.2.3 From ec2482a24ac3a1d0beadae80bcb28c8d89b4c1ab Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 10 May 2025 13:05:18 +0200 Subject: patman: Add basic documentation for new features Describe the new subcommands and how they should be used in a normal workflow. Note that the naming of branches is very rigid, or 'opinionated' in marketing terms. Patman can track a single branch for each version of a series and they must all be named the same, except for the version-number suffix. Version 1 series have no suffix. This description is fairly bare-bones but should be enough for some initial testing and comments. Signed-off-by: Simon Glass --- doc/develop/pics/patman.jpg | Bin 0 -> 97131 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/develop/pics/patman.jpg (limited to 'doc/develop') diff --git a/doc/develop/pics/patman.jpg b/doc/develop/pics/patman.jpg new file mode 100644 index 00000000000..2dcf598e088 Binary files /dev/null and b/doc/develop/pics/patman.jpg differ -- cgit v1.2.3 From 0635004e2228dea0aab023d7c56b0b74633e8a3c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 May 2025 08:46:44 -0600 Subject: expo: Implement a box It is useful to be able to draw a box around elements in the menu. Add support for an unfilled box with a selectable thickness. Note that there is no support for selecting the colour for any expo objects yet. Signed-off-by: Simon Glass --- doc/develop/expo.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/develop') diff --git a/doc/develop/expo.rst b/doc/develop/expo.rst index cc7c36173db..8f63ccbe3ef 100644 --- a/doc/develop/expo.rst +++ b/doc/develop/expo.rst @@ -65,6 +65,8 @@ item is highlighted. A `textline object` contains a label and an editable string. +A `box object` is a rectangle with a given line width. It is not filled. + All components have a name. This is mostly for debugging, so it is easy to see what object is referred to, although the name is also used for saving values. Of course the ID numbers can help as well, but they are less easy to -- cgit v1.2.3 From 09f6f915fea90ea21a1a7b6a0a6907f89034dae1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 May 2025 08:46:45 -0600 Subject: expo: Support object alignment Add support for left, right and centred alignment for text, in the horizontal dimension. Also support top, bottom and centred in the vertical dimension, for the text object as a whole. Alignment is not yet implemented for images. It has no meaning for menus. A textline object uses a text object internally, so alignment is supported there. Provide some documentation to explain how objects are positioned. Signed-off-by: Simon Glass --- doc/develop/expo.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'doc/develop') diff --git a/doc/develop/expo.rst b/doc/develop/expo.rst index 8f63ccbe3ef..d6fc487e030 100644 --- a/doc/develop/expo.rst +++ b/doc/develop/expo.rst @@ -107,6 +107,37 @@ refer to objects which have been created. So a menu item is just a collection of IDs of text and image objects. When adding a menu item you must create these objects first, then create the menu item, passing in the relevant IDs. +Position and alignment +~~~~~~~~~~~~~~~~~~~~~~ + +Objects are typically positioned automatically, when scene_arrange() is called. +However it is possible to position objects manually. The scene_obj_set_pos() +sets the coordinates of the top left of the object. + +All objects have a bounding box. Typically this is calculated by looking at the +object contents, in `scene_calc_arrange()`. The calculated dimensions of each +object are stored in the object's `dims` field. + +It is possible to adjust the size of an object with `scene_obj_set_size()` or +even set the bounding box, with `scene_obj_set_bbox()`. The `SCENEOF_SIZE_VALID` +flag tracks whether the width/height should be maintained when the position +changes. + +If the bounding box is larger than the object needs, the object can be aligned +to different edges within the box. Objects can be left- or right-aligned, +or centred. For text objects this applies to each line of text. Normally objects +are drawn starting at the top of their bounding box, but they can be aligned +vertically to the bottom, or centred vertically within the box. + +Where the width of a text object's bounding box is smaller than the space needed +to show the next, the text is word-wrapped onto multiple lines, assuming there +is enough vertical space. Newline characters in the next cause a new line to be +started. The measurement information is created by the Truetype console driver +and stored in an alist in `struct scene_txt_generic`. + +When the object is drawn the `ofs` field indicates the x and y offset to use, +from the top left of the bounding box. These values are affected by alignment. + Creating an expo ---------------- -- cgit v1.2.3 From e005f18b933f3f4555fd08a4d66a1f9aee8f47e1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 2 May 2025 08:46:46 -0600 Subject: expo: Begin implementation of a text editor It is useful to be able to edit text, e.g. to allow the user to edit the environment or the command-line arguments for the OS. Add the beginnings of an implementation. Future work is needed to finish this: keypress handling and scrolling. For now it just displays the text. Signed-off-by: Simon Glass --- doc/develop/expo.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/develop') diff --git a/doc/develop/expo.rst b/doc/develop/expo.rst index d6fc487e030..b94340e9a8d 100644 --- a/doc/develop/expo.rst +++ b/doc/develop/expo.rst @@ -560,6 +560,7 @@ Future ideas Some ideas for future work: - Default menu item and a timeout +- Complete the text editor - Image formats other than BMP - Use of ANSI sequences to control a serial terminal - Colour selection -- cgit v1.2.3 From 309f77c33a95ce4e23a5c63b5904a7847d1b6347 Mon Sep 17 00:00:00 2001 From: Martin Schwan Date: Wed, 4 Jun 2025 14:15:30 +0200 Subject: doc: Add description for bootmeth rauc Add documentation for the bootmeth "rauc", which boots an A/B system with RAUC from MMC. Signed-off-by: Martin Schwan --- doc/develop/bootstd/index.rst | 1 + doc/develop/bootstd/overview.rst | 1 + doc/develop/bootstd/rauc.rst | 56 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 doc/develop/bootstd/rauc.rst (limited to 'doc/develop') diff --git a/doc/develop/bootstd/index.rst b/doc/develop/bootstd/index.rst index 4c4e26ccdb7..ec74fc2fb9d 100644 --- a/doc/develop/bootstd/index.rst +++ b/doc/develop/bootstd/index.rst @@ -12,5 +12,6 @@ Standard Boot qfw android cros + rauc script sandbox diff --git a/doc/develop/bootstd/overview.rst b/doc/develop/bootstd/overview.rst index 9fe5630ab16..0a237359575 100644 --- a/doc/develop/bootstd/overview.rst +++ b/doc/develop/bootstd/overview.rst @@ -443,6 +443,7 @@ Bootmeth drivers are provided for booting from various media: - :doc:`extlinux / syslinux ` boot from a storage device - :doc:`extlinux / syslinux ` boot from a network (PXE) - :doc:`sandbox ` used only for testing + - :doc:`RAUC distro `: A/B system with RAUC from MMC - :doc:`U-Boot scripts