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: Fix non-existing initrd case
Date: Mon, 17 Oct 2022 09:55:36 +0200	[thread overview]
Message-ID: <9bbc8c30-7ca7-25cb-0f5a-786028fa939f@siemens.com> (raw)
In-Reply-To: <20221017094944.1eb72c20@md1za8fc.ad001.siemens.net>

On 17.10.22 09:49, Henning Schild wrote:
> Am Sun, 16 Oct 2022 13:22:52 +0200
> schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> 
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> An initrd is optional, and most callers of isar_get_filenames are
>> taking this into acount already. Adjust the last one and stop bailing
>> out from the helper if there is no initrd file.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  meta/scripts/lib/wic/plugins/isarpluginbase.py            | 2 +-
>>  .../scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py | 8
>> +++++--- 2 files changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/scripts/lib/wic/plugins/isarpluginbase.py
>> b/meta/scripts/lib/wic/plugins/isarpluginbase.py index
>> 68af2208..99e552e0 100644 ---
>> a/meta/scripts/lib/wic/plugins/isarpluginbase.py +++
>> b/meta/scripts/lib/wic/plugins/isarpluginbase.py @@ -36,6 +36,6 @@
>> def isar_get_filenames(rootfs_dir): if not
>> os.path.isfile(os.path.join(rootfs_dir, "boot", kernel)): raise
>> WicError("kernel %s not found" % (os.path.join(rootfs_dir, "boot",
>> kernel))) if not os.path.isfile(os.path.join(rootfs_dir, "boot",
>> initrd)):
>> -        raise WicError("initrd %s not found" %
>> (os.path.join(rootfs_dir, "boot", initrd)))
>> +        initrd = None
>>  
>>      return kernel, initrd
>> diff --git
>> a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
>> b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py index
>> 7fb0f2a8..43f4bec4 100644 ---
>> a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++
>> b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@
>> -141,9 +141,11 @@ class BootimgPcbiosIsarPlugin(SourcePlugin):
>> syslinux_conf += "APPEND label=boot root=%s %s\n" % \
>> (creator.rootdev, bootloader.append) 
>> -            # we are using an initrd, smuggle it in
>> -            syslinux_conf = syslinux_conf.replace(" root=%s " %
>> (creator.rootdev),
>> -                                                  " root=%s
>> initrd=%s " % (creator.rootdev, initrd))
>> +            # if we are using an initrd, smuggle it in
>> +            if initrd:
>> +                syslinux_conf = syslinux_conf.replace(
>> +                    " root=%s " % (creator.rootdev),
>> +                    " root=%s initrd=%s " % (creator.rootdev,
>> initrd))
> 
> I did not check but am pretty sure this is forking patch we should
> rather get applied in OE first.
> 

Forking -isar in OE core??? Hard to believe ;)

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


  reply	other threads:[~2022-10-17  7:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 11:22 Jan Kiszka
2022-10-17  7:49 ` Henning Schild
2022-10-17  7:55   ` Jan Kiszka [this message]
2022-10-17  7:58     ` Jan Kiszka
2022-10-17  8:05     ` Henning Schild
2022-10-24 10:39 ` Anton Mikanovich

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=9bbc8c30-7ca7-25cb-0f5a-786028fa939f@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