-
Notifications
You must be signed in to change notification settings - Fork 8
Add explicit support for multi-step loading #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,6 +192,36 @@ before SPL), then TPL will only load images with a phase of "spl". This allows | |
all images to be provided in a single FIT, with each phase pulling out what is | ||
needed as the boot proceeds. | ||
|
||
.. _multi_step: | ||
|
||
Multi-step loading | ||
------------------ | ||
|
||
The most common use of a FIT is where each configuration contains everything | ||
needed to boot. For example, on ARM systems a configuration contains a kernel, | ||
devicetree(s) and a ramdisk if needed. This approach is widely used on embedded | ||
systems. | ||
|
||
This approach is not always desirable, however, particularly when the firmware | ||
and the OS are supplied by different parties. In that case, the devicetree may | ||
be provided by the firmware with the other pieces coming from the OS. This | ||
means that FIT may omit the devicetree images. | ||
|
||
With devicetree in particular, it is common for the OS to provide its own | ||
version, or perhaps a devicetree overlay to add some new nodes and properties. | ||
|
||
Obviously if the OS has to provide a devicetree for every device, the OS files | ||
would become very large. A middle path could be that the hardware vendor | ||
provides a FIT on a boot partition, containing devicetrees for hardware | ||
supported by that vendor. Then the bootloader can load that FIT to get just the | ||
devicetree, followed by the main FIT to load the OS. | ||
|
||
To enable this last case, add a :ref:`load_only` property to the configuration. | ||
This signals to the bootloader that it should not require an executable (i.e. | ||
kernel or firmware), nor should it try to boot with this configuration. Booting | ||
then becomes a two-step process: load one FIT to obtain the devicetree, then | ||
another to obtain the OS. Only the second FIT is booted. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Obviously if a configuration does not contain anything executable it can not be executed. The new property How would the discovery of the multiple FIT images work? Will there be an extra configuration file in the firmware specifying locations of FIT images and the configurations to be used? Where would the format of such a file be defined? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the first point, it must be determinisitic, so we know whether the boot can proceed or not, as noted above. For the second point, I haven't figured that out yet. Within U-Boot it will need to be part of the bootmeth, perhaps with a separate file, etc. |
||
Security | ||
-------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This contradicts the description of load_only below which states that load-only must not contain an executable image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I fixed that statement above