From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.4376.1649415697156000186 for ; Fri, 08 Apr 2022 04:01:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JV51JyvD; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649415696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G/T2jP9tWsOgXIjU4wvtdqCCVBeid4OJiYAMkzsl75k=; b=JV51JyvDeuKQGW03KrGka/POdZIdPU6UD5hJBvvk6pKG9vL51Wzexw5T0yXzsVtRS+H4Vj V4YpEjd5odOFLNxdrfymwXw5lZACjpvBZK4amDy+6P/zjKvbXEB1f1FytxFVHHAyyCgRri Ts+qRx/S2wdZklwgK8owkC50o0nQM2o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-45-Kv_REqmGPWeRsrINUIbHfg-1; Fri, 08 Apr 2022 07:01:33 -0400 X-MC-Unique: Kv_REqmGPWeRsrINUIbHfg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D673C185A79C; Fri, 8 Apr 2022 11:01:32 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (unknown [10.39.195.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E66C1141512A; Fri, 8 Apr 2022 11:01:31 +0000 (UTC) Subject: Re: [edk2-devel] Intel NUC platform firmware -- no serial I/O support? To: Gerd Hoffmann Cc: devel@edk2.groups.io, "Ramesh R." , Sivaraman Nainar , manickavasakam karpagavinayagam References: <4c8d982a-97b0-654c-c6db-9a55b95330b5@redhat.com> <20220407080008.o2qmtum4sxzw5zfo@sirius.home.kraxel.org> <20220407125015.bkz5e755mpvzdm3g@sirius.home.kraxel.org> <20220408094842.7fqkznxoukm3uvbm@sirius.home.kraxel.org> From: "Laszlo Ersek" Message-ID: <6afbfb5f-47e8-b7bb-9da9-acbc21644179@redhat.com> Date: Fri, 8 Apr 2022 13:01:30 +0200 MIME-Version: 1.0 In-Reply-To: <20220408094842.7fqkznxoukm3uvbm@sirius.home.kraxel.org> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: . 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