summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/README.omap-ulpi-viewport27
-rw-r--r--doc/api/efi.rst6
-rw-r--r--doc/board/thead/lpi4a.rst58
-rw-r--r--doc/develop/binman_tests.rst6
-rw-r--r--doc/develop/cyclic.rst13
-rw-r--r--doc/develop/expo.rst34
-rw-r--r--doc/develop/pics/patman.jpgbin0 -> 97131 bytes
-rw-r--r--doc/develop/pytest/index.rst10
-rw-r--r--doc/develop/pytest/usage.rst24
-rw-r--r--doc/develop/release_cycle.rst2
-rw-r--r--doc/usage/cmd/setexpr.rst5
-rw-r--r--doc/usage/cmd/test.rst102
-rw-r--r--doc/usage/cmd/wget.rst2
-rw-r--r--doc/usage/index.rst1
14 files changed, 245 insertions, 45 deletions
diff --git a/doc/README.omap-ulpi-viewport b/doc/README.omap-ulpi-viewport
deleted file mode 100644
index a5240b9e295..00000000000
--- a/doc/README.omap-ulpi-viewport
+++ /dev/null
@@ -1,27 +0,0 @@
-Reference code ""drivers/usb/ulpi/omap-ulpi-viewport.c"
-
-Contains the ulpi read write api's to perform
-any ulpi phy port access on omap platform.
-
-On omap ehci reg map contains INSNREG05_ULPI
-register which offers the ulpi phy access so
-any ulpi phy commands should be passsed using this
-register.
-
-omap-ulpi-viewport.c is a low level function
-implementation of "drivers/usb/ulpi/ulpi.c"
-
-To enable and use omap-ulpi-viewport.c
-we require CONFIG_USB_ULPI_VIEWPORT_OMAP and
-CONFIG_USB_ULPI be enabled in config file.
-
-Any ulpi ops request can be done with ulpi.c
-and soc specific binding and usage is done with
-omap-ulpi-viewport implementation.
-
-Ex: scenario:
-omap-ehci driver code requests for ulpi phy reset if
-ehci is used in phy mode, which will call ulpi phy reset
-the ulpi phy reset does ulpi_read/write from viewport
-implementation which will do ulpi reset using the
-INSNREG05_ULPI register.
diff --git a/doc/api/efi.rst b/doc/api/efi.rst
index 43d6f936fb0..a98298f93dc 100644
--- a/doc/api/efi.rst
+++ b/doc/api/efi.rst
@@ -178,6 +178,12 @@ Driver binding protocol
.. kernel-doc:: include/efi_driver.h
:internal:
+Device paths
+------------
+
+.. kernel-doc:: include/efi_device_path.h
+ :internal:
+
Unit testing
------------
diff --git a/doc/board/thead/lpi4a.rst b/doc/board/thead/lpi4a.rst
index e395c6ae12c..7e4c4ea81ee 100644
--- a/doc/board/thead/lpi4a.rst
+++ b/doc/board/thead/lpi4a.rst
@@ -32,6 +32,8 @@ Mainline support
The support for following drivers are already enabled:
1. ns16550 UART Driver.
+2. eMMC and SD card
+
Building
~~~~~~~~
@@ -43,15 +45,32 @@ Building
export CROSS_COMPILE=<riscv64 toolchain prefix>
-The U-Boot is capable of running in M-Mode, so we can directly build it.
+3. Build DDR firmware
+
+DDR driver requires a firmware to function, to build it:
+
+.. code-block:: bash
+
+ git clone --depth 1 https://github.com/ziyao233/th1520-firmware
+ cd th1520-firmware
+ lua5.4 ddr-generate.lua src/<CONFIGURATION_NAME>.lua th1520-ddr-firmware.bin
+
+4. Build U-Boot images
+
+The U-Boot is capable of running in M-Mode, so we can directly build it without
+OpenSBI. The DDR firmware should be copied to U-Boot source directory before
+building.
.. code-block:: console
cd <U-Boot-dir>
+ cp <path-to-ddr-firmware> th1520-ddr-firmware.bin
make th1520_lpi4a_defconfig
make
-This will generate u-boot-dtb.bin
+This will generate u-boot-dtb.bin and u-boot-with-spl.bin. The former contains
+only proper U-Boot and is for chainloading; the later contains also SPL and
+DDR firmware and is ready for booting by BROM directly.
Booting
~~~~~~~
@@ -61,7 +80,7 @@ and chain load the mainline u-boot image either via tftp or emmc storage,
then bootup from it.
Sample boot log from Lichee PI 4A board via tftp
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: none
@@ -127,3 +146,36 @@ Sample boot log from Lichee PI 4A board via tftp
Err: serial@ffe7014000
Model: Sipeed Lichee Pi 4A
LPI4A=>
+
+SPL support is still in an early stage and not all of the functionalities are
+available when booting from mainline SPL. When using mainline SPL,
+u-boot-with-spl.bin should be loaded to SRAM through fastboot.
+
+Sample boot log from Lichee PI 4A board via fastboot and mainline SPL
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: none
+
+ brom_ver 8
+ [APP][E] protocol_connect failed, exit.
+ Starting download of 636588 bytes
+
+ downloading of 636588 bytes finished
+
+ U-Boot SPL 2025.04-rc2-00049-geaa9fc99d4cd-dirty (Apr 26 2025 - 13:31:41 +0000)
+ Trying to boot from RAM
+
+
+ U-Boot 2025.04-rc2-00049-geaa9fc99d4cd-dirty (Apr 26 2025 - 13:31:41 +0000)
+
+ CPU: thead,c910
+ Model: Sipeed Lichee Pi 4A
+ DRAM: 8 GiB
+ Core: 30 devices, 9 uclasses, devicetree: separate
+ MMC: mmc@ffe7080000: 0, mmc@ffe7090000: 1
+ Loading Environment from <NULL>... OK
+ In: serial@ffe7014000
+ Out: serial@ffe7014000
+ Err: serial@ffe7014000
+ Model: Sipeed Lichee Pi 4A
+ LPI4A=>
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()
diff --git a/doc/develop/cyclic.rst b/doc/develop/cyclic.rst
index 6f1da6f0d9b..a99b17052f5 100644
--- a/doc/develop/cyclic.rst
+++ b/doc/develop/cyclic.rst
@@ -54,3 +54,16 @@ responsible for calling all registered cyclic functions, into the
common schedule() function. This guarantees that cyclic_run() is
executed very often, which is necessary for the cyclic functions to
get scheduled and executed at their configured periods.
+
+Idempotence
+-----------
+
+Both the cyclic_register() and cyclic_unregister() functions are safe
+to call on any struct cyclic_info, regardless of whether that instance
+is already registered or not.
+
+More specifically, calling cyclic_unregister() with a cyclic_info
+which is not currently registered is a no-op, while calling
+cyclic_register() with a cyclic_info which is currently registered
+results in it being automatically unregistered, and then registered
+with the new callback function and timeout parameters.
diff --git a/doc/develop/expo.rst b/doc/develop/expo.rst
index cc7c36173db..b94340e9a8d 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
@@ -105,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
----------------
@@ -527,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
diff --git a/doc/develop/pics/patman.jpg b/doc/develop/pics/patman.jpg
new file mode 100644
index 00000000000..2dcf598e088
--- /dev/null
+++ b/doc/develop/pics/patman.jpg
Binary files differ
diff --git a/doc/develop/pytest/index.rst b/doc/develop/pytest/index.rst
index 0a7c1b21a24..dce8a96370f 100644
--- a/doc/develop/pytest/index.rst
+++ b/doc/develop/pytest/index.rst
@@ -16,12 +16,6 @@ Individual tests
.. toctree::
:maxdepth: 1
+ :glob:
- test_000_version
- test_bind
- test_bootmenu
- test_bootstage
- test_button
- test_efi_loader
- test_net
- test_net_boot
+ test_*
diff --git a/doc/develop/pytest/usage.rst b/doc/develop/pytest/usage.rst
index 49d269d66a7..779b2dbe24b 100644
--- a/doc/develop/pytest/usage.rst
+++ b/doc/develop/pytest/usage.rst
@@ -522,3 +522,27 @@ of the `ubman.config` object, for example
Build configuration values (from `.config`) may be accessed via the dictionary
`ubman.config.buildconfig`, with keys equal to the Kconfig variable
names.
+
+A required configuration setting can be defined via a buildconfigspec()
+annotation. The name of the configuration option is specified in lower case. The
+following annotation for a test requires CONFIG_EFI_LOADER=y:
+
+.. code-block:: python
+
+ @pytest.mark.buildconfigspec('efi_loader')
+
+Sometimes multiple configuration option supply the same functionality. If
+multiple arguments are passed to buildconfigspec(), only one of the
+configuration options needs to be set. The following annotation requires that
+either of CONFIG_NET or CONFIG_NET_LWIP is set:
+
+.. code-block:: python
+
+ @pytest.mark.buildconfigspec('net', 'net lwip')
+
+The notbuildconfigspec() annotation can be used to require a configuration
+option not to be set. The following annotation requires CONFIG_RISCV=n:
+
+.. code-block:: python
+
+ @pytest.mark.notbuildconfigspec('riscv')
diff --git a/doc/develop/release_cycle.rst b/doc/develop/release_cycle.rst
index b68b462257d..36bb9055e6a 100644
--- a/doc/develop/release_cycle.rst
+++ b/doc/develop/release_cycle.rst
@@ -75,7 +75,7 @@ For the next scheduled release, release candidates were made on::
* U-Boot |next_ver|-rc2 was released on Mon 12 May 2025.
-.. * U-Boot |next_ver|-rc3 was released on Mon 26 May 2025.
+* U-Boot |next_ver|-rc3 was released on Mon 26 May 2025.
.. * U-Boot |next_ver|-rc4 was released on Mon 09 June 2025.
diff --git a/doc/usage/cmd/setexpr.rst b/doc/usage/cmd/setexpr.rst
index 593a0ea91e1..5bc37ae50fc 100644
--- a/doc/usage/cmd/setexpr.rst
+++ b/doc/usage/cmd/setexpr.rst
@@ -144,8 +144,9 @@ Configuration
* The *setexpr* command is only available if CMD_SETEXPR=y.
* The *setexpr fmt* sub-command is only available if CMD_SETEXPR_FMT=y.
-* The *setexpr gsub* and *setexpr sub* sub-commands are only available if
- CONFIG_REGEX=y.
+* The *setexpr gsub* and *setexpr sub* sub-commands are only available
+ if CONFIG_REGEX=y. For an overview of the supported regex syntax,
+ see :doc:`test`.
Return value
------------
diff --git a/doc/usage/cmd/test.rst b/doc/usage/cmd/test.rst
new file mode 100644
index 00000000000..d1379117fca
--- /dev/null
+++ b/doc/usage/cmd/test.rst
@@ -0,0 +1,102 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later
+
+.. index::
+ single: test (command)
+
+test command
+============
+
+Synopsis
+--------
+
+::
+
+ test <str-op> <s>
+ test <s1> <str-cmp> <s2>
+ test <n1> <num-cmp> <n2>
+ test ! <expr>
+ test <expr1> -o <expr2>
+ test <expr1> -a <expr2>
+ test -e <interface> <dev[:part]> <path>
+ test <s> =~ <re>
+
+Description
+-----------
+
+The ``test`` command is similar to the ordinary shell built-in by the
+same name. Unlike in ordinary shells, it cannot be spelled ``[``.
+
+Strings
+~~~~~~~
+
+The string tests ``-n`` and ``-z``, and string comparison operators
+``=``, ``!=``, ``<`` and ``>``, work exactly as in ordinary shells.
+
+Numbers
+~~~~~~~
+
+The number comparison operators ``-lt``, ``-le``, ``-gt``, ``-gt``,
+``-eq`` and ``-ne`` work as in ordinary shells.
+
+.. note::
+ Numbers are parsed with ``simple_strtol(, 0)``, meaning that they
+ are treated as decimal unless there is a `0x` prefix, any errors in
+ parsing are ignored, and parsing stops as soon as a non-digit (for
+ the selected base) is encountered. And most U-Boot commands that
+ generate "numeric" environment variables store them as hexadecimal
+ *without* a `0x` prefix.
+
+For example, this is not a correct way of testing whether a given file
+has a size less than 4KiB::
+
+ # Assuming readme.txt exists, sets 'filesize' environment variable
+ $ size mmc 0:1 readme.txt
+ $ if test "$filesize" -lt 4096 ; then ...
+
+If the file size is actually 8000 (decimal), its hexadecimal
+representation, and thus the value of ``$filesize``, is ``1f40``, so
+the comparison that is done ends up being "1 < 4096".
+
+Logic
+~~~~~
+
+The ``!`` operator negates the sense of the test of the expression
+``<expr>``.
+
+The ``-o`` and ``-a`` operators perform logical OR and logical AND,
+respectively, of the two expressions.
+
+File existence
+~~~~~~~~~~~~~~
+
+Like ordinary shells, the ``-e`` operator can be used to test for
+existence of a file. However, the U-Boot version takes three
+arguments:
+
+- The interface (e.g. ``mmc``).
+- The device number, possibly including a partition specification.
+- The usual path argument, which is interpreted relative to the root
+ of the filesystem.
+
+Regular expressions
+~~~~~~~~~~~~~~~~~~~
+
+When ``CONFIG_REGEX`` is enabled, an additional operator ``=~`` is
+available. This is similar to the same operator available with bash's
+extended test command ``[[ ]]``. The left operand is a string which is
+matched against the regular expression described by the right operand.
+
+The regular expression engine supports these features:
+
+- Anchoring ``^`` and ``$``, matching at the beginning/end of the
+ string.
+- Matching any single character (including whitespace) using ``.``.
+- Character classes ``[ ]``, including ranges ``[0-9]`` and negation
+ ``[^ /.]``.
+- Grouping ``( )``.
+- Alternation ``|``.
+- Postfix qualifiers ``*``, ``+`` and ``?`` and their non-greedy
+ variants ``*?``, ``+?`` and ``??``
+
+For extracting the parts matching a capture group and/or performing
+substitutions, including back references, see :doc:`setexpr`.
diff --git a/doc/usage/cmd/wget.rst b/doc/usage/cmd/wget.rst
index cc82e495a29..44033aaff39 100644
--- a/doc/usage/cmd/wget.rst
+++ b/doc/usage/cmd/wget.rst
@@ -141,9 +141,9 @@ https://cacerts.digicert.com/DigiCertTLSRSA4096RootG5.crt.
Bytes transferred = 1864 (748 hex)
# Another server not signed against Digicert will fail
=> wget https://www.google.com/
- Certificate verification failed
HTTP client error 4
+ Certificate verification failed
# Disable authentication to allow the command to proceed anyways
=> wget cacert none
=> wget https://www.google.com/
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 372ef56c967..c5b45fd9290 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -123,6 +123,7 @@ Shell commands
cmd/source
cmd/tcpm
cmd/temperature
+ cmd/test
cmd/tftpput
cmd/trace
cmd/true