summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/ppa/ppa-optee_git.bb18
-rw-r--r--recipes-bsp/ppa/ppa.inc54
-rw-r--r--recipes-bsp/ppa/ppa/0001-fix-path-error.patch79
-rw-r--r--recipes-bsp/ppa/ppa_git.bb76
4 files changed, 86 insertions, 141 deletions
diff --git a/recipes-bsp/ppa/ppa-optee_git.bb b/recipes-bsp/ppa/ppa-optee_git.bb
new file mode 100644
index 00000000..844de408
--- /dev/null
+++ b/recipes-bsp/ppa/ppa-optee_git.bb
@@ -0,0 +1,18 @@
1require ppa.inc
2
3DEPENDS += "optee-os"
4
5PPA_PATH_ls1046a = "ls1046"
6PPA_PATH_ls1043a = "ls2088"
7
8do_compile() {
9 export ARMV8_TOOLS_DIR="${STAGING_BINDIR_TOOLCHAIN}"
10 export ARMV8_TOOLS_PREFIX="${TARGET_PREFIX}"
11 export CROSS_COMPILE="${WRAP_TARGET_PREFIX}"
12 cp ${RECIPE_SYSROOT}/lib/firmware/tee_${MACHINE}.bin ${S}/ppa/soc-${PPA_PATH}/tee.bin
13 cd ${S}/ppa
14 ./build rdb-fit spd=on ${PPA_PATH}
15 cd ${S}
16}
17
18COMPATIBLE_MACHINE = "(ls1043a|ls1046a)"
diff --git a/recipes-bsp/ppa/ppa.inc b/recipes-bsp/ppa/ppa.inc
new file mode 100644
index 00000000..5258c68b
--- /dev/null
+++ b/recipes-bsp/ppa/ppa.inc
@@ -0,0 +1,54 @@
1SUMMARY = "Primary Protected Application"
2LICENSE = "Freescale-EULA"
3LIC_FILES_CHKSUM = "file://license.txt;md5=2ecf925c01a48f61c88f78c30fe2ee3b"
4
5DEPENDS += "u-boot-mkimage-native dtc-native"
6
7inherit deploy
8
9SRC_URI = "git://github.com/qoriq-open-source/ppa-generic.git;nobranch=1 \
10"
11SRCREV = "e5641434f00d75634a285341d810df4261daf5de"
12
13S = "${WORKDIR}/git"
14
15python () {
16 ml = d.getVar("MULTILIB_VARIANTS", True)
17 arch = d.getVar("OVERRIDES", True)
18 if "fsl-lsch2-32b:" in arch:
19 if not "lib64" in ml:
20 raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled")
21 sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux'
22 sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS')
23 workdir = d.getVar('WORKDIR').replace(sys_original,sys_multilib)
24 d.setVar('DEPENDS_append', ' lib64-gcc-cross-aarch64 lib64-libgcc')
25 d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib)
26 d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot')
27 d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-')
28}
29
30WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
31EXTRA_OEMAKE = 'CC64="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" LD64="${WRAP_TARGET_PREFIX}ld ${TOOLCHAIN_OPTIONS}" OBJ64="${WRAP_TARGET_PREFIX}objcopy"'
32
33PPA_NAME = "${PN}-${MACHINE}-${DATETIME}"
34PPA_NAME[vardepsexclude] = "DATETIME"
35
36do_install() {
37 install -d ${D}/boot/
38 install ${S}/ppa/soc-${PPA_PATH}/build/obj/ppa.itb ${D}/boot/${PPA_NAME}.itb
39 ln -sfT ${PPA_NAME}.itb ${D}/boot/${PN}.itb
40}
41
42do_deploy(){
43 install -d ${DEPLOYDIR}
44 install ${S}/ppa/soc-${PPA_PATH}/build/obj/ppa.itb ${DEPLOYDIR}/${PPA_NAME}.itb
45 ln -sfT ${PPA_NAME}.itb ${DEPLOYDIR}/${PN}.itb
46}
47addtask deploy before do_build after do_install
48
49PACKAGES += "${PN}-image"
50FILES_${PN}-image += "/boot"
51
52CLEANBROKEN = "1"
53PARALLEL_MAKE = ""
54PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-bsp/ppa/ppa/0001-fix-path-error.patch b/recipes-bsp/ppa/ppa/0001-fix-path-error.patch
deleted file mode 100644
index 891a6e75..00000000
--- a/recipes-bsp/ppa/ppa/0001-fix-path-error.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1From aa3b419876af9c2a9265fba7c7264130e1bc4926 Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <chunrong.guo@nxp.com>
3Date: Wed, 27 Sep 2017 10:45:04 +0800
4Subject: [PATCH] fix path error
5
6fix the below error:
7|Makefile:58: ../armv8/gic.mk: No such file or directory
8
9Upstream-Status: Submitted
10
11Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
12---
13 ppa/soc-ls1046/Makefile | 4 ++--
14 ppa/soc-ls1088/Makefile | 4 ++--
15 ppa/soc-ls2088/Makefile | 5 +++--
16 3 files changed, 7 insertions(+), 6 deletions(-)
17
18diff --git a/ppa/soc-ls1046/Makefile b/ppa/soc-ls1046/Makefile
19index 34ffe2d..6a06514 100644
20--- a/ppa/soc-ls1046/Makefile
21+++ b/ppa/soc-ls1046/Makefile
22@@ -55,12 +55,12 @@ include $(PRE_PATH)soc.def
23 # -----------------------------------------------------------------------------
24
25 # include the gic architecture file
26-include ../armv8/gic.mk
27+include $(PRE_PATH)../armv8/gic.mk
28
29 # -----------------------------------------------------------------------------
30
31 # include the interconnect architecture file
32-include ../armv8/inter.mk
33+include $(PRE_PATH)../armv8/inter.mk
34
35 # -----------------------------------------------------------------------------
36
37diff --git a/ppa/soc-ls1088/Makefile b/ppa/soc-ls1088/Makefile
38index 7fc5db9..6472408 100644
39--- a/ppa/soc-ls1088/Makefile
40+++ b/ppa/soc-ls1088/Makefile
41@@ -55,12 +55,12 @@ include $(PRE_PATH)soc.def
42 # -----------------------------------------------------------------------------
43
44 # include the gic architecture file
45-include ../armv8/gic.mk
46+include $(PRE_PATH)../armv8/gic.mk
47
48 # -----------------------------------------------------------------------------
49
50 # include the interconnect architecture file
51-include ../armv8/inter.mk
52+include $(PRE_PATH)../armv8/inter.mk
53
54 # -----------------------------------------------------------------------------
55
56diff --git a/ppa/soc-ls2088/Makefile b/ppa/soc-ls2088/Makefile
57index de3a06c..2fe23e2 100644
58--- a/ppa/soc-ls2088/Makefile
59+++ b/ppa/soc-ls2088/Makefile
60@@ -54,13 +54,14 @@ include $(PRE_PATH)soc.def
61
62 # -----------------------------------------------------------------------------
63
64+include $(PRE_PATH)../armv8/gic.mk
65 # include the gic architecture file
66-include ../armv8/gic.mk
67+include $(PRE_PATH)../armv8/gic.mk
68
69 # -----------------------------------------------------------------------------
70
71 # include the interconnect architecture file
72-include ../armv8/inter.mk
73+include $(PRE_PATH)../armv8/inter.mk
74
75 # -----------------------------------------------------------------------------
76
77--
782.7.4
79
diff --git a/recipes-bsp/ppa/ppa_git.bb b/recipes-bsp/ppa/ppa_git.bb
index c4f81bc5..b1cbde41 100644
--- a/recipes-bsp/ppa/ppa_git.bb
+++ b/recipes-bsp/ppa/ppa_git.bb
@@ -1,70 +1,22 @@
1SUMMARY = "Primary Protected Application" 1require ppa.inc
2LICENSE = "Freescale-EULA"
3LIC_FILES_CHKSUM = "file://license.txt;md5=2ecf925c01a48f61c88f78c30fe2ee3b"
4 2
5DEPENDS += "u-boot-mkimage-native dtc-native" 3PPA_PATH_ls1012a = "ls1012"
4PPA_PATH_ls1043a = "ls1043"
5PPA_PATH_ls1046a = "ls1046"
6PPA_PATH_ls2088a = "ls2088"
7PPA_PATH_ls1088a = "ls1088"
6 8
7inherit deploy 9do_compile () {
8
9SRC_URI = "git://github.com/qoriq-open-source/ppa-generic.git;nobranch=1 \
10 file://0001-fix-path-error.patch \
11"
12SRCREV = "92b208b0dbb5a47b06627ec62824cb5790b3f482"
13
14S = "${WORKDIR}/git"
15
16python () {
17 ml = d.getVar("MULTILIB_VARIANTS", True)
18 arch = d.getVar("OVERRIDES", True)
19 if "fsl-lsch2-32b:" in arch:
20 if not "lib64" in ml:
21 raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled")
22 sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux'
23 sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS')
24 workdir = d.getVar('WORKDIR').replace(sys_original,sys_multilib)
25 d.setVar('DEPENDS_append', ' lib64-gcc-cross-aarch64 lib64-libgcc')
26 d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib)
27 d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot')
28 d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-')
29}
30
31WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
32EXTRA_OEMAKE = 'CC64="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" LD64="${WRAP_TARGET_PREFIX}ld ${TOOLCHAIN_OPTIONS}" OBJ64="${WRAP_TARGET_PREFIX}objcopy"'
33
34PPA_PATH ?= "ppa/soc-ls1043/platform-rdb"
35PPA_PATH_ls1046a = "ppa/soc-ls1046/platform-rdb"
36PPA_PATH_ls2088a = "ppa/soc-ls2088/platform-rdb"
37PPA_PATH_ls1088a = "ppa/soc-ls1088/platform-rdb"
38PPA_PATH_ls1012a = "ppa/soc-ls1012/platform-rdb"
39PPA_NAME ?= "ppa-${MACHINE}-${DATETIME}"
40PPA_NAME[vardepsexclude] = "DATETIME"
41
42do_compile() {
43 export ARMV8_TOOLS_DIR="${STAGING_BINDIR_TOOLCHAIN}" 10 export ARMV8_TOOLS_DIR="${STAGING_BINDIR_TOOLCHAIN}"
44 export ARMV8_TOOLS_PREFIX="${TARGET_PREFIX}" 11 export ARMV8_TOOLS_PREFIX="${TARGET_PREFIX}"
45 export CROSS_COMPILE="${WRAP_TARGET_PREFIX}" 12 export CROSS_COMPILE="${WRAP_TARGET_PREFIX}"
46 cd ${S}/${PPA_PATH} 13 cd ${S}/ppa
47 oe_runmake rdb-fit 14 if [ ${MACHINE} = ls1012afrdm ];then
15 ./build frdm-fit ${PPA_PATH}
16 else
17 ./build rdb-fit ${PPA_PATH}
18 fi
48 cd ${S} 19 cd ${S}
49} 20}
50 21
51do_install() { 22COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls2088a|ls1012afrdm|ls1088a)"
52 install -d ${D}/boot/
53 install ${S}/${PPA_PATH}/build/obj/ppa.itb ${D}/boot/${PPA_NAME}.itb
54 ln -sfT ${PPA_NAME}.itb ${D}/boot/ppa.itb
55}
56
57do_deploy(){
58 install -d ${DEPLOYDIR}
59 install ${S}/${PPA_PATH}/build/obj/ppa.itb ${DEPLOYDIR}/${PPA_NAME}.itb
60 ln -sfT ${PPA_NAME}.itb ${DEPLOYDIR}/ppa.itb
61}
62addtask deploy before do_build after do_install
63
64PACKAGES += "${PN}-image"
65FILES_${PN}-image += "/boot"
66
67CLEANBROKEN = "1"
68PARALLEL_MAKE = ""
69COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls2088a|ls1012a|ls1088a)"
70PACKAGE_ARCH = "${MACHINE_ARCH}"