All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Glenn Washburn <development@efficientek.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
	Daniel Kiper <dkiper@net-space.pl>
Subject: Re: [PATCH] term/serial: Add support for PCI serial devices
Date: Thu, 25 Aug 2022 09:36:34 +0200	[thread overview]
Message-ID: <YwcmgpWCWv4G7HXa@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220824183627.62abec4e@crass-HP-ZBook-15-G2>

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;


  reply	other threads:[~2022-08-25  7:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 11:28 [PATCH] term/serial: Add support for PCI serial devices Peter Zijlstra
2022-08-24 20:13 ` Glenn Washburn
2022-08-24 21:01   ` Peter Zijlstra
2022-08-24 23:36     ` Glenn Washburn
2022-08-25  7:36       ` Peter Zijlstra [this message]
2022-08-25  7:57       ` Peter Zijlstra
2022-08-25 15:51         ` Glenn Washburn
2022-08-25 19:33           ` Peter Zijlstra
2022-08-26  1:01             ` Glenn Washburn
2022-08-25  8:10       ` Peter Zijlstra
2022-08-25 19:23         ` Glenn Washburn
2022-08-25 19:59           ` Peter Zijlstra
2022-08-26  4:02             ` Glenn Washburn
2022-08-25  8:17   ` Peter Zijlstra
2022-08-25 15:46     ` Glenn Washburn
2022-08-25  8:03 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YwcmgpWCWv4G7HXa@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=development@efficientek.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.