UEFI的MdeModulePkg/Application/HelloWorld带子目录工程示例

1、edk22/MdeModulePkg/Application/HelloWorld# cat HelloWorld.c

#include <Uefi.h>
#include <Library/PcdLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>

#include <Print/Print.h>


EFI_STATUS EFIAPI UefiMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
{
    Print(L"Hello Renqihong jiayou!!!!\r\n");
    
    Print11();

    return EFI_SUCCESS;
}

2、edk22/MdeModulePkg/Application/HelloWorld# cat Print/Print.c
#include <Uefi.h>

 

#include <Print.h>

EFI_STATUS Print11()
{
    Print(L"Hello Renqihong jiayou2222!!!!\r\n");

    return EFI_SUCCESS;
}

3、edk22/MdeModulePkg/Application/HelloWorld# cat Print/Print.h

EFI_STATUS Print11();

4、edk22/MdeModulePkg/Application/HelloWorld# cat HelloWorld.inf 

[Defines]
  INF_VERSION                    = 0x00010005
  BASE_NAME                      = HelloWorld
  MODULE_UNI_FILE                = HelloWorld.uni
  FILE_GUID                      = 6987936E-ED34-44db-AE97-1FA5E4ED2116
  MODULE_TYPE                    = UEFI_APPLICATION
  VERSION_STRING                 = 1.0
  ENTRY_POINT                    = UefiMain

  UEFI_HII_RESOURCE_SECTION      = TRUE

[Sources]
  HelloWorld.c
  HelloWorldStr.uni
  Print/Print.c
  Print/Print.h

[Packages]
  MdePkg/MdePkg.dec
  MdeModulePkg/MdeModulePkg.dec

[LibraryClasses]
  UefiApplicationEntryPoint
  UefiLib
  PcdLib

5、运行效果:

UEFI的MdeModulePkg/Application/HelloWorld带子目录工程示例

 

上一篇:关于重装系统后Boot下EFI的Windows Boot Manager括号中不是系统盘的问题


下一篇:Web 性能测试-内存泄漏测试方法之chrome内存快照