public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] Universal UEFI ELF payload for SBL
@ 2025-03-06  6:36 Stepan via groups.io
  2025-03-06  6:43 ` Stepan via groups.io
  0 siblings, 1 reply; 4+ messages in thread
From: Stepan via groups.io @ 2025-03-06  6:36 UTC (permalink / raw)
  To: devel


[-- Attachment #1.1: Type: text/plain, Size: 1705 bytes --]

Hello EDK II community,

We are currently trying to build universal payload in ELF format and load it by SBL. The changes that we have made to the platform description file are available in this topic ( https://edk2.groups.io/g/devel/topic/110868214 ).

We are following the following steps:

Building universal payload: python UefiPayloadPkg/UniversalPayloadBuild.py -a X64 -b DEBUG -t GCC5 (build log available in attachments).

Building SBL with ELF payload: python BuildLoader.py build adls -p "OsLoader.efi:LLDR:Lz4;UEFIPAYLOAD.elf:UEFI:Lzma" (build log available in attachments).

Stitching SBL bin and IFWI, flashing into chip and trying load.

We are use debugger and view that:
NormalBootPath() (/sbl/BootloaderCorePkg/Stage2/Stage2.c) loads payload ( Dst = (UINT32 *)(UINTN)PreparePayload (Stage2Param) ), check format ( IsElfFormat ((CONST UINT8 *)Dst) ) and jump into LoadElfPayload().
LoadElfPayload() (/sbl/BootloaderCommonPkg/Library/UniversalPayloadLib/UniversalPayloadLib.c) parses elf image by ParseElfImage() (/sbl/BootloaderCommonPkg/Library/ElfLib/ElfLib.c) and fills ELF_IMAGE_CONTEXT structure.

During the parsing, we noticed that ImageAddress and PreferredImageAdress are 0x0. This is the reason why LoadElfImage() returns EFI_INVALID_PARAMETER.

Can You help us understand what our mistake is?


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121154): https://edk2.groups.io/g/devel/message/121154
Mute This Topic: https://groups.io/mt/111543703/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #1.2: Type: text/html, Size: 3474 bytes --]

[-- Attachment #2: 01.png --]
[-- Type: image/png, Size: 77598 bytes --]

[-- Attachment #3: 02.png --]
[-- Type: image/png, Size: 58602 bytes --]

[-- Attachment #4: 11.png --]
[-- Type: image/png, Size: 101538 bytes --]

[-- Attachment #5: 12.png --]
[-- Type: image/png, Size: 89660 bytes --]

[-- Attachment #6: 13.png --]
[-- Type: image/png, Size: 101494 bytes --]

[-- Attachment #7: 14.png --]
[-- Type: image/png, Size: 72827 bytes --]

[-- Attachment #8: 03.png --]
[-- Type: image/png, Size: 57567 bytes --]

[-- Attachment #9: 04.png --]
[-- Type: image/png, Size: 52855 bytes --]

[-- Attachment #10: 05.png --]
[-- Type: image/png, Size: 57600 bytes --]

[-- Attachment #11: 06.png --]
[-- Type: image/png, Size: 58470 bytes --]

[-- Attachment #12: 07.png --]
[-- Type: image/png, Size: 59203 bytes --]

[-- Attachment #13: 08.png --]
[-- Type: image/png, Size: 61283 bytes --]

[-- Attachment #14: 09.png --]
[-- Type: image/png, Size: 55474 bytes --]

[-- Attachment #15: 10.png --]
[-- Type: image/png, Size: 55402 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-18  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06  6:36 [edk2-devel] Universal UEFI ELF payload for SBL Stepan via groups.io
2025-03-06  6:43 ` Stepan via groups.io
2025-03-13  3:55   ` Guo Dong via groups.io
2025-03-18  8:42     ` Stepan via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox