Subject: [bug#55343] [PATCH 2/2] image: Add new efi32-raw format for 32bit UEFI on 64bit systems

From: Denis 'GNUtoo' Carikli <[email-masked]>
Date: Tue, 10 May 2022 23:39:10 +0200

On Tue, 10 May 2022 11:32:52 +0200
Maxime Devos <[email-masked]> wrote:

> Denis 'GNUtoo' Carikli schreef op di 10-05-2022 om 01:24 [+0200]:
> > +           ((#:configure-flags flags
> > +             ''()) `(cons* ,(cond ((target-x86?) "--target=i386")
> > +                                  ((target-arm?) "--target=arm"))
> > +                           ,flags)))))))
> 
> Isn't this just grub but compiled for the 32-bit variant of the
> system?

> Or do you mean to use 'grub' as a cross-compiler here (instead of
> something that is being cross-compiled), like 'gcc'?
Apparently the modification I did (passing --target=i386) results in a
64bit grub-mkimage and 32bit modules in lib/grub/i386-efi so I think
it's more like a cross-compiler. I verified that by installing
grub-efi32 and using file on the mentioned files.

It's also possible to have something like multiple target/architectures
with GRUB by compiling it for each target/architecture and then
shipping the modules in lib/grub/* but that would require way more
work, so it would make more sense to do that as a separate patch set if
needed.

Though for now I'm just interested in adding 32bit UEFI support because
I did the work for testing/learning, and I would prefer if that work
results in Guix supporting 32bit UEFI somehow.

Denis.