From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=193.142.112.100; helo=proxymail.itti.com.pl; envelope-from=ivan.novgorodtsev@itti.com.pl; receiver=edk2-devel@lists.01.org Received: from proxymail.itti.com.pl (ns1.itti.com.pl [193.142.112.100]) by ml01.01.org (Postfix) with ESMTP id 620092119AC13 for ; Sun, 16 Dec 2018 23:11:16 -0800 (PST) Received: from proxymail.itti.com.pl (ns1.itti.com.pl [193.142.112.100]) by proxymail.itti.com.pl (Postfix) with ESMTP id BE2792EB51 for ; Mon, 17 Dec 2018 08:11:14 +0100 (CET) Received: by proxymail.itti.com.pl (Postfix, from userid 65534) id A37242EB67; Mon, 17 Dec 2018 08:11:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on proxymail.itti.com.pl X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.5 tests=ALL_TRUSTED,HTML_MESSAGE autolearn=unavailable version=3.3.1 Received: from newmailer.itti.com.pl (ip-193-142-112-109.inqbator.poznan.pl [193.142.112.109]) by proxymail.itti.com.pl (Postfix) with ESMTP id 8AAD12EB51 for ; Mon, 17 Dec 2018 08:11:13 +0100 (CET) To: edk2-devel@lists.01.org From: Ivan Novgorodtsev Message-ID: <88d19dfb-abd2-538b-4166-e42d35df8c5b@itti.com.pl> Date: Mon, 17 Dec 2018 08:11:13 +0100 MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: UEFI Driver/Application 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: Mon, 17 Dec 2018 07:11:16 -0000 Content-Language: pl Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, I want to develop a small security check for UEFI partition. I want it to be run each time when system starts. My idea was to create UEFI driver or application (I'm not quite sure what will fit better), because if I'm not wrong, they run at UEFI Services level, according to the documentation:https://imgur.com/a/yep2IwB It will execute, and the pass control to Boot Manager which launches OS, right? I'm open to suggestions, if there's more suitable solution. The scripts I want to run in Shell via application: vol > base.txt vol > output.txt comp base.txt output.txt Right now I have also problem with compilation of project. I want to use similar piece of code like this: #include ... EFI_STATUS EFIAPI UefiMain(IN EFI_HANDLE ImageHandle,IN EFI_SYSTEM_TABLE *SystemTable) { EFI_STATUS Status; ShellExecute(&ImageHandle,L"echo Hello World!",FALSE,NULL,&Status); returnStatus; } ... My .INF file: ## @file #  TODO: Brief Description of UEFI Driver BootCheck # #  TODO: Detailed Description of UEFI Driver BootCheck # #  TODO: Copyright for UEFI Driver BootCheck # #  TODO: License for UEFI Driver BootCheck # ## [Defines]   INF_VERSION               = 0x00010005   BASE_NAME                 = BootCheck   FILE_GUID                 = 7a81cdc0-fde7-11e8-b163-3c970edcfd41   MODULE_TYPE               = UEFI_DRIVER   VERSION_STRING            = 1.0   ENTRY_POINT               = BootCheckDriverEntryPoint [Packages]   MdePkg/MdePkg.dec   ShellPkg/ShellPkg.dec [Sources]   BootCheck.h   BootCheck.c   ComponentName.c   ComponentName.h [LibraryClasses]   UefiDriverEntryPoint   UefiBootServicesTableLib   MemoryAllocationLib   BaseMemoryLib   BaseLib   UefiLib   DevicePathLib   DebugLib   ShellLib [Protocols]   gEfiDriverBindingProtocolGuid   gEfiPciIoProtocolGuid   gEfiComponentName2ProtocolGuid   gEfiComponentNameProtocolGuid   gEfiShellProtocolGuid [Guids] I get the following output erros: Active Platform          = c:\myworkspace\Nt32Pkg\Nt32Pkg.dsc 1>Flash Image Definition   = c:\myworkspace\Nt32Pkg\Nt32Pkg.fdf 1> 1> 1> 1>build.py... 1>c:\myworkspace\Nt32Pkg\Nt32Pkg.dsc(...) : error 4000: Instance of library class [ShellLib] is not found 1>    in [c:\myworkspace\source\BootCheck.inf] [IA32] 1>    consumed by module [c:\myworkspace\source\BootCheck.inf] I really appreciate your time and your help with this. Kind regards, Ivan