Hi Sudhakar, On Fri, 2026-02-27 at 19:11 +0530, Sudhakar Kuppusamy wrote: > Configuring the build with --with-platform=emu fails on 32-bit PowerPC with: > > /usr/bin/ld: appendedsig.module: in function `grub_mod_init': > /home/glaubitz/grub/grub-core/commands/appendedsig/appendedsig.c:1615:(.text+0x2ab4): > undefined reference to `grub_pks_get_keystore' > /usr/bin/ld: appendedsig.module: in function `create_dbs_from_pks': > /home/glaubitz/grub/grub-core/commands/appendedsig/appendedsig.c:1400:(.text+0x2c3c): > undefined reference to `grub_pks_free_data' > collect2: error: ld returned 1 exit status > > Fixing this by excluding the Platform Keystore (PKS) for grub-emu on 32-bit > PowerPC. > > Reported-by: John Paul Adrian Glaubitz <[email protected]> > Signed-off-by: Sudhakar Kuppusamy <[email protected]> > --- > include/grub/powerpc/ieee1275/platform_keystore.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/grub/powerpc/ieee1275/platform_keystore.h > b/include/grub/powerpc/ieee1275/platform_keystore.h > index 931ada224..3bfb594a3 100644 > --- a/include/grub/powerpc/ieee1275/platform_keystore.h > +++ b/include/grub/powerpc/ieee1275/platform_keystore.h > @@ -96,7 +96,7 @@ struct grub_pks > }; > typedef struct grub_pks grub_pks_t; > > -#if defined(__powerpc__) > +#if defined(__powerpc__) && !(GRUB_MACHINE_EMU) > /* Initialization of the Platform Keystore. */ > extern void > grub_pks_keystore_init (void);
I can confirm that this patch fixes the problem, so: Tested-by: John Paul Adrian Glaubitz <[email protected]> However, I'm wondering whether the commit message is correct as __powerpc__ is also defined on 64-bit PowerPC: glaubitz@perotto:~$ echo | gcc -E -dM - |grep -i powerpc #define __powerpc__ 1 #define __powerpc64__ 1 glaubitz@perotto:~$ Shouldn't the correct commit message be: powerpc_ieee1275: Exclude PKS support for grub-emu on PowerPC ? Or am I missing something here? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
