public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io, "Ramesh R." <rameshr@ami.com>,
	Sivaraman Nainar <sivaramann@ami.com>,
	manickavasakam karpagavinayagam <manickavasakamk@ami.com>
Subject: Re: [edk2-devel] Intel NUC platform firmware -- no serial I/O support?
Date: Fri, 8 Apr 2022 13:01:30 +0200	[thread overview]
Message-ID: <6afbfb5f-47e8-b7bb-9da9-acbc21644179@redhat.com> (raw)
In-Reply-To: <20220408094842.7fqkznxoukm3uvbm@sirius.home.kraxel.org>

On 04/08/22 11:48, Gerd Hoffmann wrote:
> 
>   Hi,
>  
>> And It Just Works (TM), with the following two commands in the UEFI
>> shell (after I copied the binaries to the USB stick, alongside the UEFI
>> Shell binary I built earlier):
>>
>>> Shell> fs0:
>>> FS0:\> cd efi\boot
>>> FS0:\efi\boot\> load SerialDxe.efi
>>> Image 'FS0:\EFI\BOOT\SerialDxe.efi' loaded at 2C801000 - Success
>>> FS0:\efi\boot\> load TerminalDxe.efi
>>> Image 'FS0:\EFI\BOOT\TerminalDxe.efi' loaded at 2C7FB000 - Success
>>> FS0:\efi\boot\>
>>
>> At this point, the UEFI console is properly multiplexed to both serial
>> and HDMI+USB.
> 
> Neat.  /me makes a mental note that one can load drivers like this.
> Can this be automated to run on each boot?  With a startup.nsh script?

Yes, that's what I did:
<https://listman.redhat.com/archives/edk2-devel-archive/2022-April/047910.html>.

Even better would have been to copy the SerialDxe and TerminalDxe
drivers to the hard disk's EFI system partition, and then register them
as Driver#### / DriverOrder. I tried that with "bcfg driver addp", and
then validated with "bcfg driver dump -v" -- however, alas, this system
seems to ignore Driver* in platform BDS.

Regarding the startup.nsh script: the contents are like this:

load hd0c0b:\efi\boot\SerialDxe.efi
load hd0c0b:\efi\boot\TerminalDxe.efi

The "hd0c0b:" filesystem identifier is the "consistent naming" kind
(printed by "map -c"), as opposed to FS0: and friends. Without an FS
identifier, the script wouldn't work (the shell wouldn't know on what FS
to look for the pathname \efi\boot\SerialDxe.efi, because, at startup,
there would not be a "current" filesystem). And given that I had to
specify the filesystem, the "consistent" naming looked better. The UEFI
Shell spec explains what the consistent naming rules are -- in brief, as
long as I plug the stick in the same USB port, the FS identifier will work.

Thanks,
Laszlo


  reply	other threads:[~2022-04-08 11:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  7:46 Intel NUC platform firmware -- no serial I/O support? Laszlo Ersek
2022-04-07  8:00 ` [edk2-devel] " Gerd Hoffmann
2022-04-07 10:49   ` Laszlo Ersek
2022-04-07 12:50     ` Gerd Hoffmann
2022-04-07 14:12       ` Laszlo Ersek
2022-04-07 17:04         ` manickavasakam karpagavinayagam
2022-04-08  9:19           ` Laszlo Ersek
2022-04-12 18:40             ` manickavasakam karpagavinayagam
2022-04-13  6:06               ` Laszlo Ersek
2022-04-08  9:48         ` Gerd Hoffmann
2022-04-08 11:01           ` Laszlo Ersek [this message]
2022-10-06 15:07     ` Laszlo Ersek
2022-04-07 22:16 ` Nate DeSimone
2022-04-08  9:32   ` Laszlo Ersek

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-list 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=6afbfb5f-47e8-b7bb-9da9-acbc21644179@redhat.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox