Add some information about this new bootmeth, including how to enable it
and how it works.
Cover-letter:
boot: Enhance VBE to support a separate devicetree FIT
It is sometimes desirable to have the devicetrees packaged with firware,
or in a different FIT from the OS. This series adds support for this,
including a test.
The new bootmeth can automatically locate a state file and use that to
decide what images to use when booting. The OS must update the file
before rebooting, if a different selection is required.
For now there is no logic to deal with boot failures.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Create two new images (vbe0 and vbe1) containing the two types of VBE-OS
setups: with and without an OEM FIT. Put this in a new img/ subdirectory
since the test_ut.py file is getting quite large.
Most of the test is in C, with just the image-setup done in Python.
Signed-off-by: Simon Glass <sjg@chromium.org>
When booting an OS it is useful to be able to read devicetrees provided
by the OEM, from a separate FIT to the OS.
Add a new method which supports this, along with the usual A/B/recovery
flows, using a state file on the boot device.
Signed-off-by: Simon Glass <sjg@chromium.org>
If a load-only FIT has already provided a devicetree, PXE boot may need
to restart the bootm sequence, rather than starting an entirely new one,
so that the devicetree is preserved and used for booting.
Add support for this by adding a new field in the context and updating
extlinux_boot() to receive the value as a new parameter.
Signed-off-by: Simon Glass <sjg@chromium.org>
Rather than using bflow->fname, which assumes that it is the same as the
passed-in filename, use the passed in filename. This can be different in
some cases.
Signed-off-by: Simon Glass <sjg@chromium.org>
It is not obvious that PXE supports FIT, but it does, by detecting
whether an image is a FIT or not.
In many cases a FIT is more convenient than using separate files for
the kernel, initrd and devicetree.
Really we should promote FIT as an important format, rather than
silentily dealing with it if detected.
Add a new 'fit' token which indicates that a FIT is being used.
When the 'fit' token is used, the expectation is that the devicetree
is within the FIT, but this is not required, for now.
Signed-off-by: Simon Glass <sjg@chromium.org>
The pxe_utils.c file is quite large and has a mix of parsing and booting
code. Split out the parsing into a new 'pxe_parse.c' file.
Add function prototypes for parse_pxefile_top() and label_destroy(), the
two functions used by pxe_utils.c
Signed-off-by: Simon Glass <sjg@chromium.org>
We already have a cleanup function which removes the filesystem, so drop
the unnecessary try...except for this. It results in an error on the
error path, as we try to remove the filesystem twice.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present a temporary directory is used to hold the files before
placing them in the filesystem. Use a suitably named directory inside
the persistent-data directory, so that it is easy to take a look at what
was produced.
Signed-off-by: Simon Glass <sjg@chromium.org>
Support creation of a load-only FIT (where there is no OS), with a new
--load-only option. Allow FITs to be created without an OS image.
Update the auto-generated FIT description to make this clear.
Signed-off-by: Simon Glass <sjg@chromium.org>
When using '-f auto', mkimage automatically creates a FIT given the
images. For devicetree files, FIT expects that the compatible string
from each is copied to its corresponding configuration node.
Implement this in mkimage, so far only for uncompressed devicetrees.
This requires a few more fields in struct content_info, so take this
opportunity to comment it properly.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function does not actually use the 'name' argument. Drop it and use
FIT_DATA_PROP instead, to avoid confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Enable this feature so that it can be tested on sandbox.
Update the vboot FDT to avoid having it match on conf-1 instead of
conf-1
Signed-off-by: Simon Glass <sjg@chromium.org>
The compatible strings used by each configuration comprise useful
information about how the system will boot. Show these after the current
configuration-node information.
Swap the order of the desc argument in its caller, fit_image_print()
since it is easier to read.
Signed-off-by: Simon Glass <sjg@chromium.org>
This property is part of the configuration node, so add a constant for
it, instead of open-coding the value. This allows easy searching for
places in U-Boot where the configuration node's compatible string is
used.
Signed-off-by: Simon Glass <sjg@chromium.org>
This matching happens silently at present, which can lead one to wonder
if U-Boot has been built without the feature. Add a few basic messages.
Signed-off-by: Simon Glass <sjg@chromium.org>
This should return a constant pointer, since modifying the description
within a devicetree node is not allowed. Also there is no need to set
the return value unless there is actually a description.
Update the function and move the docs to the header file while we are
here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Now that this base-class function is called, it can produce an error on
test failure, since it passes an empty list for the arguments.
Rename the reset() function to prepare_for_spawn() and use that instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Normally the job itself controls which tests are run, by providing an
optional test spec and using the -k option.
It is sometimes useful to run a subset of tests on CI. Add a new
TEST_SPEC variable to control this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Provide some additional variables which can be used to deselect whole
stages, or select a particular test.py build.
Signed-off-by: Simon Glass <sjg@chromium.org>
The rules are enough to handle the results logic. Drop the redundant
checks at the start of the bash script.
Signed-off-by: Simon Glass <sjg@chromium.org>
We use 'testsuites' for the test suites and 'world build' for the world
build. This is inconsistent. Use 'test_suites' and 'word_build' instead,
to avoid confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is not correct when building a kernel FIT, since it adds a second
loadable in addition to the kernel.
There may in fact be a bug in SPL FIT, in which case that should be
fixed, rather than adding an invalid loadable to the FIT.
This reverts commit cabde449b9.
Series-to: concept
Series-cc: heinrich
Cover-letter:
mkimage: Start to tidy up mkimage and friends
The current mkimage code is a bit messy:
- the main() function is very long
- two similarly named structs are used throughout: the first
(struct image_tool_params) is not actually just parameters, the second
(struct image_type_params) is confusingly similar
- quite a bit of FIT processing happens right at the start of main(),
which can be hard to follow
- the program calls exit() from many different places
This series renames the main structures, avoiding using the common
'params' word. It breaks up part of main() into separate functions and
starts the process of exiting in one place.
It also reverts a patch which causes an invalid 'loadables' property to
be added with '-f auto'.
More remains to be done, but this is a start.
END
2025-08-01 16:01:23 +12:00
4 changed files with 71 additions and 29 deletions
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.