[Buildroot] [PATCH v2 1/6] boot/grub2: add support to build multiple Grub2 configurations in the same build
Köry Maincent
kory.maincent at bootlin.com
Wed Sep 22 07:45:38 UTC 2021
Hello Yann,
On Tue, 21 Sep 2021 21:41:05 +0200
"Yann E. MORIN" <yann.morin.1998 at free.fr> wrote:
> > > > GRUB2_CONF_OPTS = \
> > > > - --target=$(GRUB2_TARGET) \
> > > > - --with-platform=$(GRUB2_PLATFORM) \
> > > > + --host=$(GNU_TARGET_NAME) \
> > > > + --build=$(GNU_HOST_NAME) \
> > > > --prefix=/ \
> > > > --exec-prefix=/ \
> > > > --disable-grub-mkfont \
> > > > @@ -147,34 +160,48 @@ HOST_GRUB2_CONF_OPTS = \
> > > > --enable-libzfs=no \
> > > > --disable-werror
> > > As Thomas previously suggested, I think we can just drop GRUB2_CONF_OPTS
> > > and just put the options, even shared , directly in the loop [...]
> > His suggestion was to only keep out of GRUB2_CONF_OPTS the two parameterized
> > options "--target" and "--with-platform". If you prefer to drop all the
> > options from GRUB2_CONF_OPTS, I can do that.
>
> Ah, right, I misread what he wrote. But once we move some options out of
> GRUB2_CONF_OPTS, and since it is used in a single place, does it make
> sense to keep it now that we no longer are an autotools-package?
Alright
> > > And I am not sure how to fix that, in the end... Especially the systemd
> > > case (meh).
> > Me neither. Maybe we can let it like v1, and the 64-bit EFI configuration
> > will be the one used if both 32-bit EFI and 64-bit EFI are selected.
>
> Well, the ultimate goal is to haev a single USB-stick or CDROM that can
> boot on all three systems:
> - legacy BIOS
> - 32-bit UEFI
> - 64-bit UEFI
>
> So, if the startup.nsh script is to be provided, it should cover the two
> UEFI cases. A 32-bit UEFI bios can't load a 64-bit payload, and
> conversely, a 65-bit UEFI bios can't load a 32-bit payload.
>
> So, if startup.nsh is mandatory, we have an impossible situation...
>
> So, I wonder if startup.nsh is even needed at all, and if we should not
> just drop it altogether, and just rely, s you explained earlier, on the
> actual naming of the payload: efi/boot/bootia32.efi on 32-bit UEFI, or
> efi/boot/bootx64.efi on 64-bit UEFI.
>
> And drop the creation of startup.nsh in gummiboot and systemd.
>
> And fixup the post-build scripts accordingly...
>
> But as I said earlier: I do not have access to the UEFI specifications
> (they are free-as-in-beer to download and read, not implement or use,
> so by downloading them, I would have to stop reviewing this series as
> that would count as a use of the specs...)
If I ask someone to read it and confirm the boot files name, is it ok as I have
not opened it? ;)
Here is the file name convention that need to be install in efi/boot folder
32bit : bootia32.efi
x64 : bootx64.efi
aarch32 : bootarm.efi
aarch64 : bootaa64.efi
It seems dropping the creation of the startup.nsh is the best idea.
Regards,
Köry
More information about the buildroot
mailing list