ARM-software / ebbr

Embedded Base Boot Requirements Specification
Creative Commons Attribution Share Alike 4.0 International
113 stars 37 forks source link

clarify location of firmware for removable storage #113

Open jto6 opened 1 year ago

jto6 commented 1 year ago

Section 4.2.2 states that to make it easier to use stock OS images on removable storage, firmware should be located on the ESP partition (so you don't have to create a dedicated firmware partition).

On removable media, firmware should be stored in the ESP under the /FIRMWARE directory structure as described in Firmware Partition Filesystem.

However, prior in the 4.2 section, it states:

The sections below discuss the requirements when using both fixed and removable storage. However, it should be noted that the recommended behaviour of firmware should be identical regardless of storage type. In both cases, the recommended boot sequence is to first search for firmware in a dedicated firmware partition, and second search for firmware in the ESP.

Why would the boot sequence for shared storage look in two places if it is always in the ESP? Or does the statement in 4.2.2 only apply in the case of using a stock OS image?

My suggestion is to reword the sentence in 4.2.2:

On removable media, firmware should be stored in the ESP ...

to

In either of the two scenarios above, firmware should be stored in the ESP ...

That way the spec isn't requiring that all removable storage store firmware in the ESP, but only for the cases mentioned to ease the modification of a stock OS image to boot.

daniel-thompson commented 1 year ago

Why would the boot sequence for shared storage look in two places if it is always in the ESP?

It is not always in the ESP (#include , shall vs should, ;-) ).

I personally think the goal of 4.2.2 is to provide guidance when authoring images intended to be removable. It should not apply to cases where we are generating tailored OS images (meaning the install process is just a dd and we don't care if the image will be deployed to eMMC or SD card).

As such I thing the proposed wording is definitely an improvement.