public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Rafael Machado <rafaelrodrigues.machado@gmail.com>
To: Ivan Novgorodtsev <ivan.novgorodtsev@itti.com.pl>
Cc: edk2-devel@lists.01.org
Subject: Re: UEFI Driver/Application
Date: Mon, 17 Dec 2018 07:14:05 -0300	[thread overview]
Message-ID: <CACgnt79eesfkakK=wuBmhu7JvGav6sty49odrhEoyD1e1RkdEw@mail.gmail.com> (raw)
In-Reply-To: <88d19dfb-abd2-538b-4166-e42d35df8c5b@itti.com.pl>

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 <Library/ShellLib.h>
>
> ...
>
> 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
>


      reply	other threads:[~2018-12-17  9:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  7:11 UEFI Driver/Application Ivan Novgorodtsev
2018-12-17 10:14 ` Rafael Machado [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACgnt79eesfkakK=wuBmhu7JvGav6sty49odrhEoyD1e1RkdEw@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox