Skip to content

Installing the linux-kbuild package for cross-builds in the SDK's rootfs #109

@masami256

Description

@masami256

In revision "b7e3c78766c3b95198b7fbe5307e0fdad672b0cd" of isar, I was able to install the linux-kbuild-${KERNEL_NAME}-native package in the SDK's rootfs by adding the following configuration to local.conf.

ISAR_CROSS_COMPILE ?= "1"
PREFERRED_VERSION_linux-mainline ?= "6.6.%"
DISTRO_KERNELS:append = " linux-mainline"
KERNEL_NAME="mainline"
SDK_INSTALL:append = " linux-kbuild-${KERNEL_NAME}-native linux-headers-${KERNEL_NAME}"

The SDK build was done with the following command line.

bitbake mc:qemuarm64-bookworm:isar-image-base -c do_populate_sdk

When I check the fixdep command, it is an x86-64 binary.

$ sudo tar xf ./tmp/deploy/images/qemuarm64/isar-image-base-sdk-debian-bookworm-qemuarm64.tar.xz -C sdktest
$ file sdktest/isar-image-base-sdk-debian-bookworm-qemuarm64/usr/lib/linux-kbuild-6.6.11-isar/scripts/basic/fixdep
sdktest/isar-image-base-sdk-debian-bookworm-qemuarm64/usr/lib/linux-kbuild-6.6.11-isar/scripts/basic/fixdep: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=e9c478fa01a04f2d4e7ac96f081ea8a800278e94, for GNU/Linux 3.2.0, stripped

However, in revision 735dc16, the following error occurred.

| Building dependency tree...
| Package linux-kbuild-mainline is not available, but is referred to by another package.
| This may mean that the package is missing, has been obsoleted, or
| is only available from another source
| 
| E: Package 'linux-kbuild-mainline' has no installation candidate
| WARNING: exit code 100 from a shell command.
| DEBUG: Executing shell function rootfs_do_umounts
| DEBUG: Shell function rootfs_do_umounts finished
| DEBUG: Python function do_rootfs_install finished
ERROR: Task (mc:qemuarm64-bookworm:virtual:sdk:/home/build/work/isar/isar/meta-isar/recipes-core/images/isar-image-base.bb:do_rootfs_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 78 tasks of which 0 didn't need to be rerun and 1 failed.

I added linux-kbuild-${KERNEL_NAME}-${DISTRO_ARCH}-cross to SDK_INSTALL instead of linux-kbuild-${KERNEL_NAME}-native, but the following error occurred.

ERROR: Nothing PROVIDES 'linux-kbuild-mainline-arm64-cross' (but mc:qemuarm64-bookworm:virtual:sdk:/home/build/work/isar/isar/meta-isar/recipes-core/images/isar-image-base.bb DEPENDS on or otherwise requires it). Close matches:
  linux-kbuild-mainline
  linux-kbuild-mainline-native
  linux-libc-dev-arm64-cross
ERROR: Required build target 'isar-image-base' has no buildable providers.
Missing or unbuildable dependency chain was: ['isar-image-base', 'isar-image-base-sdk', 'linux-kbuild-mainline-arm64-cross']

Summary: There were 2 ERROR messages, returning a non-zero exit code.

In the case of linux-kbuild-${KERNEL_NAME}, I was able to include it in the SDK's rootfs, but the binary is for the target.

build@b08825922409:~/work/isar/build$ file sdktest/isar-image-base-sdk-debian-bookworm-qemuarm64/usr/lib/linux-kbuild-6.6.11-isar/scripts/basic/fixdep
sdktest/isar-image-base-sdk-debian-bookworm-qemuarm64/usr/lib/linux-kbuild-6.6.11-isar/scripts/basic/fixdep: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=50c639f1ed9acdcba3e5f4ed32dc293502eec42c, for GNU/Linux 3.7.0, stripped

How can I install the linux-kbuild package for cross-builds in the SDK's rootfs, as in revision b7e3c78?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions