Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | SUMMARY = "FF-A Debugfs Linux kernel module" |
| 2 | DESCRIPTION = "This out-of-tree kernel module exposes FF-A operations to user space \ |
| 3 | used for development purposes" |
| 4 | LICENSE = "GPL-2.0-only" |
| 5 | LIC_FILES_CHKSUM = "file://arm_ffa_user.c;beginline=1;endline=1;md5=fcab174c20ea2e2bc0be64b493708266" |
| 6 | |
| 7 | SRC_URI = "git://git.gitlab.arm.com/linux-arm/linux-trusted-services.git;branch=main;protocol=https" |
| 8 | |
| 9 | # ffa-debugfs v2.1.0 |
| 10 | SRCREV = "77967912d033144aff2695cecbd52d3be450deaa" |
| 11 | |
| 12 | S = "${WORKDIR}/git" |
| 13 | |
| 14 | inherit module |
| 15 | |
| 16 | SRC_URI:append = " \ |
| 17 | file://0001-build-add-Yocto-support.patch \ |
| 18 | file://0002-script-loading-the-driver-in-a-generic-way.patch \ |
| 19 | " |
| 20 | |
| 21 | FILES:${PN} += "${bindir}/load_ffa_debugfs.sh" |
| 22 | FILES:${PN}-dev += "${includedir}/arm_ffa_user.h" |
| 23 | |
| 24 | do_install:append() { |
| 25 | install -D -p -m 0755 ${B}/load_ffa_debugfs.sh ${D}/${bindir}/load_ffa_debugfs.sh |
| 26 | install -m 0644 ${S}/arm_ffa_user.h ${D}/${includedir}/arm_ffa_user.h |
| 27 | } |
| 28 | |
| 29 | COMPATIBLE_HOST = "(arm|aarch64).*-linux" |
| 30 | |
| 31 | # Kernel modules currently RDEPEND on the kernel, which is troublesome when you want to put a |
| 32 | # kernel module into a initramfs without pulling the kernel into the initramfs, which would be |
| 33 | # silly. Until this is a recommends the easiest way to handle this is to remove the dependency |
| 34 | # in this recipe. |
| 35 | PACKAGESPLITFUNCS:append = " remove_kernel_dependency" |
| 36 | python remove_kernel_dependency() { |
| 37 | key = "RDEPENDS:kernel-module-arm-ffa-user-" + d.getVar("KERNEL_VERSION") |
| 38 | d.delVar(key) |
| 39 | } |