diff options
| author | Chunrong Guo <chunrong.guo@nxp.com> | 2019-01-21 05:59:50 +0000 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2019-01-31 10:29:40 -0200 |
| commit | 8ca3647a32841fc72cf097de933cb188e39b51db (patch) | |
| tree | f8df7fb668140e3534a143d8093c0f5cdd3b1270 | |
| parent | fb753d427add595d9c425fab9d4720a041db1b6d (diff) | |
| download | meta-freescale-8ca3647a32841fc72cf097de933cb188e39b51db.tar.gz | |
atf: add recipes
*update to lsdk 1812 tag
include the following changes
4971f39 - nxp: Invalidates the output buffer memory to get random bytes
a58ecfe - plat/nxp: Correct calculation of GIC Offset for LS1023
ba92b6a - nxp: Shift the soc_mem_access function before loading Fuse file
67faea4 - nxp:ls2088: Add support to return number of clusters based on personality
2d57313 - nxp/interconnect: Streamline interconnect driver
bc0b955 - nxp:ls2088: Fix the call to get_gic_rd_base
d2f5eb0 - nxp: Add DCSR ADDR define in Chassis 3 devices
de0dfcc - nxp: Enable core timebase
2dd3986 - Corrected the usage of POLICY_PERF_WRIOP.
41b8f73 - ls2088a lx2160a: usage of new APIs of CCN driver
6f20e79 - ccn: Introduce API to set and read value of node register
d2e6a39 - BL2_Chasis_3_2: Correct the BL2 image location in OCRAM.
d3a7ae9 - nxp: clean up secondary core PSCI data offset calculation
7feae63 - nxp: clean up OCRAM layout
5c2ec36 - nxp: Drop DATA_LOC option
d103a4f - nxp: ls2088a: Abort wake up if not by SGI15
d8000b3 - Setting retention control for LPM20 of LS1088 and LS2088
0430db9 - nxp: ls1012a: Fix generic timer clock
bfe6a23 - nxp: Update ls1012 timer to use fixed 25 MHz for ARM generic timer
5d5480e - plat/nxp: Change CSFHDR_SZ to 0x3000 for all platforms
62ed791 - nxp/ls1012: Fix BL31 boot up issue
ffc6895 - nxp: Change BL2_TEXT_LIMIT for SD Boot
e301618 - nxp: Reduce default CSF HDR SZ for ls1088 and ls2088
81b4323 - nxp: drivers: ddr: Update workaround for A008511
a3ee152 - nxp/ls1012: Set SMMU Policy to 0 for ls1012
965e334 - nxp: Correct Policy checking for SMMU
Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| -rw-r--r-- | recipes-bsp/atf/atf/0001-Makefile-add-CC-gcc.patch | 28 | ||||
| -rw-r--r-- | recipes-bsp/atf/atf/0001-fix-fiptool-build-error.patch | 28 | ||||
| -rw-r--r-- | recipes-bsp/atf/atf_git.bb | 156 |
3 files changed, 212 insertions, 0 deletions
diff --git a/recipes-bsp/atf/atf/0001-Makefile-add-CC-gcc.patch b/recipes-bsp/atf/atf/0001-Makefile-add-CC-gcc.patch new file mode 100644 index 000000000..efa2749e4 --- /dev/null +++ b/recipes-bsp/atf/atf/0001-Makefile-add-CC-gcc.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From 3161524085339ae214f7dee17a98ccd6c442d66b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Chunrong Guo <chunrong.guo@nxp.com> | ||
| 3 | Date: Thu, 16 Aug 2018 17:38:04 +0800 | ||
| 4 | Subject: [PATCH] Makefile: add CC=gcc | ||
| 5 | |||
| 6 | |||
| 7 | Upstream-Status: Inappropriate [embedded specific] | ||
| 8 | |||
| 9 | Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com> | ||
| 10 | --- | ||
| 11 | plat/nxp/tools/Makefile | 1 + | ||
| 12 | 1 file changed, 1 insertion(+) | ||
| 13 | |||
| 14 | diff --git a/plat/nxp/tools/Makefile b/plat/nxp/tools/Makefile | ||
| 15 | index e648fd1..43d3b56 100644 | ||
| 16 | --- a/plat/nxp/tools/Makefile | ||
| 17 | +++ b/plat/nxp/tools/Makefile | ||
| 18 | @@ -32,6 +32,7 @@ endif | ||
| 19 | INCLUDE_PATHS := | ||
| 20 | |||
| 21 | HOSTCC ?= gcc | ||
| 22 | +CC = gcc | ||
| 23 | |||
| 24 | .PHONY: all clean distclean | ||
| 25 | |||
| 26 | -- | ||
| 27 | 2.7.4 | ||
| 28 | |||
diff --git a/recipes-bsp/atf/atf/0001-fix-fiptool-build-error.patch b/recipes-bsp/atf/atf/0001-fix-fiptool-build-error.patch new file mode 100644 index 000000000..ffd9965a6 --- /dev/null +++ b/recipes-bsp/atf/atf/0001-fix-fiptool-build-error.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From a76ae26fdb673613f5f97872b7275c630b7b24b8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: BJ DevOps Team <bjdevops@NXP1.onmicrosoft.com> | ||
| 3 | Date: Wed, 16 May 2018 13:26:45 +0800 | ||
| 4 | Subject: [PATCH] fix fiptool build error | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [embedded specific] | ||
| 7 | |||
| 8 | --- | ||
| 9 | tools/fiptool/Makefile | 3 ++- | ||
| 10 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 11 | |||
| 12 | diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile | ||
| 13 | index e0e3923..f213f44 100644 | ||
| 14 | --- a/tools/fiptool/Makefile | ||
| 15 | +++ b/tools/fiptool/Makefile | ||
| 16 | @@ -19,7 +19,8 @@ ifeq (${DEBUG},1) | ||
| 17 | else | ||
| 18 | CFLAGS += -O2 | ||
| 19 | endif | ||
| 20 | -LDLIBS := -lcrypto | ||
| 21 | + | ||
| 22 | +LDLIBS := -Wl,-rpath=${LIBPATH}/usr/lib -L${LIBPATH}/usr/lib -lcrypto | ||
| 23 | |||
| 24 | ifeq (${V},0) | ||
| 25 | Q := @ | ||
| 26 | -- | ||
| 27 | 1.8.3.1 | ||
| 28 | |||
diff --git a/recipes-bsp/atf/atf_git.bb b/recipes-bsp/atf/atf_git.bb new file mode 100644 index 000000000..45bd376c5 --- /dev/null +++ b/recipes-bsp/atf/atf_git.bb | |||
| @@ -0,0 +1,156 @@ | |||
| 1 | DESCRIPTION = "ARM Trusted Firmware" | ||
| 2 | |||
| 3 | LICENSE = "BSD" | ||
| 4 | LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443" | ||
| 5 | |||
| 6 | inherit deploy | ||
| 7 | |||
| 8 | DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native uefi" | ||
| 9 | DEPENDS_append_qoriq-arm64 += "optee-os-qoriq" | ||
| 10 | do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" | ||
| 11 | |||
| 12 | S = "${WORKDIR}/git" | ||
| 13 | |||
| 14 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1" | ||
| 15 | SRCREV = "4971f394cf32e33e3a9ca23a4faa49d606af31c5" | ||
| 16 | |||
| 17 | SRC_URI += "file://0001-fix-fiptool-build-error.patch \ | ||
| 18 | file://0001-Makefile-add-CC-gcc.patch \ | ||
| 19 | " | ||
| 20 | COMPATIBLE_MACHINE = "(qoriq)" | ||
| 21 | PLATFORM = "${MACHINE}" | ||
| 22 | PLATFORM_ls1088ardb-pb = "ls1088ardb" | ||
| 23 | # requires CROSS_COMPILE set by hand as there is no configure script | ||
| 24 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
| 25 | export ARCH="arm64" | ||
| 26 | # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application | ||
| 27 | CFLAGS[unexport] = "1" | ||
| 28 | LDFLAGS[unexport] = "1" | ||
| 29 | AS[unexport] = "1" | ||
| 30 | LD[unexport] = "1" | ||
| 31 | |||
| 32 | # set secure option | ||
| 33 | # fuseopt ?= "FUSE_PROV=1 FUSE_FILE=$(CONFIG_SEC_FUSE_FILE)" | ||
| 34 | |||
| 35 | BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc" | ||
| 36 | BUILD_SECURE = "${@bb.utils.contains('COMBINED_FEATURES', 'secure', 'true', 'false', d)}" | ||
| 37 | BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}" | ||
| 38 | |||
| 39 | uboot_boot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot" | ||
| 40 | uboot_boot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa" | ||
| 41 | rcw ?= "" | ||
| 42 | rcw_ls1012afrwy = "_default" | ||
| 43 | rcw_ls1012ardb = "_default" | ||
| 44 | rcwsec ?= "" | ||
| 45 | rcwsec_ls1012afrwy = "_sben" | ||
| 46 | rcwsec_ls1012ardb = "_sben" | ||
| 47 | do_configure[noexec] = "1" | ||
| 48 | |||
| 49 | do_compile() { | ||
| 50 | export LIBPATH="${RECIPE_SYSROOT_NATIVE}" | ||
| 51 | install -d ${S}/include/tools_share/openssl | ||
| 52 | cp -r ${RECIPE_SYSROOT}/usr/include/openssl/* ${S}/include/tools_share/openssl | ||
| 53 | ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 | ||
| 54 | if [ "${BUILD_SECURE}" = "true" ]; then | ||
| 55 | secureopt="TRUSTED_BOARD_BOOT=1 $ddrphyopt CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst" | ||
| 56 | secext="_sec" | ||
| 57 | bl33="${uboot_boot_sec}" | ||
| 58 | rcwsec="${rcwsec}" | ||
| 59 | else | ||
| 60 | bl33="${uboot_boot}" | ||
| 61 | rcwsec="${rcw}" | ||
| 62 | fi | ||
| 63 | |||
| 64 | if [ "${BUILD_OPTEE}" = "true" ]; then | ||
| 65 | bl32="${DEPLOY_DIR_IMAGE}/optee/tee_${MACHINE}.bin" | ||
| 66 | bl32opt="BL32=${bl32}" | ||
| 67 | spdopt="SPD=opteed" | ||
| 68 | fi | ||
| 69 | |||
| 70 | for d in ${BOOTTYPE}; do | ||
| 71 | case $d in | ||
| 72 | nor) | ||
| 73 | rcwimg="${RCWNOR}${rcwsec}.bin" | ||
| 74 | uefiboot="${UEFI_NORBOOT}" | ||
| 75 | ;; | ||
| 76 | nand) | ||
| 77 | rcwimg="${RCWNAND}${rcwsec}.bin" | ||
| 78 | ;; | ||
| 79 | qspi) | ||
| 80 | rcwimg="${RCWQSPI}${rcwsec}.bin" | ||
| 81 | ;; | ||
| 82 | sd) | ||
| 83 | rcwimg="${RCWSD}${rcwsec}.bin" | ||
| 84 | ;; | ||
| 85 | flexspi_nor) | ||
| 86 | rcwimg="${RCWXSPI}${rcwsec}.bin" | ||
| 87 | uefiboot="${UEFI_XSPIBOOT}" | ||
| 88 | ;; | ||
| 89 | esac | ||
| 90 | |||
| 91 | if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg}" ]; then | ||
| 92 | if [ ${MACHINE} = ls1012afrwy ]; then | ||
| 93 | oe_runmake V=1 -C ${S} realclean | ||
| 94 | oe_runmake V=1 -C ${S} all fip pbl PLAT=ls1012afrwy_512mb BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} | ||
| 95 | cp -r ${S}/build/ls1012afrwy_512mb/release/bl2_qspi.pbl ${S}/bl2_${d}_512mb.pbl | ||
| 96 | cp -r ${S}/build/ls1012afrwy_512mb/release/fip.bin ${S}/fip_512mb.bin | ||
| 97 | fi | ||
| 98 | if [ -n "${uefiboot}" ]; then | ||
| 99 | oe_runmake V=1 -C ${S} realclean | ||
| 100 | oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} | ||
| 101 | cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S}/fip_uefi.bin | ||
| 102 | fi | ||
| 103 | oe_runmake V=1 -C ${S} realclean | ||
| 104 | oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} | ||
| 105 | cp -r ${S}/build/${PLATFORM}/release/bl2_${d}*.pbl ${S} | ||
| 106 | fi | ||
| 107 | rcwimg="" | ||
| 108 | uefiboot="" | ||
| 109 | done | ||
| 110 | } | ||
| 111 | |||
| 112 | do_install() { | ||
| 113 | install -d ${D}/boot/atf | ||
| 114 | if [ "${BUILD_SECURE}" = "y" ]; then | ||
| 115 | secext="_sec" | ||
| 116 | fi | ||
| 117 | if [ -f "${S}/fip_uefi.bin" ]; then | ||
| 118 | cp -r ${S}/fip_uefi.bin ${D}/boot/atf/fip_uefi.bin | ||
| 119 | fi | ||
| 120 | cp -r ${S}/build/${PLATFORM}/release/fip.bin ${D}/boot/atf/fip.bin | ||
| 121 | for d in ${BOOTTYPE}; do | ||
| 122 | if [ -e ${S}/bl2_${d}${secext}.pbl ]; then | ||
| 123 | cp -r ${S}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl | ||
| 124 | fi | ||
| 125 | done | ||
| 126 | if [ ${MACHINE} = ls1012afrwy ]; then | ||
| 127 | cp -r ${S}/fip_512mb.bin ${D}/boot/atf/fip_512mb.bin | ||
| 128 | cp -r ${S}/bl2_qspi_512mb.pbl ${D}/boot/atf/fip_512mb.bin | ||
| 129 | fi | ||
| 130 | chown -R root:root ${D} | ||
| 131 | } | ||
| 132 | |||
| 133 | do_deploy() { | ||
| 134 | install -d ${DEPLOYDIR}/atf | ||
| 135 | if [ "${BUILD_SECURE}" = "y" ]; then | ||
| 136 | secext="_sec" | ||
| 137 | fi | ||
| 138 | |||
| 139 | if [ -e ${D}/boot/atf/fip_uefi.bin ]; then | ||
| 140 | cp -r ${D}/boot/atf/fip_uefi.bin ${DEPLOYDIR}/atf/fip_uefi.bin | ||
| 141 | fi | ||
| 142 | cp -r ${D}/boot/atf/fip.bin ${DEPLOYDIR}/atf/fip_uboot${secext}.bin | ||
| 143 | for d in ${BOOTTYPE}; do | ||
| 144 | if [ -e ${D}/boot/atf/bl2_${d}${secext}.pbl ]; then | ||
| 145 | cp -r ${D}/boot/atf/bl2_${d}${secext}.pbl ${DEPLOYDIR}/atf/bl2_${d}${secext}.pbl | ||
| 146 | fi | ||
| 147 | done | ||
| 148 | if [ ${MACHINE} = ls1012afrwy ]; then | ||
| 149 | cp -r ${S}/bl2_qspi_512mb.pbl ${DEPLOYDIR}/atf/ | ||
| 150 | cp -r ${S}/fip_512mb.bin ${DEPLOYDIR}/atf/fip_uboot${secext}_512mb.bin | ||
| 151 | fi | ||
| 152 | } | ||
| 153 | addtask deploy after do_install | ||
| 154 | FILES_${PN} += "/boot" | ||
| 155 | BBCLASSEXTEND = "native nativesdk" | ||
| 156 | COMPATIBLE_MACHINE = "(qoriq)" | ||
