summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm/recipes-security/trusted-services/ts-sp-common.inc
blob: 3d756015a0eb313de62c404ff541fc4102473895 (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
# Common part of all Trusted Services SPs recipes

TS_ENV = "opteesp"

require trusted-services.inc
require ts-uuid.inc

DEPENDS += "dtc-native ts-newlib"

FILES:${PN}-dev = "${TS_INSTALL}"

# Secure Partition DTS file might be updated in bbapend files
SP_DTS_FILE ?= "${D}${TS_INSTALL}/manifest/${SP_UUID}.dts"

do_install:append() {
    # Generate SP DTB which will be included automatically by optee-os build process
    dtc -I dts -O dtb -o ${D}${TS_INSTALL}/manifest/${SP_UUID}.dtb ${SP_DTS_FILE}

    # We do not need libs and headers
    rm -rf --one-file-system ${D}${TS_INSTALL}/lib
    rm -rf --one-file-system ${D}${TS_INSTALL}/include
}

# Use Yocto debug prefix maps for compiling assembler.
EXTRA_OECMAKE += '-DCMAKE_ASM_FLAGS="${DEBUG_PREFIX_MAP}"'

# Ignore that SP stripped.elf does not have GNU_HASH
# Older versions of optee support SYSV hash only.
INSANE_SKIP:${PN}-dev += "ldflags"

# Trusted Services SPs do not compile with clang
TOOLCHAIN = "gcc"