From: Chunrong Guo <chunrong....@nxp.com>

*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....@nxp.com>
---
 recipes-bsp/atf/atf/0001-Makefile-add-CC-gcc.patch |  28 ++++
 .../atf/atf/0001-fix-fiptool-build-error.patch     |  28 ++++
 recipes-bsp/atf/atf_git.bb                         | 156 +++++++++++++++++++++
 3 files changed, 212 insertions(+)
 create mode 100644 recipes-bsp/atf/atf/0001-Makefile-add-CC-gcc.patch
 create mode 100644 recipes-bsp/atf/atf/0001-fix-fiptool-build-error.patch
 create mode 100644 recipes-bsp/atf/atf_git.bb

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 0000000..efa2749
--- /dev/null
+++ b/recipes-bsp/atf/atf/0001-Makefile-add-CC-gcc.patch
@@ -0,0 +1,28 @@
+From 3161524085339ae214f7dee17a98ccd6c442d66b Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <chunrong....@nxp.com>
+Date: Thu, 16 Aug 2018 17:38:04 +0800
+Subject: [PATCH] Makefile: add CC=gcc
+
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Chunrong Guo <chunrong....@nxp.com>
+---
+ plat/nxp/tools/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/plat/nxp/tools/Makefile b/plat/nxp/tools/Makefile
+index e648fd1..43d3b56 100644
+--- a/plat/nxp/tools/Makefile
++++ b/plat/nxp/tools/Makefile
+@@ -32,6 +32,7 @@ endif
+ INCLUDE_PATHS :=
+ 
+ HOSTCC ?= gcc
++CC = gcc
+ 
+ .PHONY: all clean distclean
+ 
+-- 
+2.7.4
+
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 0000000..ffd9965
--- /dev/null
+++ b/recipes-bsp/atf/atf/0001-fix-fiptool-build-error.patch
@@ -0,0 +1,28 @@
+From a76ae26fdb673613f5f97872b7275c630b7b24b8 Mon Sep 17 00:00:00 2001
+From: BJ DevOps Team <bjdev...@nxp1.onmicrosoft.com>
+Date: Wed, 16 May 2018 13:26:45 +0800
+Subject: [PATCH] fix fiptool build error
+
+Upstream-Status: Inappropriate [embedded specific]
+
+---
+ tools/fiptool/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
+index e0e3923..f213f44 100644
+--- a/tools/fiptool/Makefile
++++ b/tools/fiptool/Makefile
+@@ -19,7 +19,8 @@ ifeq (${DEBUG},1)
+ else
+   CFLAGS += -O2
+ endif
+-LDLIBS := -lcrypto
++
++LDLIBS := -Wl,-rpath=${LIBPATH}/usr/lib  -L${LIBPATH}/usr/lib -lcrypto
+ 
+ ifeq (${V},0)
+   Q := @
+-- 
+1.8.3.1
+
diff --git a/recipes-bsp/atf/atf_git.bb b/recipes-bsp/atf/atf_git.bb
new file mode 100644
index 0000000..45bd376
--- /dev/null
+++ b/recipes-bsp/atf/atf_git.bb
@@ -0,0 +1,156 @@
+DESCRIPTION = "ARM Trusted Firmware"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443"
+
+inherit deploy
+
+DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw 
cst-native uefi"
+DEPENDS_append_qoriq-arm64 += "optee-os-qoriq"
+do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy"
+
+S = "${WORKDIR}/git"
+
+SRC_URI = 
"git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1"
+SRCREV = "4971f394cf32e33e3a9ca23a4faa49d606af31c5"
+
+SRC_URI += "file://0001-fix-fiptool-build-error.patch \
+    file://0001-Makefile-add-CC-gcc.patch \
+"
+COMPATIBLE_MACHINE = "(qoriq)"
+PLATFORM = "${MACHINE}"
+PLATFORM_ls1088ardb-pb = "ls1088ardb"
+# requires CROSS_COMPILE set by hand as there is no configure script
+export CROSS_COMPILE="${TARGET_PREFIX}"
+export ARCH="arm64"
+# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a 
standalone application
+CFLAGS[unexport] = "1"
+LDFLAGS[unexport] = "1"
+AS[unexport] = "1"
+LD[unexport] = "1"
+
+# set secure option
+# fuseopt ?= "FUSE_PROV=1  FUSE_FILE=$(CONFIG_SEC_FUSE_FILE)"
+
+BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc"
+BUILD_SECURE = "${@bb.utils.contains('COMBINED_FEATURES', 'secure', 'true', 
'false', d)}"
+BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 
'false', d)}"
+
+uboot_boot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot"
+uboot_boot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa"
+rcw ?= ""
+rcw_ls1012afrwy = "_default"
+rcw_ls1012ardb = "_default"
+rcwsec ?= ""
+rcwsec_ls1012afrwy = "_sben"
+rcwsec_ls1012ardb = "_sben"
+do_configure[noexec] = "1"
+
+do_compile() {
+    export LIBPATH="${RECIPE_SYSROOT_NATIVE}"
+    install -d ${S}/include/tools_share/openssl
+    cp -r ${RECIPE_SYSROOT}/usr/include/openssl/*   
${S}/include/tools_share/openssl
+    ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024
+    if [ "${BUILD_SECURE}" = "true" ]; then
+        secureopt="TRUSTED_BOARD_BOOT=1 $ddrphyopt 
CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst"
+        secext="_sec"
+        bl33="${uboot_boot_sec}"
+        rcwsec="${rcwsec}"
+    else
+        bl33="${uboot_boot}"
+        rcwsec="${rcw}"
+    fi       
+
+    if [ "${BUILD_OPTEE}" = "true" ]; then
+        bl32="${DEPLOY_DIR_IMAGE}/optee/tee_${MACHINE}.bin" 
+        bl32opt="BL32=${bl32}"
+        spdopt="SPD=opteed" 
+    fi
+
+    for d in ${BOOTTYPE}; do
+        case $d in
+        nor)
+            rcwimg="${RCWNOR}${rcwsec}.bin"
+            uefiboot="${UEFI_NORBOOT}"
+            ;;
+        nand)
+            rcwimg="${RCWNAND}${rcwsec}.bin"
+            ;;
+        qspi)
+            rcwimg="${RCWQSPI}${rcwsec}.bin"
+            ;;
+        sd)
+            rcwimg="${RCWSD}${rcwsec}.bin"
+            ;;
+        flexspi_nor)
+            rcwimg="${RCWXSPI}${rcwsec}.bin"
+            uefiboot="${UEFI_XSPIBOOT}"
+            ;;        
+        esac
+            
+       if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${PLATFORM}/${rcwimg}" ]; then
+                if [ ${MACHINE} = ls1012afrwy ]; then
+                    oe_runmake V=1 -C ${S} realclean
+                    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}
+                    cp -r ${S}/build/ls1012afrwy_512mb/release/bl2_qspi.pbl 
${S}/bl2_${d}_512mb.pbl
+                    cp -r ${S}/build/ls1012afrwy_512mb/release/fip.bin 
${S}/fip_512mb.bin
+                fi
+                if [ -n "${uefiboot}" ]; then
+                    oe_runmake V=1 -C ${S} realclean
+                    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}
+                    cp -r ${S}/build/${PLATFORM}/release/fip.bin 
${S}/fip_uefi.bin
+                fi
+                oe_runmake V=1 -C ${S} realclean
+                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}
+                cp -r ${S}/build/${PLATFORM}/release/bl2_${d}*.pbl ${S}
+        fi
+        rcwimg=""
+        uefiboot=""
+    done
+}
+
+do_install() {
+    install -d ${D}/boot/atf
+    if [ "${BUILD_SECURE}" = "y" ]; then
+        secext="_sec"
+    fi
+    if [ -f "${S}/fip_uefi.bin" ]; then
+        cp -r ${S}/fip_uefi.bin ${D}/boot/atf/fip_uefi.bin
+    fi
+    cp -r ${S}/build/${PLATFORM}/release/fip.bin ${D}/boot/atf/fip.bin
+    for d in ${BOOTTYPE}; do
+        if [ -e  ${S}/bl2_${d}${secext}.pbl ]; then
+            cp -r ${S}/bl2_${d}${secext}.pbl 
${D}/boot/atf/bl2_${d}${secext}.pbl
+        fi
+    done
+    if [ ${MACHINE} = ls1012afrwy ]; then
+            cp -r ${S}/fip_512mb.bin ${D}/boot/atf/fip_512mb.bin
+            cp -r ${S}/bl2_qspi_512mb.pbl ${D}/boot/atf/fip_512mb.bin
+    fi
+    chown -R root:root ${D}
+}
+
+do_deploy() {
+    install -d ${DEPLOYDIR}/atf
+    if [ "${BUILD_SECURE}" = "y" ]; then
+        secext="_sec"
+    fi
+
+    if [ -e ${D}/boot/atf/fip_uefi.bin ]; then
+        cp -r ${D}/boot/atf/fip_uefi.bin ${DEPLOYDIR}/atf/fip_uefi.bin
+    fi
+    cp -r ${D}/boot/atf/fip.bin ${DEPLOYDIR}/atf/fip_uboot${secext}.bin
+    for d in ${BOOTTYPE}; do
+        if [ -e ${D}/boot/atf/bl2_${d}${secext}.pbl ]; then
+            cp -r ${D}/boot/atf/bl2_${d}${secext}.pbl 
${DEPLOYDIR}/atf/bl2_${d}${secext}.pbl
+        fi
+    done
+    if [ ${MACHINE} = ls1012afrwy ]; then
+        cp -r ${S}/bl2_qspi_512mb.pbl ${DEPLOYDIR}/atf/
+        cp -r ${S}/fip_512mb.bin ${DEPLOYDIR}/atf/fip_uboot${secext}_512mb.bin
+    fi
+}
+addtask deploy after do_install
+FILES_${PN} += "/boot"
+BBCLASSEXTEND = "native nativesdk"
+COMPATIBLE_MACHINE = "(qoriq)"
-- 
2.7.4

-- 
_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to