[PATCH 1/1] fix: use UKI spec compliant name for dtb section

18 views
Skip to first unread message

Felix Moessbauer

unread,
Sep 14, 2023, 5:57:24 AM9/14/23
to efibootg...@googlegroups.com, jan.k...@siemens.com, Felix Moessbauer
The compiled device tree database file needs to be put into a section
named .dtb. This patch also is in-line with the proposed extension
of the UKI spec to explicitly allow multiple DTB sections.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
---
Please note, that I could not test this patch with multiple device
trees due to lack of a suitable board. For a single device tree it
indeed works properly.

Best regards,
Felix Moessbauer

kernel-stub/main.c | 2 +-
tools/bg_gen_unified_kernel | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel-stub/main.c b/kernel-stub/main.c
index 55873e5..425d309 100644
--- a/kernel-stub/main.c
+++ b/kernel-stub/main.c
@@ -144,7 +144,7 @@ EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
kernel_section = section;
} else if (CompareMem(section->Name, ".initrd", 8) == 0) {
initrd_section = section;
- } else if (CompareMem(section->Name, ".dtb-", 5) == 0) {
+ } else if (CompareMem(section->Name, ".dtb", 5) == 0) {
has_dtbs = TRUE;
fdt = (UINT8 *) stub_image->ImageBase +
section->VirtualAddress;
diff --git a/tools/bg_gen_unified_kernel b/tools/bg_gen_unified_kernel
index 1d426e1..c5359d9 100755
--- a/tools/bg_gen_unified_kernel
+++ b/tools/bg_gen_unified_kernel
@@ -286,7 +286,7 @@ def main():
for n in range(len(args.dtb)):
dtb.append(args.dtb[n].read())
sect_size = align(len(dtb[n]), file_align)
- section = Section(bytes('.dtb-{}'.format(n + 1), 'ascii'),
+ section = Section(bytes('.dtb', 'ascii'),
sect_size, dtb_virt, sect_size, current_offs,
Section.IMAGE_SCN_CNT_INITIALIZED_DATA |
Section.IMAGE_SCN_MEM_READ)
--
2.39.2

Jan Kiszka

unread,
Sep 14, 2023, 6:37:22 AM9/14/23
to Felix Moessbauer, efibootg...@googlegroups.com, Lopes Ivo, Diogo Miguel (T CED IFD-PT)
Let's wait for https://github.com/systemd/systemd/pull/28959 to settle -
or did you settle already, Diogo?

Jan

--
Siemens AG, Technology
Linux Expert Center

Lopes Ivo, Diogo Miguel

unread,
Sep 14, 2023, 6:42:20 AM9/14/23
to Kiszka, Jan, MOESSBAUER, FELIX JONATHAN, efibootg...@googlegroups.com
Hi,

The systemd-boot implementation is still waiting for the next round of review comments, which I am guessing will take longer than usual due to the AllSystemsGo conference happening at the moment.

Diogo

From: Kiszka, Jan (T CED) <jan.k...@siemens.com>
Sent: Thursday, September 14, 2023 11:37 AM
To: MOESSBAUER, Felix (T CED INW-CN) <felix.mo...@siemens.com>; efibootg...@googlegroups.com <efibootg...@googlegroups.com>; Lopes Ivo, Diogo Miguel (T CED IFD-PT) <diog...@siemens.com>
Subject: Re: [PATCH 1/1] fix: use UKI spec compliant name for dtb section
 

JEMS EBERHARD HORBEL

unread,
Dec 9, 2023, 2:03:47 PM12/9/23
to EFI Boot Guard
DIRECT SENDER IS HERE LETS DEAL.

JENS EBERHARD



MT103/202 DIRECT WIRE TRANSFER
PAYPAL TRANSFER
CASHAPP TRANSFER
ZELLE TRANSFER
TRANSFER WISE
WESTERN UNION TRANSFER
BITCOIN FLASHING 
BANK ACCOUNT LOADING/FLASHING
IBAN TO IBAN TRANSFER
MONEYGRAM TRANSFER
SLBC PROVIDER
CREDIT CARD TOP UP
SEPA TRANSFER
WIRE TRANSFER
GLOBALPAY INC US

Thanks.


NOTE; ONLY SERIOUS / RELIABLE RECEIVERS CAN CONTACT.

DM ME ON WHATSAPP FOR A SERIOUS DEAL.

+447405129573
Reply all
Reply to author
Forward
0 new messages