summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2022-01-09 22:17:04 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-01-25 12:07:01 +0000
commitbe6b5a5d0ab7cdcbfdd4563c6e8adf17b3fcf78c (patch)
tree57366b4c96058585eefd8beca676e51a83aab870
parent3314a8f59ec5ae4d4637eefc96bedc7b57a55eb7 (diff)
downloadpoky-be6b5a5d0ab7cdcbfdd4563c6e8adf17b3fcf78c.tar.gz
poky-be6b5a5d0ab7cdcbfdd4563c6e8adf17b3fcf78c.tar.bz2
poky-be6b5a5d0ab7cdcbfdd4563c6e8adf17b3fcf78c.zip
populate_sdk_base: remove unneeded dirs such as /dev
We met a problem that core-image-tiny-initramfs's SDK cannot be installed. The error message is like below. tar: ./sysroots/core2-64-poky-linux/dev/console: Cannot mknod: Operation not permitted In fact, the '/dev' direcotry is not needed by SDK. So remove it. This patches uses a variable, SDK_PRUNE_SYSROOT_DIRS, to hold useless dir entries so that it could be extended. For example, '/usr/bin' could be added if wanted. (From OE-Core rev: 9154f71c7267e9731156c1dfd57397103e9e6a2b) (From OE-Core rev: 0211ccb94ecc13ed0f4d3f351baf4f9a39f2ccea) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/populate_sdk_base.bbclass11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 2d33611ddd..76757a3a9d 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -90,6 +90,8 @@ SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
+SDK_PRUNE_SYSROOT_DIRS ?= "/dev"
+
python write_target_sdk_manifest () {
from oe.sdk import sdk_list_installed_packages
from oe.utils import format_pkg_list
@@ -101,6 +103,12 @@ python write_target_sdk_manifest () {
output.write(format_pkg_list(pkgs, 'ver'))
}
+sdk_prune_dirs () {
+ for d in ${SDK_PRUNE_SYSROOT_DIRS}; do
+ rm -rf ${SDK_OUTPUT}${SDKTARGETSYSROOT}$d
+ done
+}
+
python write_sdk_test_data() {
from oe.data import export2json
testdata = "%s/%s.testdata.json" % (d.getVar('SDKDEPLOYDIR'), d.getVar('TOOLCHAIN_OUTPUTNAME'))
@@ -120,8 +128,9 @@ python write_host_sdk_manifest () {
}
POPULATE_SDK_POST_TARGET_COMMAND_append = " write_sdk_test_data ; "
-POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest ; "
+POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest; sdk_prune_dirs; "
POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " write_host_sdk_manifest; "
+
SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}"
SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; archive_sdk; ${SDK_PACKAGING_COMMAND} "