Skip to contentSkip to conversation

Mark some tasks in extensible SDK as 'noexec'

PATCH Superseded Chen Qi 1 participant 2 messages May 13, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover Mark some tasks in extensible SDK as 'noexec'

The following changes since commit 2d09cb28f25080ed337d37d2d4381b846bbe6247:

gcc5: Add PR65779 patch to fix powerpc compile issues (2015-05-12 13:10:17 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib ChenQi/SDK-noexec
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/SDK-noexec

Chen Qi (1):
populate_sdk_ext: set noexec flag for some tasks

 meta/classes/populate_sdk_ext.bbclass | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 populate_sdk_ext: set noexec flag for some tasks

For the SDK, what we are interested in is the sysroot part. So the only useful task is do_populate_sysroot. Other tasks like do_package don't need to run. So mark them as 'noexec' for SDK.

This would result in two benefits:
1) The size of extensible SDK is larged reduced. For example, extensible SDK for core-image-minimal is reduced from 1.8G to 793M.
2) The installation time is reduced as a lot of tasks are not run.

[YOCTO #7590]

---
 meta/classes/populate_sdk_ext.bbclass | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_ext.bbclass +15 -1
index dc2c58e..573d338 100644
@@ -141,8 +141,22 @@ python copy_buildsystem () {
     sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
     oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
 
+    # Mark tasks to be 'noexec' for the SDK as we only need the sysroot part
+    base_class_path = os.path.join(baseoutpath, core_meta_subdir, 'classes', 'base.bbclass')
+    if os.path.exists(base_class_path):
+        with open(base_class_path, 'a') as f:
+            f.write('do_package[noexec] = "1"\n')
+            f.write('do_packagedata[noexec] = "1"\n')
+            f.write('do_package_qa[noexec] = "1"\n')
+            f.write('do_package_write_rpm[noexec] = "1"\n')
+            f.write('do_package_write_ipk[noexec] = "1"\n')
+            f.write('do_package_write_deb[noexec] = "1"\n')
+            f.write('do_deploy[noexec] = "1"\n')
+            f.write('do_populate_lic[noexec] = "1"\n')
+            f.write('do_rootfs[noexec] = "1"\n')
+
     # Filter the locked signatures file to just the sstate tasks we are interested in
-    allowed_tasks = ['do_populate_lic', 'do_populate_sysroot', 'do_packagedata', 'do_package_write_ipk', 'do_package_write_rpm', 'do_package_write_deb', 'do_package_qa', 'do_deploy']
+    allowed_tasks = ['do_populate_sysroot']
     excluded_targets = d.getVar('SDK_TARGETS', True)
     lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc'
     oe.copy_buildsystem.prune_lockedsigs(allowed_tasks,
Signature · 1 line
1.9.1