public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Stepan via groups.io" <radio-fan=mail.ru@groups.io>
To: devel@edk2.groups.io
Subject: [edk2-devel] Universal UEFI ELF payload for SBL
Date: Wed, 05 Mar 2025 22:36:08 -0800	[thread overview]
Message-ID: <OWGf.1741242968935912917.Dx2J@groups.io> (raw)


[-- 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 --]

             reply	other threads:[~2025-03-06  6:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06  6:36 Stepan via groups.io [this message]
2025-03-06  6:43 ` [edk2-devel] Universal UEFI ELF payload for SBL Stepan via groups.io
2025-03-13  3:55   ` Guo Dong via groups.io
2025-03-18  8:42     ` Stepan via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OWGf.1741242968935912917.Dx2J@groups.io \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox