diff options
author | Konstantin Aladyshev <aladyshev22@gmail.com> | 2021-10-20 12:11:05 +0300 |
---|---|---|
committer | Konstantin Aladyshev <aladyshev22@gmail.com> | 2021-10-20 12:13:58 +0300 |
commit | 06a8161b7732af86c52131cb4eb022d6bd263c9e (patch) | |
tree | 1b8fe066477d2ccaeed2e4dacbfde56a1e2dc311 /Lessons/Lesson_43/createNewApp.sh | |
parent | b139756457b4ba82db773e0114e0684dc1cefdfe (diff) | |
download | UEFI-Lessons-06a8161b7732af86c52131cb4eb022d6bd263c9e.tar.gz UEFI-Lessons-06a8161b7732af86c52131cb4eb022d6bd263c9e.tar.bz2 UEFI-Lessons-06a8161b7732af86c52131cb4eb022d6bd263c9e.zip |
Add lesson 43
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Diffstat (limited to 'Lessons/Lesson_43/createNewApp.sh')
-rwxr-xr-x | Lessons/Lesson_43/createNewApp.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Lessons/Lesson_43/createNewApp.sh b/Lessons/Lesson_43/createNewApp.sh new file mode 100755 index 0000000..9fde27f --- /dev/null +++ b/Lessons/Lesson_43/createNewApp.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# This is a simple script that creates a basic structure for your new UEFI application +# Put this script in your edk2 folder and run it with 1 argument - your new application name + +APP_NAME=${1} + +UUID=$(uuidgen) + +mkdir -p UefiLessonsPkg/${APP_NAME} + +cat << EOF > UefiLessonsPkg/${APP_NAME}/${APP_NAME}.inf +[Defines] + INF_VERSION = 1.25 + BASE_NAME = ${APP_NAME} + FILE_GUID = ${UUID} + MODULE_TYPE = UEFI_APPLICATION + VERSION_STRING = 1.0 + ENTRY_POINT = UefiMain + +[Sources] + ${APP_NAME}.c + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + UefiApplicationEntryPoint + UefiLib +EOF + +cat << EOF > UefiLessonsPkg/${APP_NAME}/${APP_NAME}.c +#include <Library/UefiBootServicesTableLib.h> +#include <Library/UefiLib.h> + +EFI_STATUS +EFIAPI +UefiMain ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + return EFI_SUCCESS; +} +EOF + |