From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3DE3D81F2E for ; Wed, 16 Nov 2016 15:58:23 -0800 (PST) Received: by mail-it0-x22f.google.com with SMTP id c20so241650876itb.0 for ; Wed, 16 Nov 2016 15:58:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=J0S4v97jsUq5cqdn9OsVOT2DvEdnvQfKnZFHF6lqcrw=; b=eEYG8PuHyAyF7E8P3qGGX35vSmYZVA4HhJ7SsMbjVQgMhSmgcrpA9naD0aCUbS4r0Y ev8UgW8RaIRUR/b77s++QZDAewu02F6okQcyrCCqLGjV3GyOKC2Mt+eZAhhyx5b95vKd kG3OlGFp/Qf+R9f2bgWA9MN8QfpIW3y+oQ6dQiiyIv5RyxmdRknhvvr4m3DzH3c1AeIW xlWN+1HLD7hX4bld8emmO+Px2N3uVo1R17I8tGrf0JQxA6JarCFdtNx+PQui+do5wXve mzEDp+D/JqS+xiQaWiFj8sysX4vZBhoHFVDrlv7oSRqRH/APBCRiGANKEVj9fq087ttn w7FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=J0S4v97jsUq5cqdn9OsVOT2DvEdnvQfKnZFHF6lqcrw=; b=B4AJmuVqbxu3DEs7T48jrHsteGlT87XLruu6SGQD2AeiaZ8PeCzdzgnWKKcwUEm5hq /nI1wFBmZhGO27AAn+H8pQJI+mhmDm1yANueCqECMjIJuKn3fkbS6iAPI0iBkJy9XP7y 92pscZoxNaeSSk/GVSNwJ9UQ7d7nrvL4A7BE/72pD/Jmatc/TqwPa5/wEOHZQoSX3ux/ BJRvbs9QRU9NYkAXNAH1C43yP2DIKTqyTN71i+amB5QzHRQDXJMDWEww+xbSJWfvpo1u 9Iq5NO9ladUu0/8qUgYxo0i5Ukq7SVmIO7AtCrZNevUVS/mlv8HVSuO0NJFvwtADAUut dnVQ== X-Gm-Message-State: ABUngveGk2vlcZ9mcF3V5emIwWVnydEqCbXLbROgCKbaCvyIeyQKgXW9ftwdUDhMHS4k3qQCiitOvQCxv+ItXQ== X-Received: by 10.36.67.210 with SMTP id s201mr629571itb.70.1479340707697; Wed, 16 Nov 2016 15:58:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.25.140 with HTTP; Wed, 16 Nov 2016 15:58:27 -0800 (PST) In-Reply-To: References: <1468110107-18979-1-git-send-email-mw@semihalf.com> <1468110107-18979-22-git-send-email-mw@semihalf.com> <20161116173553.GB27644@bivouac.eciton.net> From: Marcin Wojtas Date: Thu, 17 Nov 2016 00:58:27 +0100 Message-ID: To: "Carsey, Jaben" Cc: Leif Lindholm , Ard Biesheuvel , linaro-uefi , Neta Zur Hershkovits , Yehuda Yitschak , Haim Boot , Jan Dabros , Bartosz Szczepanek , edk2-devel-01 , "Ni, Ruiyu" Subject: Re: [PATCH v6 21/23] Applications/FirmwareUpdate: Add 'fupdate' comand to shell X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2016 23:58:23 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 : > Hi Jaben, > > Thank you for your input. > >> >> I agree on EBL, but I have very little experience with EBL so I don=E2= =80=99t want to discuss in detail as I am not the right person without more= research. Specifically, my gut reaction is that needing a platform specif= ic boot loader indicates that something has already gone wrong on that plat= form. >> >> 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 worke= d around in the past because all previous cases involved commands in the sa= me 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 Sh= ell Application to the NULL libraries that make up the internal commands wo= uld 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