initial commit

This commit is contained in:
PoliEcho 2025-08-12 10:49:20 +02:00
commit da399b0b76
8 changed files with 126 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "edk2"]
path = edk2
url = https://github.com/tianocore/edk2.git

29
UEFI_fireworks.dec Normal file
View File

@ -0,0 +1,29 @@
[Defines]
DEC_SPECIFICATION = 0x00010005
PACKAGE_NAME = UEFI_fireworks
PACKAGE_GUID = E0EBB5C7-E372-485F-AE86-38BF05792885
PACKAGE_VERSION = 1.0
[Includes]
src
[LibraryClasses]
UefiApplicationEntryPoint|edk2/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
UefiLib|edk2/MdePkg/Library/UefiLib/UefiLib.inf
BaseLib|edk2/MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
MemoryAllocationLib|edk2/MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
DevicePathLib|edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
UefiBootServicesTableLib|edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiRuntimeServicesTableLib|edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
DebugLib|edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
PrintLib|edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf
PcdLib|edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
RegisterFilterLib|edk2/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
[Guids]
[Ppis]
[Protocols]

28
UEFI_fireworks.dsc Normal file
View File

@ -0,0 +1,28 @@
[Defines]
PLATFORM_NAME = UEFI_fireworks
PLATFORM_GUID = A05265BC-6F89-4969-9CC3-5F2D8C99CF39
PLATFORM_VERSION = 1.0
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/UEFI_fireworks
SUPPORTED_ARCHITECTURES = X64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
[LibraryClasses]
UefiApplicationEntryPoint|edk2/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
UefiLib|edk2/MdePkg/Library/UefiLib/UefiLib.inf
BaseLib|edk2/MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
MemoryAllocationLib|edk2/MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
DevicePathLib|edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
UefiBootServicesTableLib|edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiRuntimeServicesTableLib|edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
DebugLib|edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
PrintLib|edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf
PcdLib|edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
RegisterFilterLib|edk2/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
StackCheckLib|edk2/MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf
[Components]
src/UEFI_fireworks/UEFI_fireworks.inf

5
build.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
export PACKAGES_PATH=$PWD:$PWD/edk2
build -a X64 -t GCC5 -p UEFI_fireworks.dsc
mkdir -p build
cp edk2/Build/UEFI_fireworks/DEBUG_GCC5/X64/UEFI_fireworks.efi build/

1
edk2 Submodule

@ -0,0 +1 @@
Subproject commit 808f1f1f87c87b4005d9bdf1076b7fc92ad64736

View File

@ -0,0 +1,31 @@
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = UEFI_fireworks
FILE_GUID = 84D67930-D3DD-48F7-8B01-42CE018232AB
MODULE_TYPE = UEFI_APPLICATION
VERSION_STRING = 1.0
ENTRY_POINT = UefiMain
[Sources]
UefiMain.c
[Packages]
edk2/MdePkg/MdePkg.dec
[LibraryClasses]
UefiApplicationEntryPoint
UefiLib
BaseLib
BaseMemoryLib
MemoryAllocationLib
DevicePathLib
UefiBootServicesTableLib
UefiRuntimeServicesTableLib
DebugLib
PrintLib
[Protocols]
[Guids]
[Pcd]

View File

@ -0,0 +1,28 @@
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Uefi.h>
EFI_STATUS EFIAPI UefiMain(IN EFI_HANDLE imgHandle,
IN EFI_SYSTEM_TABLE *sysTable) {
gST = sysTable;
gBS = sysTable->BootServices;
gImageHandle = imgHandle;
// UEFI apps automatically exit after 5 minutes. Stop that here
gBS->SetWatchdogTimer(0, 0, 0, NULL);
Print(L"Hello, world!\r\n");
// Allocate a string
CHAR16 *str = NULL;
gBS->AllocatePool(EfiLoaderData, 36, (VOID **)&str);
// Copy over a string
CHAR16 *str2 = L"Allocated string\r\n";
gBS->CopyMem((VOID *)str, (VOID *)str2, 36);
Print(str);
gBS->FreePool(str);
return EFI_SUCCESS;
}