blob: a8378d68cc4474a9be6814b026acc99770b41c51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
DESCRIPTION = "OP-TEE Linux Driver"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = " \
file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
"
inherit module
PN = "optee-linuxdriver"
PR = "r0"
BRANCH = "rcar_gen3"
SRC_URI = " \
git://github.com/renesas-rcar/optee_linuxdriver.git;branch=${BRANCH} \
"
SRCREV = "602d533175ce4ac3383f827c3157b1a6a78fe296"
PV = "1.0.0+renesas+git${SRCPV}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}/git"
LDFLAGS[unexport] = "1"
do_configure[noexec] = "1"
# We need to be staged before do_complie. This recipe does not execute do_configure.
do_complile[depends] += "virtual/kernel:do_shared_workdir"
do_compile() {
# Build kernel module
cd ${S}/
make -C ${KBUILD_OUTPUT} M=${S} modules
}
do_install() {
# Create shared directories
install -d ${D}/lib/modules/${KERNEL_VERSION}/extra/
install -d ${STAGING_KERNEL_DIR}/include
install -d ${STAGING_KERNEL_DIR}/include/arm_common
install -d ${STAGING_KERNEL_DIR}/include/linux
# Install kernel module
install -m 0644 ${S}/core/optee.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/
install -m 0644 ${S}/armtz/optee_armtz.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/
# Install shared library to STAGING_KERNEL_DIR for reference from other modules
# This file installed in SDK by kernel-devsrc pkg.
install -m 0644 ${S}/Module.symvers ${STAGING_KERNEL_DIR}/include/optee.symvers
# Install shared header files to STAGING_KERNEL_DIR
# This file installed in SDK by kernel-devsrc pkg.
install -m 0644 ${S}/include/arm_common/optee_msg.h ${STAGING_KERNEL_DIR}/include/arm_common/
install -m 0644 ${S}/include/arm_common/optee_smc.h ${STAGING_KERNEL_DIR}/include/arm_common/
install -m 0644 ${S}/include/linux/tee_client_api.h ${STAGING_KERNEL_DIR}/include/linux/
install -m 0644 ${S}/include/linux/tee_core.h ${STAGING_KERNEL_DIR}/include/linux/
install -m 0644 ${S}/include/linux/tee_ioc.h ${STAGING_KERNEL_DIR}/include/linux/
install -m 0644 ${S}/include/linux/tee_kernel_api.h ${STAGING_KERNEL_DIR}/include/linux/
}
PACKAGES = "\
${PN} \
${PN}-armtz \
"
FILES_${PN} = " \
/lib/modules/${KERNEL_VERSION}/extra/optee.ko \
"
FILES_${PN}-armtz = " \
/lib/modules/${KERNEL_VERSION}/extra/optee_armtz.ko \
"
RPROVIDES_${PN} += "optee-linuxdriver"
RPROVIDES_${PN} += "kernel-module-optee"
RPROVIDES_${PN} += "kernel-module-optee-armtz"
|