Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add explicit support for multi-step loading #28

wants to merge 1 commit into from

Conversation

sjg20
Copy link
Collaborator

@sjg20 sjg20 commented Jul 23, 2025

There are cases where multiple FITs must be loaded to complete a boot, e.g. where the first FIT contains devicetrees and the second contains the OS.

At present this is not permitted, since every FIT must contain a bootable kernel (or firmware).

Add a new 'load-only' property to indicate that a configuration can be loaded but not booted. Describe how this works in the 'usage' section.

Copy link

netlify bot commented Jul 23, 2025

Deploy Preview for fluffy-chebakia-3fa329 ready!

Name Link
🔨 Latest commit 2282e17
🔍 Latest deploy log https://app.netlify.com/projects/fluffy-chebakia-3fa329/deploys/68822d60bfadcf00087a7cbd
😎 Deploy Preview https://deploy-preview-28--fluffy-chebakia-3fa329.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sjg20 sjg20 self-assigned this Jul 23, 2025
@sjg20 sjg20 requested a review from xypron July 23, 2025 17:52
.. _load_only:

load-only
Indicates that this configuration does not contain an executable image,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a configuration marked by the 'load-only', is meant to neither contain a kernel nor a firmware property than this label would be superfluous. It would be sufficient to create a configuration without neither of these properties.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but how can we tell if this is correct or not? We need some signal that it is intentional, otherwise a bad FIT will be loaded and the device will just sit at the prompt doing nothing.

load-only
Indicates that this configuration does not contain an executable image,
i.e. kernel or firmware. The configuration may be loaded into memory for
use by the executable image, which comes from another configuration or FIT.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configurations are never loaded. The images specified by a configuration are loaded.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

kernel or firmware
Unit name of the corresponding :index:`kernel` or :index:`firmware`
(u-boot, op-tee, etc) image. If both "kernel" and "firmware" are specified,
control is passed to the firmware image.
control is passed to the firmware image. For `load_only`_ images, these two
properties are optional.
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The 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 load_only is not needed to describe a device-tree only FIT image configuration. What is the use case for the 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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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.

There are cases where multiple FITs must be loaded to complete a boot,
e.g. where the first FIT contains devicetrees and the second contains
the OS.

At present this is not permitted, since every FIT must contain a
bootable kernel (or firmware).

Add a new 'load-only' property to indicate that a configuration can be
loaded but not booted. Describe how this works in the 'usage' section.

Signed-off-by: Simon Glass <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants