Skip to contentSkip to conversation

image_types_wic.bbclass: Ensure '-c image_wic' works

PATCH Superseded Otavio Salvador 3 participants 5 messages Dec 19, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 image_types_wic.bbclass: Ensure '-c image_wic' works

The 'wic' image may use files which has been deployed (e.g in do_deploy) for some partitions that may need to be copied in a specific partition or filesystem (e.g a bootloader).

When using 'bitbake <image> -c image_wic', from a clean build, the contents of do_deploy must also be available so we need to ensure all do_build of the image dependencies has been complete.

---

 meta/classes/image_types_wic.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/image_types_wic.bbclass +3 -0
index 222ae00433..4d7305a3a3 100644
@@ -41,6 +41,9 @@ WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
 do_image_wic[depends] += "${@' '.join('%s-native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk', 'dosfstools', 'mtools'))}"
 
+# We ensure all artfacts are deployed (e.g virtual/bootloader)
+do_image_wic[recrdeptask] += "do_build"
+
 WKS_FILE_DEPENDS_DEFAULT = "syslinux-native bmap-tools-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native"
 WKS_FILE_DEPENDS_BOOTLOADERS = ""
 WKS_FILE_DEPENDS_BOOTLOADERS_x86 = "syslinux grub-efi systemd-boot"
Signature · 1 line
2.15.1
#1 lore raw
Quoted 27 lines · Otavio Salvador

The 'wic' image may use files which has been deployed (e.g in do_deploy) for some partitions that may need to be copied in a specific partition or filesystem (e.g a bootloader).

When using 'bitbake <image> -c image_wic', from a clean build, the contents of do_deploy must also be available so we need to ensure all do_build of the image dependencies has been complete.

---

 meta/classes/image_types_wic.bbclass | 3 +++

 1 file changed, 3 insertions(+)
meta/classes/image_types_wic.bbclass +0 -0
index 222ae00433..4d7305a3a3 100644
@@ -41,6 +41,9 @@ WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
 os.path.exists('${WKS_FULL_PATH}

 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}" do_image_wic[depends] += "${@' '.join('%s- native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk', 'dosfstools', 'mtools'))}"

meta/classes/image_types_wic.bbclass WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH} · line 45

Quoted 2 lines
meta/classes/image_types_wic.bbclass +2 -0
+# We ensure all artfacts are deployed (e.g virtual/bootloader)
+do_image_wic[recrdeptask] += "do_build"

Shouldn't that be do_deploy instead of do_build?

Cheers,

Richard

#2 lore raw
Quoted 28 lines · Richard Purdie
Quoted 27 lines · Otavio Salvador

The 'wic' image may use files which has been deployed (e.g in do_deploy) for some partitions that may need to be copied in a specific partition or filesystem (e.g a bootloader).

When using 'bitbake <image> -c image_wic', from a clean build, the contents of do_deploy must also be available so we need to ensure all do_build of the image dependencies has been complete.

---

 meta/classes/image_types_wic.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/image_types_wic.bbclass +0 -0
index 222ae00433..4d7305a3a3 100644
@@ -41,6 +41,9 @@ WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
 os.path.exists('${WKS_FULL_PATH}
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
 do_image_wic[depends] += "${@' '.join('%s-
 native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk',

'dosfstools', 'mtools'))}"

Quoted 4 lines

meta/classes/image_types_wic.bbclass WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH} · line 45

Quoted 2 lines
meta/classes/image_types_wic.bbclass +2 -0
+# We ensure all artfacts are deployed (e.g virtual/bootloader)
+do_image_wic[recrdeptask] += "do_build"

Shouldn't that be do_deploy instead of do_build?

Not all recipes has do_deploy. Wouldn't it cause problems?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 34 lines · Otavio Salvador
Quoted 32 lines · Richard Purdie
Quoted 30 lines · Otavio Salvador

The 'wic' image may use files which has been deployed (e.g in do_deploy) for some partitions that may need to be copied in a specific partition or filesystem (e.g a bootloader).

When using 'bitbake <image> -c image_wic', from a clean build, the
contents of do_deploy must also be available so we need to ensure all
do_build of the image dependencies has been complete.

---

 meta/classes/image_types_wic.bbclass | 3 +++

 1 file changed, 3 insertions(+)
meta/classes/image_types_wic.bbclass +0 -0
index 222ae00433..4d7305a3a3 100644
@@ -41,6 +41,9 @@ WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
 os.path.exists('${WKS_FULL_PATH}

 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}" do_image_wic[depends] += "${@' '.join('%s- native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk', 'dosfstools', 'mtools'))}"

Quoted 4 lines
Quoted 3 lines

meta/classes/image_types_wic.bbclass WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH} · line 45

Quoted 2 lines
meta/classes/image_types_wic.bbclass +2 -0
+# We ensure all artfacts are deployed (e.g virtual/bootloader)
+do_image_wic[recrdeptask] += "do_build"

Shouldn't that be do_deploy instead of do_build?

Not all recipes has do_deploy. Wouldn't it cause problems?

No, its designed to handle that:

$ grep recrdep * -R | grep deploy
meta/classes/populate_sdk_ext.bbclass:do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
meta/classes/archiver.bbclass:do_deploy_all_archives[recrdeptask] = "do_deploy_archives"
meta/classes/populate_sdk_ext.bbclass.orig:do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
meta/classes/base.bbclass:do_build[recrdeptask] += "do_deploy"

Cheers,

Richard

#4 lore raw
Quoted 40 lines · Richard Purdie
Quoted 34 lines · Otavio Salvador
Quoted 32 lines · Richard Purdie
Quoted 30 lines · Otavio Salvador

The 'wic' image may use files which has been deployed (e.g in do_deploy) for some partitions that may need to be copied in a specific partition or filesystem (e.g a bootloader).

When using 'bitbake <image> -c image_wic', from a clean build, the
contents of do_deploy must also be available so we need to ensure all
do_build of the image dependencies has been complete.

---

 meta/classes/image_types_wic.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/image_types_wic.bbclass +0 -0
index 222ae00433..4d7305a3a3 100644
@@ -41,6 +41,9 @@ WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
 os.path.exists('${WKS_FULL_PATH}
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
 do_image_wic[depends] += "${@' '.join('%s-
 native:do_populate_sysroot' % r for r in ('parted', 'gptfdisk',

'dosfstools', 'mtools'))}"

Quoted 4 lines
Quoted 3 lines

meta/classes/image_types_wic.bbclass WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH} · line 45

Quoted 2 lines
meta/classes/image_types_wic.bbclass +2 -0
+# We ensure all artfacts are deployed (e.g virtual/bootloader)
+do_image_wic[recrdeptask] += "do_build"

Shouldn't that be do_deploy instead of do_build?

Not all recipes has do_deploy. Wouldn't it cause problems?

Quoted 7 lines

No, its designed to handle that:

$ grep recrdep * -R | grep deploy
meta/classes/populate_sdk_ext.bbclass:do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
meta/classes/archiver.bbclass:do_deploy_all_archives[recrdeptask] = "do_deploy_archives"
meta/classes/populate_sdk_ext.bbclass.orig:do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
meta/classes/base.bbclass:do_build[recrdeptask] += "do_deploy"

Thanks for clarifying it. I sent a v2 adjusting that.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750