On Tue, 2022-01-04 at 22:01 -0800, Chen Qi wrote:
> 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 useless for SDK. So remove it.
>
> This patches uses a variable, SDK_USELESS_DIRS, to hold useless dir entries
> so that it could be extended. For example, '/usr/bin' could be added if
> wanted.
>
> Signed-off-by: Chen Qi <[email protected]>
> ---
> meta/classes/populate_sdk_base.bbclass | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/populate_sdk_base.bbclass
> b/meta/classes/populate_sdk_base.bbclass
> index fafdd96749..d4065b9b13 100644
> --- a/meta/classes/populate_sdk_base.bbclass
> +++ b/meta/classes/populate_sdk_base.bbclass
> @@ -92,6 +92,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_USELESS_DIRS ?= "/dev"
> +
I think this is the better approach to solving the issue but I don't agree with
the name "USELESS". Something like SDK_PRUNE_SYSROOT_DIRS would probably better
describe what the code is doing.
> python write_target_sdk_manifest () {
> from oe.sdk import sdk_list_installed_packages
> from oe.utils import format_pkg_list
> @@ -103,6 +105,12 @@ python write_target_sdk_manifest () {
> output.write(format_pkg_list(pkgs, 'ver'))
> }
>
> +delete_useless () {
This needs some prefix so we know it is sdk related as well as the useless name
change.
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#160181):
https://lists.openembedded.org/g/openembedded-core/message/160181
Mute This Topic: https://lists.openembedded.org/mt/88209004/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-