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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#88617): https://edk2.groups.io/g/devel/message/88617 Mute This Topic: https://groups.io/mt/90308335/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-