On 07/06/2017 03:07 PM, Andre Przywara wrote:
Hi,

On 06/07/17 11:19, Thomas Schmitt wrote:
Hi,

i am the upstream developer of program xorriso which packs up Debian arm64
ISOs.

Here is my minority opinion from a discussion with Andre Przywara:

To my opinion, if U-boot is used as EFI implementation, then it should
not consider as bootable any "active" MBR partitions or "Legacy BIOS
Bootable" GPT partitions (see is_bootable() in disk/part_efi.c).
First thing to note here is that U-Boot does not really have an
understanding yet of whether it is acting as an EFI implementation or
not. At this stage it simply looks for boot partition *candidates*,
which will then later be examined more closely to find boot scripts or
EFI apps. Adding one more partition to that list should not cause much
harm, I think.

While the proposed change of behavior is an undisputable improvement,
my objection is that the main boot loaders in distro ISOs are GRUB and
SYSLINUX. Both do not expect that the "active" partition gets booted by
the firmware but rather that their own MBR at the start of the ISO gets
started by BIOS or the ESP is brought up by EFI.
The MBR programs in the ISOs do not go on with booting the "active"
partition but rather hop onto the El Torito boot image programs in the ISO.
A second thing to note is that there is some fundamental difference here
between the ARM world and x86.
For ARM U-Boot was so far just piggy-backing on the bootable MBR flag to
find /boot partition candidates. I am not sure if there is actually some
spec or standard covering this behaviour, it was just convenient and
worked quite well in the (mostly embedded) ARM world.
And on ARM U-Boot never considered the "boot code" in a boot sector
(neither on the MBR or on an active partition) - which is probably x86
code anyway.

Now I am not sure how this maps to the combination of U-Boot and x86 - I
am not very familiar with the combination of those two.
Does U-Boot actually support chain-loading boot sectors on x86? Or does
it entirely focus on loading either EFI apps or Linux kernels / U-Boot
boot scripts? Maybe Simon could shed some light on this?

U-Boot on x86 does not implement BIOS callbacks, so even if you wanted to you couldn't execute an MBR directly.

So yes, it only loads proper payloads the same way as it does on ARM.


Alex

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to