Put this in the helper so that we can (later) have it show the correct
error when the virtiofs daemon fails.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the OS disk conflicts with the boot disk used to hold the
app (or payload). Number the OS disk after that.
Signed-off-by: Simon Glass <sjg@chromium.org>
This method is useful for locating an OS using the VBE approach. Enable
it for the app and payload, for both x86 and ARM.
Series-to: concept
Series-cc: heinrich
Cover-letter:
efi: Support video output on ARM
So far the EFI app supports video on x86 but not ARM. This series adds
this feature, using EFI GOP's 'blt' feature.
Support for bootstd is enabled at the same time, so that the app can
boot an OS automatically.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
This function is only defined if CONFIG_OF_LIVE is enabled. Provide a
static inline to handle it being disabled.
Signed-off-by: Simon Glass <sjg@chromium.org>
We need CONFIG_BOARD_EARLY_INIT_R to enable block devices. Enable
bootstd as well, so that booting is supported. Provide the 'lsblk'
command to allow listing block devices.
Use white-on-black as this is a little easier on the eyes.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the root disk conflicts with the boot disk used to hold the
app (or payload). Use virtio for this disk and number the others after
that.
Signed-off-by: Simon Glass <sjg@chromium.org>
With arm64 we generally use the virtio-gpu driver, which does not
support direct access to a framebuffer. Add support for this, so that
the display works as expected.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the EFI GOP is read in the probe() method but is not stored,
so it is not possible to use it later.
With the EFI app we need to be able to access it after probing, when
blitting is used. Create a struct to hold it. Store the framebuffer
pointer in there as well, to simplify the code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add some information about this new bootmeth, including how to enable it
and how it works.
Series-to: concept
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.
Enable the test for non-SPL sandbox builds.
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>
Adjust the build logic to automatically deal with adding config
fragments to an existing board, to fully support the -X option.
Signed-off-by: Simon Glass <sjg@chromium.org>
Provide a new -X option which uses any available .buildman files to
augment the list of boards supported by U-Boot with 'extended boards',
which consist of a base board with one or more config fragments.
Signed-off-by: Simon Glass <sjg@chromium.org>
Provided a convenient function for buildman to use, which builds the
database if needed, then returns it.
Signed-off-by: Simon Glass <sjg@chromium.org>
It might better to use separate arguments for each item, but for now,
document which args are used by Slot, Slots and move_config()
Signed-off-by: Simon Glass <sjg@chromium.org>
This function does not actually build the database; it just adds a board
to the datbase. Rename it to do_add_to_db() to reflect that.
Signed-off-by: Simon Glass <sjg@chromium.org>
The qconfig tool has the ability to search for CONFIGs used by boards.
Refactor the code slightly so that buildman obtain the database.
Signed-off-by: Simon Glass <sjg@chromium.org>
We wish to support .buildman files in the config/ directory which can
associate boards with config fragments. Add a parser for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
It has become more common to use config fragments to extend or adjust
the functionality of boards in U-Boot.
Add some documentation for how to use this with buildman.
Signed-off-by: Simon Glass <sjg@chromium.org>
Check that configuration fragments provided to buildman as comma-
separated list are passed on to the make command of the builder.
In the %_defconfig: target of scripts/kconfig/Makefile the defconfig
file and the fragments are combined via the gcc preprocessor.
Modeling this step in the buildman testbench without invoking the actual
Makefile would not provide better test coverage.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>