* [PATCH 0/2] Set reasonable defaults for WKS_FILE value
@ 2024-11-14 13:48 Anton Mikanovich
2024-11-14 13:48 ` [PATCH 1/2] meta: Add missing COREBASE variable Anton Mikanovich
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Anton Mikanovich @ 2024-11-14 13:48 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Current default for WKS_FILE supposed to be used on targets with EFI
support, so targets with architectures riscv64 and mipsel will fail on
using it. Set some other WKS_FILE defaults supported by that targets.
This change requires COREBASE variable set by meta layer (just like it
is implemented in OE). This variable specifies the parent directory of
meta layer and was used in bitbake and Isar code without being
initialized.
Anton Mikanovich (2):
meta: Add missing COREBASE variable
wic: Set default WKS_FILE for non efi targets
meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks | 5 +++++
meta/classes/imagetypes_wic.bbclass | 3 +++
meta/conf/layer.conf | 3 +++
3 files changed, 11 insertions(+)
create mode 100644 meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks
--
2.34.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20241114134829.1466035-1-amikan%40ilbers.de.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] meta: Add missing COREBASE variable
2024-11-14 13:48 [PATCH 0/2] Set reasonable defaults for WKS_FILE value Anton Mikanovich
@ 2024-11-14 13:48 ` Anton Mikanovich
2024-11-14 13:48 ` [PATCH 2/2] wic: Set default WKS_FILE for non efi targets Anton Mikanovich
2024-11-21 6:49 ` [PATCH 0/2] Set reasonable defaults for WKS_FILE value Uladzimir Bely
2 siblings, 0 replies; 6+ messages in thread
From: Anton Mikanovich @ 2024-11-14 13:48 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
This variable specifies the parent directory of meta layer and was used
in bitbake and Isar code without being initialized.
Setting this variable will fix the usage of WKS_FILES from default WIC.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/conf/layer.conf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index b622ce69..15f01233 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -19,3 +19,6 @@ LAYERVERSION_core = "1"
LAYERSERIES_COMPAT_core = "v0.6"
LAYERDIR_core = "${LAYERDIR}"
+
+# Set a variable to get to the top of the metadata location
+COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
--
2.34.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20241114134829.1466035-2-amikan%40ilbers.de.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] wic: Set default WKS_FILE for non efi targets
2024-11-14 13:48 [PATCH 0/2] Set reasonable defaults for WKS_FILE value Anton Mikanovich
2024-11-14 13:48 ` [PATCH 1/2] meta: Add missing COREBASE variable Anton Mikanovich
@ 2024-11-14 13:48 ` Anton Mikanovich
2025-01-17 13:05 ` 'Jan Kiszka' via isar-users
2024-11-21 6:49 ` [PATCH 0/2] Set reasonable defaults for WKS_FILE value Uladzimir Bely
2 siblings, 1 reply; 6+ messages in thread
From: Anton Mikanovich @ 2024-11-14 13:48 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
As riscv64 and mipsel are not supported by grub-efi set other default
WKS_FILE values for them.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks | 5 +++++
meta/classes/imagetypes_wic.bbclass | 3 +++
2 files changed, 8 insertions(+)
create mode 100644 meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks
diff --git a/meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks b/meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks
new file mode 100644
index 00000000..02a9fdf2
--- /dev/null
+++ b/meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks
@@ -0,0 +1,5 @@
+# short-description: Create qcow2 image for QEMU machines
+
+part / --source rootfs --fstype=ext4 --label root --align 4096 --size 4G
+
+bootloader
diff --git a/meta/classes/imagetypes_wic.bbclass b/meta/classes/imagetypes_wic.bbclass
index 3b697cdd..0a8d4b4d 100644
--- a/meta/classes/imagetypes_wic.bbclass
+++ b/meta/classes/imagetypes_wic.bbclass
@@ -8,6 +8,9 @@ USING_WIC = "${@bb.utils.contains('IMAGE_BASETYPES', 'wic', '1', '0', d)}"
WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if bb.utils.to_boolean(d.getVar('USING_WIC')) else ''}"
WKS_FILE ??= "sdimage-efi"
+# grub-efi is incompatible with targets riscv64 and mipsel
+WKS_FILE:riscv64 ??= "qemuriscv"
+WKS_FILE:mipsel ??= "qemudefault"
do_copy_wks_template[file-checksums] += "${WKS_FILE_CHECKSUM}"
do_copy_wks_template[vardepsexclude] += "WKS_TEMPLATE_PATH"
--
2.34.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20241114134829.1466035-3-amikan%40ilbers.de.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Set reasonable defaults for WKS_FILE value
2024-11-14 13:48 [PATCH 0/2] Set reasonable defaults for WKS_FILE value Anton Mikanovich
2024-11-14 13:48 ` [PATCH 1/2] meta: Add missing COREBASE variable Anton Mikanovich
2024-11-14 13:48 ` [PATCH 2/2] wic: Set default WKS_FILE for non efi targets Anton Mikanovich
@ 2024-11-21 6:49 ` Uladzimir Bely
2 siblings, 0 replies; 6+ messages in thread
From: Uladzimir Bely @ 2024-11-21 6:49 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On Thu, 2024-11-14 at 15:48 +0200, Anton Mikanovich wrote:
> Current default for WKS_FILE supposed to be used on targets with EFI
> support, so targets with architectures riscv64 and mipsel will fail
> on
> using it. Set some other WKS_FILE defaults supported by that targets.
>
> This change requires COREBASE variable set by meta layer (just like
> it
> is implemented in OE). This variable specifies the parent directory
> of
> meta layer and was used in bitbake and Isar code without being
> initialized.
>
> Anton Mikanovich (2):
> meta: Add missing COREBASE variable
> wic: Set default WKS_FILE for non efi targets
>
> meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks | 5 +++++
> meta/classes/imagetypes_wic.bbclass | 3 +++
> meta/conf/layer.conf | 3 +++
> 3 files changed, 11 insertions(+)
> create mode 100644 meta-isar/scripts/lib/wic/canned-
> wks/qemudefault.wks
>
> --
> 2.34.1
>
Applied to next.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/cdb8ae0a34caa03ba2a15ae6eb6cf0cd8c86ac78.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] wic: Set default WKS_FILE for non efi targets
2024-11-14 13:48 ` [PATCH 2/2] wic: Set default WKS_FILE for non efi targets Anton Mikanovich
@ 2025-01-17 13:05 ` 'Jan Kiszka' via isar-users
2025-01-17 13:45 ` Anton Mikanovich
0 siblings, 1 reply; 6+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-01-17 13:05 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On 14.11.24 14:48, Anton Mikanovich wrote:
> As riscv64 and mipsel are not supported by grub-efi set other default
> WKS_FILE values for them.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks | 5 +++++
> meta/classes/imagetypes_wic.bbclass | 3 +++
> 2 files changed, 8 insertions(+)
> create mode 100644 meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks
>
> diff --git a/meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks b/meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks
> new file mode 100644
> index 00000000..02a9fdf2
> --- /dev/null
> +++ b/meta-isar/scripts/lib/wic/canned-wks/qemudefault.wks
> @@ -0,0 +1,5 @@
> +# short-description: Create qcow2 image for QEMU machines
> +
> +part / --source rootfs --fstype=ext4 --label root --align 4096 --size 4G
> +
> +bootloader
> diff --git a/meta/classes/imagetypes_wic.bbclass b/meta/classes/imagetypes_wic.bbclass
> index 3b697cdd..0a8d4b4d 100644
> --- a/meta/classes/imagetypes_wic.bbclass
> +++ b/meta/classes/imagetypes_wic.bbclass
> @@ -8,6 +8,9 @@ USING_WIC = "${@bb.utils.contains('IMAGE_BASETYPES', 'wic', '1', '0', d)}"
> WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if bb.utils.to_boolean(d.getVar('USING_WIC')) else ''}"
>
> WKS_FILE ??= "sdimage-efi"
> +# grub-efi is incompatible with targets riscv64 and mipsel
> +WKS_FILE:riscv64 ??= "qemuriscv"
> +WKS_FILE:mipsel ??= "qemudefault"
This part was wrong, breaking downstream layers: overrides win over
normal assignments. So,
WKS_FILE = "my-file"
will lose in the face of the above. Fixing...
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/ab80b2ec-cee3-44e9-9ed4-127f2b17521d%40siemens.com.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] wic: Set default WKS_FILE for non efi targets
2025-01-17 13:05 ` 'Jan Kiszka' via isar-users
@ 2025-01-17 13:45 ` Anton Mikanovich
0 siblings, 0 replies; 6+ messages in thread
From: Anton Mikanovich @ 2025-01-17 13:45 UTC (permalink / raw)
To: Jan Kiszka, isar-users
17/01/2025 15:05, Jan Kiszka wrote:
> On 14.11.24 14:48, Anton Mikanovich wrote:
>> diff --git a/meta/classes/imagetypes_wic.bbclass b/meta/classes/imagetypes_wic.bbclass
>> index 3b697cdd..0a8d4b4d 100644
>> --- a/meta/classes/imagetypes_wic.bbclass
>> +++ b/meta/classes/imagetypes_wic.bbclass
>> @@ -8,6 +8,9 @@ USING_WIC = "${@bb.utils.contains('IMAGE_BASETYPES', 'wic', '1', '0', d)}"
>> WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if bb.utils.to_boolean(d.getVar('USING_WIC')) else ''}"
>>
>> WKS_FILE ??= "sdimage-efi"
>> +# grub-efi is incompatible with targets riscv64 and mipsel
>> +WKS_FILE:riscv64 ??= "qemuriscv"
>> +WKS_FILE:mipsel ??= "qemudefault"
> This part was wrong, breaking downstream layers: overrides win over
> normal assignments. So,
>
> WKS_FILE = "my-file"
>
> will lose in the face of the above. Fixing...
>
> Jan
>
Hello Jan,
Thanks for checking. This change was introduced as a hotfix for the
installer
image creation of riscv64 and mipsel targets with no WKS_FILE provided in
machine config (to make it works just like any other arch). As this
syntax is
wrong we need to find some other style for the fix.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/5ccbec3d-1faa-45c7-b649-9604c345bf9e%40ilbers.de.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-17 13:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-14 13:48 [PATCH 0/2] Set reasonable defaults for WKS_FILE value Anton Mikanovich
2024-11-14 13:48 ` [PATCH 1/2] meta: Add missing COREBASE variable Anton Mikanovich
2024-11-14 13:48 ` [PATCH 2/2] wic: Set default WKS_FILE for non efi targets Anton Mikanovich
2025-01-17 13:05 ` 'Jan Kiszka' via isar-users
2025-01-17 13:45 ` Anton Mikanovich
2024-11-21 6:49 ` [PATCH 0/2] Set reasonable defaults for WKS_FILE value Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox