On 5/2/23 10:42, Marcin Juszkiewicz wrote:
W dniu 1.05.2023 o 16:26, Heinrich Schuchardt pisze:
Linux distributions are interested in providing a single image which
enables a high number of boards to boot. This is simple if the boot
firmware (EDK II or U-Boot) is installed on flash.

1-4MB of SPI flash should be mandatory for all devices. Or use of eMMC boot partitions.

I would be happy if all boards would have U-Boot or EDK II preinstalled on SPI flash but there are enough boards that don't have SPI flash.


When loading from SD-card or eMMC the sector at which the binary
starts has to be identified. The following has been implemented:

- start from hard coded sector number

Please don't. Or choose something far from end of GPT data. This way it can be covered with "BIOS boot" partition.

- load file from FAT file system

On GPT disk you mean 0700 (Microsoft FAT) or EF00 (EFI System) partition?

- load from given partition number

Please don't. User may want to use same disk image on several systems. And vendors would choose 1st/2nd/3rd just because they can. Also not every partitioning tool is fine with larger numbers.

I enumerated what has been used in the past. I think partition type GUIDs are the only sane choice.


- load from partition with boot flag set (MBR partioning only)

GPT partitions can have several flags set. ChromeOS used it to select which kernel/rootfs to use as A/B.

- load from partition with specific type GUID

Loading by partition type GUID seems the most appropriate to avoid
collisions between the firmware for different boards.

Who would assign those GUIDs? How often random vendors will choose already existing one? There are several SBC vendors not caring at all about anything other than sales.

GUIDs should not be reused as that would not allow to load board specific firmware.

Best regards

Heinrich
_______________________________________________
boot-architecture mailing list -- boot-architecture@lists.linaro.org
To unsubscribe send an email to boot-architecture-le...@lists.linaro.org

Reply via email to