构建Application工程目录
mkdir edk2/ShellPkg/Application/ShellHello目录内容如下:

编写 ShellHello.c
/* edk2/ShellPkg/Application/ShellHello/ShellHello.c*/
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/DebugLib.h>
#include <Library/ShellCEntryLib.h>
EFI_STATUS                                                                                                                           
EFIAPI
ShellHelloMain (
  IN EFI_HANDLE ImageHandle,
  IN EFI_SYSTEM_TABLE *SystemTable
  )
{
  SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Hello world");
  return EFI_SUCCESS;
}定义编译脚本
/* edk2/ShellPkg/Application/ShellHello/ShellHello.inf */
[Defines]
  INF_VERS


















