From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=laurie.jarlstrom@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E9EC021183ED7 for ; Wed, 12 Dec 2018 09:09:28 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2018 09:09:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,345,1539673200"; d="scan'208";a="283044345" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 12 Dec 2018 09:09:28 -0800 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 12 Dec 2018 09:09:27 -0800 Received: from fmsmsx104.amr.corp.intel.com ([169.254.3.235]) by FMSMSX119.amr.corp.intel.com ([169.254.14.222]) with mapi id 14.03.0415.000; Wed, 12 Dec 2018 09:09:27 -0800 From: "Jarlstrom, Laurie" To: "Jarlstrom, Laurie" , "inovgorodtsev@itti.com.pl" , "edk2-devel@lists.01.org" Thread-Topic: UEFI Driver Libraries problem Thread-Index: AQHUkhyXTu5r6YVgmUi/4RXmvqd+UaV7TiiwgAACDzA= Date: Wed, 12 Dec 2018 17:09:27 +0000 Message-ID: <10380531DF222B45964BE3E93EFE5F049CE4A0ED@fmsmsx104.amr.corp.intel.com> References: <10380531DF222B45964BE3E93EFE5F049CE4A0C2@fmsmsx104.amr.corp.intel.com> In-Reply-To: <10380531DF222B45964BE3E93EFE5F049CE4A0C2@fmsmsx104.amr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDhkODBhMDYtMGZjMy00NTE3LTllMjItYmFmOTUyNjMzYTA4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSWJWc0lkUFhJTlh3cVJzZjZpV0dYNFJDNmQxV0dCOGszWnVFYkorNmhiOWo3Z2lWdVozMXp6SzhFdW15cXc5SCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: UEFI Driver Libraries problem X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 17:09:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ivan, It seems that probably you might be getting the error because of your .inf = File. Do you want your UEFI module to be a UEFI_DRIVER or UEFI_APPLICATION?= I am assuming UEFI_DRIVER. Is there a reason why you need to access the UEFI Shell protocol from your = driver? Typically it is not best practices to have a dependency on the UEFI Shell w= ithin a driver since the UEFI Driver is called from the UEFI Dispatcher and= not from the Shell. Some good examples of a UEFI Driver are in https://github.com/tianocore/edk= 2/tree/master/MdeModulePkg of which the SCSI driver is a good single exampl= e: https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Bus/Scsi/Scsi= DiskDxe=20 Here is an example of a UEFI Application: =20 https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Application/Hell= oWorld Here is an example of a super simple UEFI Application: https://github.com/t= ianocore/tianocore.github.io/wiki/Getting-Started-Writing-Simple-Applicatio= n=20 Thanks, Laurie Laurie.jarlstrom@intel.com,=20 Firmware Integration & Dev (FED-SSG) (503) 712 9395 -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jarl= strom, Laurie Sent: Wednesday, December 12, 2018 8:46 AM To: inovgorodtsev@itti.com.pl; edk2-devel@lists.01.org Subject: [edk2] FW: UEFI Driver Libraries problem Hi Ivan, I am forwarding your question to the email list for EDK II, edk2-devel@list= s.01.org and will answer there. To join this email list see: https://github.com/tianocore/tianocore.github.= io/wiki/edk2-devel and then join the https://lists.01.org/mailman/listinfo/= edk2-devel email list for edk2-devel Thanks, Laurie Laurie.jarlstrom@intel.com,=20 -----Original Message----- From: edk2-devel [mailto:mailman-bounces@lists.01.org] On Behalf Of inovgor= odtsev@itti.com.pl Sent: Wednesday, December 12, 2018 5:14 AM To: edk2-devel-owner@lists.01.org Subject: UEFI Driver Libraries problem Hello, at the beggining I wanted to say, that maybe here on this page it will be e= asier to understand my problem, there are some pictures explaining and nice= code formatting: https://stackoverflow.com/questions/53741304/compile-uefi-application-drive= r-using-edk2=20 I'm trying to build UEFI Application/Driver, but I get errors when I'm tryi= ng to include library: #include "C:\MyWorkspace\ShellPkg\Include\Library\ShellLib.h" Errors: 1>Building ... c:\myworkspace\MdeModulePkg\Library\CustomizedDisplayLib\CustomizedDisplayL= ib.inf [IA32] 1>C:\MyWorkspace\ShellPkg\Include\Library\ShellLib.h(22): fatal error C1083: Cannot open include file: 'Protocol/EfiShellInterface.h': No such fi= le or directory 1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\cl.exe"' : return code '0x2' If I try another method: EFI_STATUS EFIAPI BootCheckDriverEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_SHELL_PROTOCOL *EfiShellProtocol; EFI_STATUS Status; Status =3D gBS->LocateProtocol(&gEfiShellProtocolGuid,NULL,(VOID **)&EfiShellProtocol); // // Install UEFI Driver Model protocol(s). // Status =3D EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gBootCheckDriverBinding, ImageHandle, &gBootCheckComponentName, &gBootCheckComponentName2 ); ASSERT_EFI_ERROR (Status); return Status; } I get.. linker errors I suppose. I also tried to include some libraries in = property pages, but I'm not very familiar with Visual Makefile project, I c= ould have done something wrong. 1>Building ... c:\myworkspace\MdeModulePkg\Library\FileExplorerLib\FileExplorerLib.inf [IA32] 1>c:\myworkspace\source\BootCheck.c(111): error C2065: 'EFI_SHELL_PROTOCOL': undeclared identifier 1>c:\myworkspace\source\BootCheck.c(111): error C2065: 'EfiShellProtocol': undeclared identifier 1>c:\myworkspace\source\BootCheck.c(111): warning C4552: '*': result of expression not used 1>c:\myworkspace\source\BootCheck.c(114): error C2065: 'EfiShellProtocol': undeclared identifier I would appreciate any useful information, thank you. Ivan Novgorodtsev _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel