public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Marcin Wojtas <mw@semihalf.com>
To: "Carsey, Jaben" <jaben.carsey@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	 linaro-uefi <linaro-uefi@lists.linaro.org>,
	Neta Zur Hershkovits <neta@marvell.com>,
	 Yehuda Yitschak <yehuday@marvell.com>,
	Haim Boot <hayim@marvell.com>, Jan Dabros <jsd@semihalf.com>,
	 Bartosz Szczepanek <bsz@semihalf.com>,
	edk2-devel-01 <edk2-devel@lists.01.org>,
	"Ni, Ruiyu" <ruiyu.ni@intel.com>
Subject: Re: [PATCH v6 21/23] Applications/FirmwareUpdate: Add 'fupdate' comand to shell
Date: Thu, 17 Nov 2016 00:58:27 +0100	[thread overview]
Message-ID: <CAPv3WKf+-XX2qq0Gca59sYyJLTKZ4BW1ZMcCjN9LQkpht52J9A@mail.gmail.com> (raw)
In-Reply-To: <CAPv3WKcUTkVnYPba-cdUkuT7g=AzOy0R=YQa+bAnfTZH=HkPUA@mail.gmail.com>

Hi Jaben,

I haven't found RunRegisteredCommand in newest edk2. Can you please
point exactly what you meant?

As an alternative I checked ShellCommandRunCommandHandler - this is in
fact a library helper function and it's nested deep down in
RunShellCommand, which is for now the only working option.
ShellCommandRunCommandHandler requires a lot of additional processing
of the command line. All is done in Application/Shell code.

Is there any chance to expose RunShellCommand (or equivalent), so that
it can be used in a nice way, not with including multi "../../"
relative path header?

I expected, that the commands, which are in fact some wrappers or they
mix multiple others is pretty much of a standard, I'm pretty surprised
there are so huge difficulties in EDK2. I'm wondering of if there are
any other options to be used here (unless we accept, what we have for
now:) ).

Best regards,
Marcin

2016-11-16 22:48 GMT+01:00 Marcin Wojtas <mw@semihalf.com>:
> Hi Jaben,
>
> Thank you for your input.
>
>>
>> I agree on EBL, but I have very little experience with EBL so I don’t want to discuss in detail as I am not the right person without more research.  Specifically, my gut reaction is that needing a platform specific boot loader indicates that something has already gone wrong on that platform.
>>
>> However, this does not seem like a boot loader or an application at all.  this is an internal shell command. The goal here seems to be to create a NULL library to add a new internal command to the UEFI Shell.  This library gets compiled/linked into the shell itself.
>
> Indeed, it's nothing similar to the bootloader whatsoever. This
> command simply enables updating firmware in SPI flash directly from
> local path or from tftp.
>
>>
>> I feel that we have found a "new" use case that I encountered, but worked around in the past because all previous cases involved commands in the same library (there are interactions between Reconnect and Disconnect/Connect).
>
> Right, however Reconnect is easy, as it simply calls gBS callbacks,
> whose definition are also in the same location.
>
>>
>> I would say that a new API in the ShellCommandLib that links the UEFI Shell Application to the NULL libraries that make up the internal commands would be my first choice for implementation.  I would lean to something like the function that Marcin already called.  Maybe this?
>>
>> EFIAPI
>> RunRegisteredCommand(
>>   CHAR16* CommandLine,
>>   EFI_STATUS *CommandReturnValue
>> )
>
> I'll try this one and let know.
>
> Thanks,
> Marcin


  reply	other threads:[~2016-11-16 23:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1468110107-18979-1-git-send-email-mw@semihalf.com>
     [not found] ` <1468110107-18979-22-git-send-email-mw@semihalf.com>
     [not found]   ` <CAKv+Gu9KvJVGgORjxnLzuGVswimavRg8h1ZXKC+=Fv48RLJGEQ@mail.gmail.com>
2016-11-16 16:13     ` [PATCH v6 21/23] Applications/FirmwareUpdate: Add 'fupdate' comand to shell Marcin Wojtas
2016-11-16 17:05       ` Carsey, Jaben
2016-11-16 17:35         ` Leif Lindholm
2016-11-16 21:31           ` Carsey, Jaben
2016-11-16 21:48             ` Marcin Wojtas
2016-11-16 23:58               ` Marcin Wojtas [this message]
2016-11-17  0:57                 ` Carsey, Jaben

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=CAPv3WKf+-XX2qq0Gca59sYyJLTKZ4BW1ZMcCjN9LQkpht52J9A@mail.gmail.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