diff options
-rw-r--r-- | recipes-bsp/ppa/ppa-optee_git.bb | 18 | ||||
-rw-r--r-- | recipes-bsp/ppa/ppa.inc | 54 | ||||
-rw-r--r-- | recipes-bsp/ppa/ppa/0001-fix-path-error.patch | 79 | ||||
-rw-r--r-- | recipes-bsp/ppa/ppa_git.bb | 76 |
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 @@ | |||
1 | require ppa.inc | ||
2 | |||
3 | DEPENDS += "optee-os" | ||
4 | |||
5 | PPA_PATH_ls1046a = "ls1046" | ||
6 | PPA_PATH_ls1043a = "ls2088" | ||
7 | |||
8 | do_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 | |||
18 | COMPATIBLE_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 @@ | |||
1 | SUMMARY = "Primary Protected Application" | ||
2 | LICENSE = "Freescale-EULA" | ||
3 | LIC_FILES_CHKSUM = "file://license.txt;md5=2ecf925c01a48f61c88f78c30fe2ee3b" | ||
4 | |||
5 | DEPENDS += "u-boot-mkimage-native dtc-native" | ||
6 | |||
7 | inherit deploy | ||
8 | |||
9 | SRC_URI = "git://github.com/qoriq-open-source/ppa-generic.git;nobranch=1 \ | ||
10 | " | ||
11 | SRCREV = "e5641434f00d75634a285341d810df4261daf5de" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | python () { | ||
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 | |||
30 | WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" | ||
31 | EXTRA_OEMAKE = 'CC64="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" LD64="${WRAP_TARGET_PREFIX}ld ${TOOLCHAIN_OPTIONS}" OBJ64="${WRAP_TARGET_PREFIX}objcopy"' | ||
32 | |||
33 | PPA_NAME = "${PN}-${MACHINE}-${DATETIME}" | ||
34 | PPA_NAME[vardepsexclude] = "DATETIME" | ||
35 | |||
36 | do_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 | |||
42 | do_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 | } | ||
47 | addtask deploy before do_build after do_install | ||
48 | |||
49 | PACKAGES += "${PN}-image" | ||
50 | FILES_${PN}-image += "/boot" | ||
51 | |||
52 | CLEANBROKEN = "1" | ||
53 | PARALLEL_MAKE = "" | ||
54 | PACKAGE_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 @@ | |||
1 | From aa3b419876af9c2a9265fba7c7264130e1bc4926 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chunrong Guo <chunrong.guo@nxp.com> | ||
3 | Date: Wed, 27 Sep 2017 10:45:04 +0800 | ||
4 | Subject: [PATCH] fix path error | ||
5 | |||
6 | fix the below error: | ||
7 | |Makefile:58: ../armv8/gic.mk: No such file or directory | ||
8 | |||
9 | Upstream-Status: Submitted | ||
10 | |||
11 | Signed-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 | |||
18 | diff --git a/ppa/soc-ls1046/Makefile b/ppa/soc-ls1046/Makefile | ||
19 | index 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 | |||
37 | diff --git a/ppa/soc-ls1088/Makefile b/ppa/soc-ls1088/Makefile | ||
38 | index 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 | |||
56 | diff --git a/ppa/soc-ls2088/Makefile b/ppa/soc-ls2088/Makefile | ||
57 | index 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 | -- | ||
78 | 2.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 @@ | |||
1 | SUMMARY = "Primary Protected Application" | 1 | require ppa.inc |
2 | LICENSE = "Freescale-EULA" | ||
3 | LIC_FILES_CHKSUM = "file://license.txt;md5=2ecf925c01a48f61c88f78c30fe2ee3b" | ||
4 | 2 | ||
5 | DEPENDS += "u-boot-mkimage-native dtc-native" | 3 | PPA_PATH_ls1012a = "ls1012" |
4 | PPA_PATH_ls1043a = "ls1043" | ||
5 | PPA_PATH_ls1046a = "ls1046" | ||
6 | PPA_PATH_ls2088a = "ls2088" | ||
7 | PPA_PATH_ls1088a = "ls1088" | ||
6 | 8 | ||
7 | inherit deploy | 9 | do_compile () { |
8 | |||
9 | SRC_URI = "git://github.com/qoriq-open-source/ppa-generic.git;nobranch=1 \ | ||
10 | file://0001-fix-path-error.patch \ | ||
11 | " | ||
12 | SRCREV = "92b208b0dbb5a47b06627ec62824cb5790b3f482" | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | python () { | ||
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 | |||
31 | WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" | ||
32 | EXTRA_OEMAKE = 'CC64="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" LD64="${WRAP_TARGET_PREFIX}ld ${TOOLCHAIN_OPTIONS}" OBJ64="${WRAP_TARGET_PREFIX}objcopy"' | ||
33 | |||
34 | PPA_PATH ?= "ppa/soc-ls1043/platform-rdb" | ||
35 | PPA_PATH_ls1046a = "ppa/soc-ls1046/platform-rdb" | ||
36 | PPA_PATH_ls2088a = "ppa/soc-ls2088/platform-rdb" | ||
37 | PPA_PATH_ls1088a = "ppa/soc-ls1088/platform-rdb" | ||
38 | PPA_PATH_ls1012a = "ppa/soc-ls1012/platform-rdb" | ||
39 | PPA_NAME ?= "ppa-${MACHINE}-${DATETIME}" | ||
40 | PPA_NAME[vardepsexclude] = "DATETIME" | ||
41 | |||
42 | do_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 | ||
51 | do_install() { | 22 | COMPATIBLE_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 | |||
57 | do_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 | } | ||
62 | addtask deploy before do_build after do_install | ||
63 | |||
64 | PACKAGES += "${PN}-image" | ||
65 | FILES_${PN}-image += "/boot" | ||
66 | |||
67 | CLEANBROKEN = "1" | ||
68 | PARALLEL_MAKE = "" | ||
69 | COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls2088a|ls1012a|ls1088a)" | ||
70 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||