public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] wic: bootimg-efi-isar: Add support for loading device tree files
Date: Mon, 11 Jul 2022 17:14:09 +0200	[thread overview]
Message-ID: <360ce666-6b17-d0ce-08fe-f195cdebe675@siemens.com> (raw)
In-Reply-To: <20220711151214.271e944a@md1za8fc.ad001.siemens.net>

On 11.07.22 15:12, Henning Schild wrote:
> Am Sun, 10 Jul 2022 22:51:44 +0200
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> 
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> For device tree using systems, add support to set a custom devices
>> tree during UEFI boot. This requires to copy the DTB file to the boot
>> partition and to add the respective loader entries to the
>> configuration files.
>>
>> Both grub and systemd-boot support only loading a specific device
>> tree. Therefore refuse to work if DTB_FILES contains more than one
>> entry.
>>
>> This has been tested with grub from bullseye and systemd from
>> bullseye-backport. The latter is needed as only systemd 250 gained the
>> required feature.
>>
>> Out of scope are overlays (only supported by systemd-boot) as well as
>> unified kernel images (practically broken on non-x86 with current
>> toolchains).
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  meta/classes/imagetypes_wic.bbclass           |  2 +-
>>  .../wic/plugins/source/bootimg-efi-isar.py    | 39
>> +++++++++++++------ 2 files changed, 29 insertions(+), 12 deletions(-)
>>
>> diff --git a/meta/classes/imagetypes_wic.bbclass
>> b/meta/classes/imagetypes_wic.bbclass index 61a74d4a..3a577f71 100644
>> --- a/meta/classes/imagetypes_wic.bbclass
>> +++ b/meta/classes/imagetypes_wic.bbclass
>> @@ -106,7 +106,7 @@ WICVARS += "\
>>             ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
>> TARGET_SYS TRANSLATED_TARGET_ARCH" 
>>  # Isar specific vars used in our plugins
>> -WICVARS += "DISTRO DISTRO_ARCH"
>> +WICVARS += "DISTRO DISTRO_ARCH DTB_FILES"
>>  
>>  python do_rootfs_wicenv () {
>>      wicvars = d.getVar('WICVARS', True)
>> diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py
>> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index
>> a24e04f3..aff51e81 100644 ---
>> a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++
>> b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py 
> 
> This file is a fork from OE with very minimal non-functional changes to
> make it into Isar. I am afraid that feature will have to make it via OE.
> 

Right, from

 bootimg-efi-isar.py |   65 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 59 insertions(+), 6 deletions(-)

to

 bootimg-efi-isar.py |  104 +++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 87 insertions(+), 17 deletions(-)

The problem is that OE core has no DTB_FILES, and seems like not even a 
concept of injecting DTBs via the bootloader, thus passing them to wic.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux

  reply	other threads:[~2022-07-11 15:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-10 20:51 Jan Kiszka
2022-07-11 13:12 ` Henning Schild
2022-07-11 15:14   ` Jan Kiszka [this message]
2022-07-11 16:12     ` Henning Schild
2022-07-11 16:31       ` Jan Kiszka

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-all 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=360ce666-6b17-d0ce-08fe-f195cdebe675@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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