From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::342; helo=mail-ot1-x342.google.com; envelope-from=rafaelrodrigues.machado@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) (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 CDD1C21BADAB3 for ; Mon, 17 Dec 2018 01:13:40 -0800 (PST) Received: by mail-ot1-x342.google.com with SMTP id n8so11484575otl.6 for ; Mon, 17 Dec 2018 01:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SPsg438GEPbgEShsu5VnkBcVhuVZ0VwlKAZaTC8Vy2U=; b=gbaM0+hQ6XnOzsfw/c1TBVNUfosZ+8MtGwN3DnGkRCRYWzwVN9I1MDeMUrwEyzFJ3e SW4bnmjLCpmwJPk/8pX4mN2tilGrpQ9lvnrqXPJXG7xhM2Wbbx9q6FuhDP9Kia4NFg+D YjW3c8YCBEf4gWkuTD0q+UpQV7uYh6/BFdf2YDI+936pQo/bLdt7BUtWa4SxyS8xfShe HPTNQnlW8wsQC+VWxozeKOHNGcfpRS5pW/RAJyooVqan06hLSZz76ZAsqaUM0ujS/Z1R 1bSnCwzWWDebKetKP//dnhK9cvvkjl3J+MWzRo7Lh233OGUrahwkiqnrCLnOU0Zl7elY 7wqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SPsg438GEPbgEShsu5VnkBcVhuVZ0VwlKAZaTC8Vy2U=; b=LkwQbzVwkNmUfRA1YlN/CegYh43eOV6coZOgVJOf8lyWYbjmn/ohPgLvyjh257HNFn 16XQamocHhdfONIRXn/sutNTbmMkR9KT4aIeuuU2ubG6Mlaos1ehrHFPjK/R1I/w5NzQ qRJENvW5d6sIEEldCEDFhQkVyhne04gMrLajv7Z7/C9zSKQ1rgnHS9ehf+0SjGusL0G+ Y+ef1etwQY/hMPKX09TegXYKZ3L0+ChAgkB7aLoDBsLzuvOXgnTempVJYgNCQ35HFKgC vq2ILhclbvuOJWp8n0idgvhYf/rCGG5D1kfquKKKE0U1hqKf4b/+6YgDKWyeztfU9AdV gwDQ== X-Gm-Message-State: AA+aEWZ/azQ7ZLPB3uXNG99Jx/nQcyQY8qzm77qvOz1oBgUoIXEGMfZ0 t9Et82U4DLPdHgRY+OEqLmaWnwIOQ/4xXWcUPovcrJDL X-Google-Smtp-Source: AFSGD/UUXWOj0KdgNln1llhx4mnvi0El6qqp2sOFDYznbWfTkO6REN1txwBtXR6Sc7bJvv/aXu9GOH3WHTWjugqUEik= X-Received: by 2002:a9d:6f8e:: with SMTP id h14mr7069054otq.241.1545038019339; Mon, 17 Dec 2018 01:13:39 -0800 (PST) MIME-Version: 1.0 References: <88d19dfb-abd2-538b-4166-e42d35df8c5b@itti.com.pl> In-Reply-To: <88d19dfb-abd2-538b-4166-e42d35df8c5b@itti.com.pl> From: Rafael Machado Date: Mon, 17 Dec 2018 07:14:05 -0300 Message-ID: To: Ivan Novgorodtsev Cc: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: 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 09:13:41 -0000 Content-Type: text/plain; charset="UTF-8" Hi Ivan You need to add the declaration of ShellLib at the Nt32Pkg dsc file. Other .dsc files maybe usefull to check how to do that. Maybe you will need to add other packages after adding the ShellLib. So other errors may arise until you add all the required packages. Rafael Machado Em seg, 17 de dez de 2018 04:19, Ivan Novgorodtsev via edk2-devel < edk2-devel@lists.01.org> escreveu: > 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 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >