[PATCH 0/7] efi: Various tidy-ups and drop the default

Tom Rini trini at konsulko.com
Mon Jun 28 15:37:11 CEST 2021


On Mon, Jun 28, 2021 at 10:38:50AM +0200, Mark Kettenis wrote:
> > From: Simon Glass <sjg at chromium.org>
> > Date: Sun, 27 Jun 2021 19:48:34 -0600
> > 
> > It has come to light that EFI_LOADER adds an extraordinary amount of
> > code to U-Boot. For example, with nokia_rx51 the size delta is about
> > 90KB. About 170 boards explicitly disable the option, but is is clear
> > that many more could, thus saving image size and boot time.
> 
> EFI_LOADER used to be a lot smaller.  It is great to see that over the
> years UEFI support has become more complete, but a lot of that new
> code implements features that are not at all essential for just
> booting an OS from storage.  If that growth leads to the suggestion to
> disable EFI_LOADER completely by default, we're putting the cart
> before the horse.

Well, I see I forgot to prefix my patch with RFC, but I hadn't found
EFI_LOADER being used in the wild on armv7, but wasn't sure about the
BSD families.  I did see that Debian doesn't use it, and that Armbian
doesn't even use it on aarch64.

> > The current situation is affecting U-Boot's image as a svelt bootloader.
> 
> Really?  I know UEFI has a bad reputation in the Open Source world,
> and some of its Microsoft-isms are really annoying (yay UCS-2).  But
> it works, it provides a standardized approach across several platforms
> (ARMv7, AMRv8, RISC-V) and the industry seems to like it.  Personally
> I'd wish the industry had standardized on Open Firmware instead, but
> that ship sailed a long time ago...
> 
> I find it hard to imagine that 90k is a serious amount of storage for
> something that is going to include a multi-MB Linux kernel.  This
> isn't code that lives in SPL or TPL where severe size restrictions
> apply.

In one of those cases where I need to pop back in to the other (Nokia
N900 specific) thread and see if the big size reduction really was just
disabling EFI_LOADER, it's perhaps just one of those "fun" things about
Kconfig and anything other than "make oldconfig" for spotting new config
options that default to enabled.

> > EFI_LOADER is required by EBBR, a new boot standard which aims to
> > bring in UEFI protocols to U-Boot. But EBRR is not required for
> > booting. U-Boot already provides support for FIT, the 'bootm' command
> > and a suitable hand-off to Linux. EBRR has made the decision to create
> > a parallel infrastructure, e.g. does not use FIT, nor U-Boot's signing
> > infrastructure.
> 
> EFI_LOADER is required to boot FreeBSD and OpenBSD on several
> platforms as well as generic Linux distros.  For example
> OpenBSD/armv7, OpenBSD/arm64 and OpenBSD/riscv64 all rely on
> EFI_LOADER to boot and have done so for the last 4 years.  The fact
> that ARM has embraced UEFI as an embedded boot standard and branded it
> EBBR really isn't all that relevant.

To be clear here, I like EFI_LOADER.  I too do wish some other
technologies had become dominant for technical rather than inertia
reasons, but here we are.  Having played around with it on aarch64,
there are some pretty nice comes-along-with parts to it.

What I hadn't seen, and am only a little skeptical of still, is how far
backwards in generations it's going to be used on.  The general wish is
that users nor off the shelf OS groups need to rebuild U-Boot for a
given board, and instead it just works.  The number of new designs for
32bit parts is no where near the number of new designs for 64bit parts.
So what we're seeing in U-Boot now is people updating support on their
older designs, and not necessarily caring about using EFI_LOADER.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210628/cb8e6deb/attachment.sig>


More information about the U-Boot mailing list