Skip to main content
UVV
Associate III
January 19, 2025
Question

Kernel recipe hides upstream packages

  • January 19, 2025
  • 0 replies
  • 449 views

Dear ST Team,

The kernel recipe in Scarthgap branch has following packaging:

FILES:${KERNEL_PACKAGE_NAME}-image += "boot/ ${KERNEL_IMAGEDEST}"
FILES:${KERNEL_PACKAGE_NAME}-imagebootfs = "boot/*.dtb boot/${KERNEL_IMAGETYPE}"

Which has following side effects.

  1. The base class in openembedded-core layer defines packaging in meta/classes-recipe/kernel.bbclass as follows
    FILES:${KERNEL_PACKAGE_NAME}-image = ""
    FILES:${KERNEL_PACKAGE_NAME}-dev = "/${KERNEL_IMAGEDEST}/System.map* /${KERNEL_IMAGEDEST}/Module.symvers* /${KERNEL_IMAGEDEST}/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"

    By placing everything from the "boot" directory into the image package you hide "dev" package completely and it becomes empty.

  2. The "imagebootfs" package repacks devicetrees, thus hiding kernel-devicetree package from openembedded-core layer. If you need custom package for any reason, I suggest you set run-time dependencies rather than re-arranging the files. FTR, devicetree packaging is done in meta/classes-recipe/kernel-devicetree.bbclass
    # recursivly search for devicetree files
    FILES:${KERNEL_PACKAGE_NAME}-devicetree = " \
    /${KERNEL_DTBDEST}/**/*.dtb \
    /${KERNEL_DTBDEST}/**/*.dtbo \
    "

Could you please address these issues?

Thanks,

Vyacheslav