From: Ivan Novgorodtsev <ivan.novgorodtsev@itti.com.pl>
To: edk2-devel@lists.01.org
Subject: UEFI Driver/Application
Date: Mon, 17 Dec 2018 08:11:13 +0100 [thread overview]
Message-ID: <88d19dfb-abd2-538b-4166-e42d35df8c5b@itti.com.pl> (raw)
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
next reply other threads:[~2018-12-17 7:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-17 7:11 Ivan Novgorodtsev [this message]
2018-12-17 10:14 ` UEFI Driver/Application Rafael Machado
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=88d19dfb-abd2-538b-4166-e42d35df8c5b@itti.com.pl \
--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