From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 B0A5821B02822 for ; Wed, 15 Aug 2018 08:22:23 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id y9-v6so1675222wma.5 for ; Wed, 15 Aug 2018 08:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=C32WhmzDNa+rFGu7Y/b7GpnEftcSeCYa7BGwS7RQ7CI=; b=QA09DqU0X10ejeqDTXIGu4BdLdj3Ih7XYWX2c21psuaNPKKY+YuatOUirbADaPYNQ3 wA2V+/xGhGoeU9C/gdO+GwtPMrf9jlKSPx6nDcwvDlEaD0ApaUAmJTdGjPU580esbWdX WsQwbSn0kHzP1l4rbxAt45DeYVjMjQR3xVyEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=C32WhmzDNa+rFGu7Y/b7GpnEftcSeCYa7BGwS7RQ7CI=; b=LJbLHn8aiGTvskUAlqpoY4LUWCGdD/vlfrGl/YW7JtcbptYLKBPHibQv5eWaGxP5RB T88sDuhuFG0AGqB4y9ecmecYcQHOlpT6lLGbESXJnOk+HjjHcaRFYQBdpxQgFiLPym8+ sCEu8K9CrC3M5Vc+XzXYE6nMt4n7l9Botpvj2EZkJgm5Sbn88lltbzSUgSUkQ4pVHw18 EPV27IuHPg9GBDtSjeT0W8dwvqk/mSllCtgi42Eulcdp6CIsRvQrcLE7Vt6IzLZwYXr7 sledJbK9HOg9J6KKK4dVfrt0V+vYk2HNpcKHKebBVKm3sJDB0VU4WTJj6eQPHOIFWcc+ CsnQ== X-Gm-Message-State: AOUpUlEqFhOTidgCyFbt78HZbweBHQYdUjUBTob5z0JJJoynxyZsIKEj 2dUZqYGi3y7qcamWEXzrPgbkdg== X-Google-Smtp-Source: AA+uWPz0FB3fIKcJGFc9bTtVMmGmt42wbmY47MR8zuVREYvvb0cxvIujLSZrOm1STFzN57jBcivf1Q== X-Received: by 2002:a1c:8952:: with SMTP id l79-v6mr13005399wmd.7.1534346541763; Wed, 15 Aug 2018 08:22:21 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id t6-v6sm3313786wmf.8.2018.08.15.08.22.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Aug 2018 08:22:20 -0700 (PDT) Date: Wed, 15 Aug 2018 16:22:18 +0100 From: Leif Lindholm To: Ming Huang Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, michael.d.kinney@intel.com, lersek@redhat.com, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org Message-ID: <20180815152218.ov5vq6csikzvfuir@bivouac.eciton.net> References: <20180814080451.48845-1-ming.huang@linaro.org> <20180814080451.48845-5-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180814080451.48845-5-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-non-osi v2 4/4] Silicon/Hisilicon/D06: Add Oem Shell libraries X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2018 15:22:24 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 14, 2018 at 04:04:51PM +0800, Ming Huang wrote: > Add Hisilicon Oem Shell libraries for some commands,such as > biosupdate, getmac, setmac, provision, acpistartos, brdinfo, > sfpinfo. > > biosupdate example: > ifconfig -s eth2 static 192.168.2.68 255.255.255.0 192.168.2.1 > biosupdate serverIp -u user -p password -f D06.fd -m master Is this expected to be used in reality? There is capsule update and there is a BMC - why do you need a magic platform-specific command in the Shell? Is it a debug feature? > acpistartos example: > ifconfig -s eth2 static 192.168.2.69 255.255.255.0 192.168.2.1 > provision serverIp -u user -p password -f os\Image -a 0x80000 > 2 > provision serverIp -u user -p password -f os\minifs.cpio.gz -a > 0x07000000 > 2 > acpistartos Why is there a magic Shell comand to load a Linux kernel and initramfs? This is the opposite of what UEFI is for. / Leif > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ming Huang > --- > Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.inf | 41 ++++++++++++++ > Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.inf | 59 ++++++++++++++++++++ > Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.lib | Bin 0 -> 144880 bytes > Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.lib | Bin 0 -> 1109382 bytes > 4 files changed, 100 insertions(+) > > diff --git a/Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.inf b/Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.inf > new file mode 100644 > index 0000000..3dea3fb > --- /dev/null > +++ b/Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.inf > @@ -0,0 +1,41 @@ > +/** @file > +* > +* Copyright (c) 2018, Hisilicon Limited. All rights reserved. > +* Copyright (c) 2018, Linaro Limited. All rights reserved. > +* > +* This program and the accompanying materials > +* are licensed and made available under the terms and conditions of the BSD License > +* which accompanies this distribution. The full text of the license may be found at > +* http://opensource.org/licenses/bsd-license.php > +* > +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +* > +**/ > + > + > + > +[Defines] > + INF_VERSION = 0x0001001A > + BASE_NAME = HisiD06ShellCmdLib > + FILE_GUID = 41878264-1668-460f-b0bf-26bdc89d464c > + MODULE_TYPE = UEFI_APPLICATION > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = NULL|UEFI_APPLICATION UEFI_DRIVER > + CONSTRUCTOR = HisiD06ShellCmdLibConstructor > + DESTRUCTOR = HisiD06ShellCmdLibDestructor > + > + > +[Binaries.AARCH64] > + LIB|HisiD06ShellCmdLib.lib|* > + > +[Packages] > + ShellPkg/ShellPkg.dec > + Silicon/Hisilicon/HisiPkg.dec > + > +[LibraryClasses] > + I2CLib > + ShellLib > + > +[Guids] > + HisiPlatformShellSampleHiiGuid ## CONSUMES ## HII > diff --git a/Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.inf b/Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.inf > new file mode 100644 > index 0000000..a81af92 > --- /dev/null > +++ b/Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.inf > @@ -0,0 +1,59 @@ > +/** @file > +* > +* Copyright (c) 2018, Hisilicon Limited. All rights reserved. > +* Copyright (c) 2018, Linaro Limited. All rights reserved. > +* > +* This program and the accompanying materials > +* are licensed and made available under the terms and conditions of the BSD License > +* which accompanies this distribution. The full text of the license may be found at > +* http://opensource.org/licenses/bsd-license.php > +* > +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +* > +**/ > + > + > +[Defines] > + INF_VERSION = 0x0001001A > + BASE_NAME = HisiShellCmdLib > + FILE_GUID = 88324505-C49D-4eac-8253-75D324457B88 > + MODULE_TYPE = UEFI_APPLICATION > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = NULL|UEFI_APPLICATION UEFI_DRIVER > + CONSTRUCTOR = HisiShellCmdLibConstructor > + DESTRUCTOR = HisiShellCmdLibDestructor > + > +[Binaries.AARCH64] > + LIB|HisiShellCmdLib.lib|* > + > +[Packages] > + ArmPkg/ArmPkg.dec > + ShellPkg/ShellPkg.dec > + Silicon/Hisilicon/HisiPkg.dec > + > +[LibraryClasses] > + ArmSmcLib > + IpmiCmdLib > + PcdLib > + ShellCommandLib > + ShellLib > + > +[Pcd] > + gEfiShellPkgTokenSpaceGuid.PcdShellProfileMask ## CONSUMES > + gHisiTokenSpaceGuid.PcdMdioSubctrlAddress ## CONSUMES > + gHisiTokenSpaceGuid.PcdStartOsParameter ## CONSUMES > + > +[FixedPcd.common] > + gArmTokenSpaceGuid.PcdFdSize ## CONSUMES > + gHisiTokenSpaceGuid.PcdBaseBoardProductName ## CONSUMES > + gHisiTokenSpaceGuid.PcdTrustedFirmwareEnable ## CONSUMES > + > +[Protocols] > + gHisiSpiFlashProtocolGuid ## CONSUMES > + gOemNicProtocolGuid ## CONSUMES > + gUniNorFlashProtocolGuid ## CONSUMES > + > +[Guids] > + gVersionInfoHobGuid ## CONSUMES > + HisiShellSampleHiiGuid ## CONSUMES ## HII > diff --git a/Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.lib b/Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.lib > new file mode 100644 > index 0000000..9ba14a2 > Binary files /dev/null and b/Silicon/Hisilicon/Hi1620/Library/HisiD06ShellCmdLib/HisiD06ShellCmdLib.lib differ > diff --git a/Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.lib b/Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.lib > new file mode 100644 > index 0000000..d3ca398 > Binary files /dev/null and b/Silicon/Hisilicon/Library/HisiShellCmdLib/HisiShellCmdLib.lib differ > -- > 2.17.0 >