Message ID | DB3PR10MB69084A558EBBDDE5FB448952E63B2@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | efibootguard-boot.py: update dtbs based on their deploydir subdir paths | expand |
pass image_fullname instead of machine as there are cases where this is appended
e.g. kas/opt/test.yml
Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py
index 4e3aefb..9451f55 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-boot.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py
@@ -181,6 +181,7 @@ class EfibootguardBootPlugin(SourcePlugin):
deploy_dir, kernel_image, initrd_image,
dtb_files, source_params):
rootfs_path = rootfs_dir.get('ROOTFS_DIR')
+ image_fullname = get_bitbake_var("IMAGE_FULLNAME")
efiarch = get_bitbake_var("EFI_ARCH")
if not efiarch:
msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n")
@@ -210,8 +211,9 @@ class EfibootguardBootPlugin(SourcePlugin):
uefi_kernel_file=uefi_kernel_file)
if dtb_files:
for dtb in dtb_files:
- cmd += ' -d {deploy_dir}/{dtb_file}'.format(
+ cmd += ' -d {deploy_dir}/{image_fullname}.dtbs/{dtb_file}'.format(
deploy_dir=deploy_dir,
+ image_fullname=image_fullname,
dtb_file=os.path.basename(dtb))
exec_cmd(cmd, as_shell=True)
On 12.04.24 16:05, nicusor.huhulea@siemens.com wrote: > pass image_fullname instead of machine as there are cases where this is appended > e.g. kas/opt/test.yml > > > Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com> > > diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py > index 4e3aefb..9451f55 100644 > --- a/scripts/lib/wic/plugins/source/efibootguard-boot.py > +++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py > @@ -181,6 +181,7 @@ class EfibootguardBootPlugin(SourcePlugin): > deploy_dir, kernel_image, initrd_image, > dtb_files, source_params): > rootfs_path = rootfs_dir.get('ROOTFS_DIR') > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > efiarch = get_bitbake_var("EFI_ARCH") > if not efiarch: > msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n") > @@ -210,8 +211,9 @@ class EfibootguardBootPlugin(SourcePlugin): > uefi_kernel_file=uefi_kernel_file) > if dtb_files: > for dtb in dtb_files: > - cmd += ' -d {deploy_dir}/{dtb_file}'.format( > + cmd += ' -d {deploy_dir}/{image_fullname}.dtbs/{dtb_file}'.format( > deploy_dir=deploy_dir, > + image_fullname=image_fullname, > dtb_file=os.path.basename(dtb)) > exec_cmd(cmd, as_shell=True) > > ________________________________________ > From: Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS) > Sent: Thursday, March 28, 2024 9:09 PM > To: cip-dev@lists.cip-project.org > Subject: [PATCH] efibootguard-boot.py: update dtbs based on their deploydir subdir paths > > This fixes the build failures detailed in the https://groups.google.com/g/isar-users/c/Va0Ue-ISYeA and > https://groups.google.com/g/isar-users/c/PSGU_AcdPZ8 > This is a continuation of the https://groups.google.com/g/isar-users/c/ZMD4XY4dKWQ > > Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com> > > diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py > index 4e3aefb..86e342c 100644 > --- a/scripts/lib/wic/plugins/source/efibootguard-boot.py > +++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py > @@ -181,6 +181,8 @@ class EfibootguardBootPlugin(SourcePlugin): > deploy_dir, kernel_image, initrd_image, > dtb_files, source_params): > rootfs_path = rootfs_dir.get('ROOTFS_DIR') > + image_basename = get_bitbake_var("IMAGE_BASENAME") > + machine = get_bitbake_var("MACHINE") > efiarch = get_bitbake_var("EFI_ARCH") > if not efiarch: > msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n") > @@ -210,8 +212,10 @@ class EfibootguardBootPlugin(SourcePlugin): > uefi_kernel_file=uefi_kernel_file) > if dtb_files: > for dtb in dtb_files: > - cmd += ' -d {deploy_dir}/{dtb_file}'.format( > + cmd += ' -d {deploy_dir}/{image_basename}-{machine}.dtbs/{dtb_file}'.format( > deploy_dir=deploy_dir, > + image_basename=image_basename, > + machine=machine, > dtb_file=os.path.basename(dtb)) > exec_cmd(cmd, as_shell=True) > This is not a properly formatted patch, plus it seems to change to a path that is not in sync with currently selected isar. Jan
fix patch formatting and will keep this on hold until the isar changes gets approved.
Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
---
scripts/lib/wic/plugins/source/efibootguard-boot.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py
index 4e3aefb..9451f55 100644
--- a/scripts/lib/wic/plugins/source/efibootguard-boot.py
+++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py
@@ -181,6 +181,7 @@ class EfibootguardBootPlugin(SourcePlugin):
deploy_dir, kernel_image, initrd_image,
dtb_files, source_params):
rootfs_path = rootfs_dir.get('ROOTFS_DIR')
+ image_fullname = get_bitbake_var("IMAGE_FULLNAME")
efiarch = get_bitbake_var("EFI_ARCH")
if not efiarch:
msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n")
@@ -210,8 +211,9 @@ class EfibootguardBootPlugin(SourcePlugin):
uefi_kernel_file=uefi_kernel_file)
if dtb_files:
for dtb in dtb_files:
- cmd += ' -d {deploy_dir}/{dtb_file}'.format(
+ cmd += ' -d {deploy_dir}/{image_fullname}.dtbs/{dtb_file}'.format(
deploy_dir=deploy_dir,
+ image_fullname=image_fullname,
dtb_file=os.path.basename(dtb))
exec_cmd(cmd, as_shell=True)
--
2.39.2
On 15.04.24 15:14, Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS) wrote: > fix patch formatting and will keep this on hold until the isar changes gets approved. > The comments I provided on your isar patch apply here as well. Plus, you didn't address all my previous remarks. Jan > > Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com> > --- > scripts/lib/wic/plugins/source/efibootguard-boot.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py > index 4e3aefb..9451f55 100644 > --- a/scripts/lib/wic/plugins/source/efibootguard-boot.py > +++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py > @@ -181,6 +181,7 @@ class EfibootguardBootPlugin(SourcePlugin): > deploy_dir, kernel_image, initrd_image, > dtb_files, source_params): > rootfs_path = rootfs_dir.get('ROOTFS_DIR') > + image_fullname = get_bitbake_var("IMAGE_FULLNAME") > efiarch = get_bitbake_var("EFI_ARCH") > if not efiarch: > msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n") > @@ -210,8 +211,9 @@ class EfibootguardBootPlugin(SourcePlugin): > uefi_kernel_file=uefi_kernel_file) > if dtb_files: > for dtb in dtb_files: > - cmd += ' -d {deploy_dir}/{dtb_file}'.format( > + cmd += ' -d {deploy_dir}/{image_fullname}.dtbs/{dtb_file}'.format( > deploy_dir=deploy_dir, > + image_fullname=image_fullname, > dtb_file=os.path.basename(dtb)) > exec_cmd(cmd, as_shell=True) > > -- > 2.39.2 > > ________________________________________ > From: Kiszka, Jan (T CED) <jan.kiszka@siemens.com> > Sent: Saturday, April 13, 2024 12:51 PM > To: Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS); cip-dev@lists.cip-project.org > Subject: Re: [PATCH] efibootguard-boot.py: update dtbs based on their deploydir subdir paths > > On 12.04.24 16:05, nicusor.huhulea@siemens.com wrote: >> pass image_fullname instead of machine as there are cases where this is appended >> e.g. kas/opt/test.yml >> >> >> Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com> >> >> diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py >> index 4e3aefb..9451f55 100644 >> --- a/scripts/lib/wic/plugins/source/efibootguard-boot.py >> +++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py >> @@ -181,6 +181,7 @@ class EfibootguardBootPlugin(SourcePlugin): >> deploy_dir, kernel_image, initrd_image, >> dtb_files, source_params): >> rootfs_path = rootfs_dir.get('ROOTFS_DIR') >> + image_fullname = get_bitbake_var("IMAGE_FULLNAME") >> efiarch = get_bitbake_var("EFI_ARCH") >> if not efiarch: >> msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n") >> @@ -210,8 +211,9 @@ class EfibootguardBootPlugin(SourcePlugin): >> uefi_kernel_file=uefi_kernel_file) >> if dtb_files: >> for dtb in dtb_files: >> - cmd += ' -d {deploy_dir}/{dtb_file}'.format( >> + cmd += ' -d {deploy_dir}/{image_fullname}.dtbs/{dtb_file}'.format( >> deploy_dir=deploy_dir, >> + image_fullname=image_fullname, >> dtb_file=os.path.basename(dtb)) >> exec_cmd(cmd, as_shell=True) >> >> ________________________________________ >> From: Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS) >> Sent: Thursday, March 28, 2024 9:09 PM >> To: cip-dev@lists.cip-project.org >> Subject: [PATCH] efibootguard-boot.py: update dtbs based on their deploydir subdir paths >> >> This fixes the build failures detailed in the https://groups.google.com/g/isar-users/c/Va0Ue-ISYeA and >> https://groups.google.com/g/isar-users/c/PSGU_AcdPZ8 >> This is a continuation of the https://groups.google.com/g/isar-users/c/ZMD4XY4dKWQ >> >> Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com> >> >> diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py >> index 4e3aefb..86e342c 100644 >> --- a/scripts/lib/wic/plugins/source/efibootguard-boot.py >> +++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py >> @@ -181,6 +181,8 @@ class EfibootguardBootPlugin(SourcePlugin): >> deploy_dir, kernel_image, initrd_image, >> dtb_files, source_params): >> rootfs_path = rootfs_dir.get('ROOTFS_DIR') >> + image_basename = get_bitbake_var("IMAGE_BASENAME") >> + machine = get_bitbake_var("MACHINE") >> efiarch = get_bitbake_var("EFI_ARCH") >> if not efiarch: >> msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n") >> @@ -210,8 +212,10 @@ class EfibootguardBootPlugin(SourcePlugin): >> uefi_kernel_file=uefi_kernel_file) >> if dtb_files: >> for dtb in dtb_files: >> - cmd += ' -d {deploy_dir}/{dtb_file}'.format( >> + cmd += ' -d {deploy_dir}/{image_basename}-{machine}.dtbs/{dtb_file}'.format( >> deploy_dir=deploy_dir, >> + image_basename=image_basename, >> + machine=machine, >> dtb_file=os.path.basename(dtb)) >> exec_cmd(cmd, as_shell=True) >> > > This is not a properly formatted patch, plus it seems to change to a > path that is not in sync with currently selected isar. > > Jan > > -- > Siemens AG, Technology > Linux Expert Center >
diff --git a/scripts/lib/wic/plugins/source/efibootguard-boot.py b/scripts/lib/wic/plugins/source/efibootguard-boot.py index 4e3aefb..86e342c 100644 --- a/scripts/lib/wic/plugins/source/efibootguard-boot.py +++ b/scripts/lib/wic/plugins/source/efibootguard-boot.py @@ -181,6 +181,8 @@ class EfibootguardBootPlugin(SourcePlugin): deploy_dir, kernel_image, initrd_image, dtb_files, source_params): rootfs_path = rootfs_dir.get('ROOTFS_DIR') + image_basename = get_bitbake_var("IMAGE_BASENAME") + machine = get_bitbake_var("MACHINE") efiarch = get_bitbake_var("EFI_ARCH") if not efiarch: msger.error("Bitbake variable 'EFI_ARCH' not set, exiting\n") @@ -210,8 +212,10 @@ class EfibootguardBootPlugin(SourcePlugin): uefi_kernel_file=uefi_kernel_file) if dtb_files: for dtb in dtb_files: - cmd += ' -d {deploy_dir}/{dtb_file}'.format( + cmd += ' -d {deploy_dir}/{image_basename}-{machine}.dtbs/{dtb_file}'.format( deploy_dir=deploy_dir, + image_basename=image_basename, + machine=machine, dtb_file=os.path.basename(dtb)) exec_cmd(cmd, as_shell=True)
This fixes the build failures detailed in the https://groups.google.com/g/isar-users/c/Va0Ue-ISYeA and https://groups.google.com/g/isar-users/c/PSGU_AcdPZ8 This is a continuation of the https://groups.google.com/g/isar-users/c/ZMD4XY4dKWQ Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>