Skip to contentSkip to conversation

Backports for pyro to fix eSDK / initramfs interaction

PATCH In review Paul Eggleton 2 participants 4 messages Sep 26, 2017 – Sep 27, 2017

lore
Share & tools
lore
#0 lore raw

cover Backports for pyro to fix eSDK / initramfs interaction

The following changes since commit 404a04a862a71a5a0fb1c20b6bc9fc9c8b2bb98c:

image.bbclass: Sorted ctypes to avoid basehash error (2017-09-22 17:52:58 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/pyro-esdk-initramfs-fix-oe
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/pyro-esdk-initramfs-fix-oe

Ming Liu (1):
image.bbclass: drop initramfs bundle related code

Paul Eggleton (1):
classes: drop image dependencies on TOPDIR variable

 meta/classes/image.bbclass               | 12 ------------
 meta/classes/image_types_wic.bbclass     |  2 +-
 meta/classes/qemuboot.bbclass            |  1 +
 meta/classes/rootfs-postcommands.bbclass |  1 +
 4 files changed, 3 insertions(+), 13 deletions(-)
Signature · 1 line
2.9.5
#1 lore raw

PATCH 1/2 image.bbclass: drop initramfs bundle related code

From: Ming Liu <[email protected]>

The original purpose of this code snippet was to repackage initramfs bundled kernel images before do_image_complete, to be able to be included by rootfs, but it's not going to achieve that since the initramfs bundled kernel images are not even installed to ${D}/boot after commit a49569e3a7534779bbe3f01a0647fd076c95798d:
[ kernel.bbclass: do not copy bundled initramfs to /boot ]

So there is not a initramfs bundled kernel package at all, we should drop the code, because it is leading kernel do_initramfs_bundle unnecessarily rerun and it's very time consuming and hence is impacting the performance a lot.

(From OE-Core master rev: eca501aeb4f2cc9255fabab14c68f6910367aaf9)

---
 meta/classes/image.bbclass | 12 ------------
 1 file changed, 12 deletions(-)
meta/classes/image.bbclass +0 -12
index 9c9f14a..77e10a8 100644
@@ -184,10 +184,6 @@ python () {
     d.setVar('IMAGE_FEATURES', ' '.join(sorted(list(remain_features))))
 
     check_image_features(d)
-    initramfs_image = d.getVar('INITRAMFS_IMAGE') or ""
-    if initramfs_image != "":
-        d.appendVarFlag('do_build', 'depends', " %s:do_bundle_initramfs" %  d.getVar('PN'))
-        d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_image_complete" % initramfs_image)
 }
 
 IMAGE_CLASSES += "image_types"
@@ -609,11 +605,3 @@ do_package_write_ipk[noexec] = "1"
 do_package_write_deb[noexec] = "1"
 do_package_write_rpm[noexec] = "1"
 
-# Allow the kernel to be repacked with the initramfs and boot image file as a single file
-do_bundle_initramfs[depends] += "virtual/kernel:do_bundle_initramfs"
-do_bundle_initramfs[nostamp] = "1"
-do_bundle_initramfs[noexec] = "1"
-do_bundle_initramfs () {
-	:
-}
-addtask bundle_initramfs after do_image_complete
Signature · 1 line
2.9.5
#2 lore raw

PATCH 2/2 classes: drop image dependencies on TOPDIR variable

In reply to Paul Eggleton

We don't need a dependency on this variable changing, and having one causes locked signature warnings during eSDK installation if you have INITRAMFS_IMAGE_* set (since TOPDIR will always be different between the eSDK and the environment in which it was built).

Relates to [YOCTO #12102].

(From OE-Core master rev: 073610af04be326f9245ca91714526b390fb72cd)

---
 meta/classes/image_types_wic.bbclass     | 2 +-
 meta/classes/qemuboot.bbclass            | 1 +
 meta/classes/rootfs-postcommands.bbclass | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)
meta/classes/image_types_wic.bbclass +1 -1
index 4711c24..68f251c 100644
@@ -33,7 +33,7 @@ IMAGE_CMD_wic () {
 	mv "$out/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
 	rm -rf "$out/"
 }
-IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
+IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES TOPDIR"
 
 # Rebuild when the wks file or vars in WICVARS change
 USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
meta/classes/qemuboot.bbclass +1 -0
index 86b3060..3468d1c 100644
@@ -79,6 +79,7 @@ def qemuboot_vars(d):
     return build_vars + [k for k in d.keys() if k.startswith('QB_')]
 
 do_write_qemuboot_conf[vardeps] += "${@' '.join(qemuboot_vars(d))}"
+do_write_qemuboot_conf[vardepsexclude] += "TOPDIR"
 python do_write_qemuboot_conf() {
     import configparser
 
meta/classes/rootfs-postcommands.bbclass +1 -0
index 2503d89..31f2560 100644
@@ -305,6 +305,7 @@ python write_image_test_data() {
            os.remove(testdata_link)
         os.symlink(os.path.basename(testdata), testdata_link)
 }
+write_image_test_data[vardepsexclude] += "TOPDIR"
 
 # Check for unsatisfied recommendations (RRECOMMENDS)
 python rootfs_log_check_recommends() {
Signature · 1 line
2.9.5
#3 lore raw
In reply to Paul Eggleton

paul,

Quoted 8 lines · Paul Eggleton

The following changes since commit 404a04a862a71a5a0fb1c20b6bc9fc9c8b2bb98c:

image.bbclass: Sorted ctypes to avoid basehash error (2017-09-22 17:52:58 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/pyro-esdk-initramfs-fix-oe
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/pyro-esdk-initramfs-fix-oe

thanks,
merged to staging.
- armin

Quoted 12 lines

Ming Liu (1):
image.bbclass: drop initramfs bundle related code

Paul Eggleton (1):
classes: drop image dependencies on TOPDIR variable

 meta/classes/image.bbclass               | 12 ------------
 meta/classes/image_types_wic.bbclass     |  2 +-
 meta/classes/qemuboot.bbclass            |  1 +
 meta/classes/rootfs-postcommands.bbclass |  1 +
 4 files changed, 3 insertions(+), 13 deletions(-)