From 208b9c0dec67b06c404b500cb976d7d0d9e01795 Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Thu, 28 Jul 2022 11:38:50 +0300 Subject: Add createNewShellApp.sh script Signed-off-by: Konstantin Aladyshev --- scripts/createNewShellApp.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 scripts/createNewShellApp.sh (limited to 'scripts/createNewShellApp.sh') diff --git a/scripts/createNewShellApp.sh b/scripts/createNewShellApp.sh new file mode 100755 index 0000000..9674142 --- /dev/null +++ b/scripts/createNewShellApp.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# This is a simple script that creates a basic structure for your new UEFI shell 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 = ShellCEntryLib + +[Sources] + ${APP_NAME}.c + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + ShellCEntryLib + UefiLib +EOF + +cat << EOF > UefiLessonsPkg/${APP_NAME}/${APP_NAME}.c +#include +#include + +INTN +EFIAPI +ShellAppMain ( + IN UINTN Argc, + IN CHAR16 **Argv + ) +{ + return EFI_SUCCESS; +} +EOF + -- cgit v1.2.3-18-g5258