On Wed, Aug 24, 2022 at 06:36:27PM -0500, Glenn Washburn wrote: > Yeah, it can get tricky. Its kind of custom build system layered on top > of autotools. The file you're looking for is > grub-core/Makefile.core.def. > > Looking at this again, it looks like pci is only supported on x86 and > mips_loongson. So this is not as simple as it could be. I believe > you'll want to add the following lines to the serial module definition > (search for "name = serial;"): > > mips_loongson = term/pci/serial.c; > x86 = term/pci/serial.c; > > Also, the call to grub_pciserial_init() in grub-core/term/serial.c > should be ifdef'd to only be included for those platforms, otherwise > the other builds will break.
Oh boy... you don't happen to have a convenient GRUB_HAZ_PCI define squirreld away somewhere eh? Does this look like something that could work? --- diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 5212dfab1369..ba52a675da84 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -224,12 +224,14 @@ kernel = { i386_efi = kern/i386/efi/init.c; i386_efi = bus/pci.c; + i386_efi_cppflags = '-DGRUB_HAS_PCI' x86_64 = kern/x86_64/dl.c; x86_64_xen = kern/x86_64/dl.c; x86_64_efi = kern/x86_64/efi/callwrap.S; x86_64_efi = kern/i386/efi/init.c; x86_64_efi = bus/pci.c; + x86_64_efi_cppflags = '-DGRUB_HAS_PCI' xen = kern/i386/tsc.c; xen = kern/i386/xen/tsc.c; @@ -271,6 +273,7 @@ kernel = { i386_pc = term/i386/pc/console.c; i386_qemu = bus/pci.c; + i386_qemu_cppflags = '-DGRUB_HAS_PCI' i386_qemu = kern/vga_init.c; i386_qemu = kern/i386/qemu/mmap.c; @@ -303,6 +306,7 @@ kernel = { mips_loongson = bus/bonito.c; mips_loongson = bus/cs5536.c; mips_loongson = bus/pci.c; + mips_loongson_cppflags = '-DGRUB_HAS_PCI' mips_loongson = kern/mips/loongson/init.c; mips_loongson = term/at_keyboard.c; mips_loongson = term/ps2.c; @@ -2047,6 +2051,8 @@ module = { ieee1275 = term/ieee1275/serial.c; mips_arc = term/arc/serial.c; efi = term/efi/serial.c; + x86 = term/pci/serial.c; + mips_loongson = term/pci/serial.c; enable = terminfomodule; enable = ieee1275; _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel