From: Chunrong Guo <[email protected]> *ppa build support OPTEE-OS parameter.
*Building PPA source with OPTEE-OS *add ppa-optee recipes *update to e564143 e564143 - Adding 'execute' bit to gen_spd_its file mode a0e0479 - QPPA-34 Fix to resolve the 4.4 Kernel 32bit bootup issue. 3107360 - Initializing TZASC after EL3 cache maint ops; Setting OCRAM to secure access only when EL3 stacks are in OCRAM. db509c5 - Initializing smc global data region;Making data-in-ocram the default. 48ccba3 - Cleaning up code fix for QLINUX-8590. c1e2177 - Bringing TZASC Enablement under CONFIG_SPD compile time flag. fac778a - Enable LPM20 on LS2088A 5be38ad - Fix for ls1026ardb/ls1023ardb board boot up issue on dash-lts 4.9 kernel. JIRA Ticket QLINUX-8590 eb40915 - Adding support for LS1012 Freedom board. 833f749 - Fix for launching 32-bit kernel when OpTee is loaded. 75e9909 - Added TZC-380 & TZC-400 drivers for LS1043 and LS1046. f2eecde - Add proper checking for Trusted-OS vector-table. 24ecac4 - Enable PSCI-CPU-ON notification for trusted-OS. a9a6f4d - Fix in SPD for Coverity issues in TX1.0 release. b2979b5 - Disabling and re-enabling SEC on entry/exit to LPM20 on LS1088. b31c991 - Fix defect inserted into _zeroize_bss() during last commit. 3f83fd1 - Changed name of ddr/spd.c to spd_ddr.c to prevent filename collision with spd/spd.c. 59acbe2 - Fixing LSCH macro usage in timer.c. 030a2d7 - Adding SD/eMMC driver. 46016e6 - Added functions _getGICC_BaseAddr() and _getGICD_BaseAddr() to ls1012. 1f804e6 - Fixed handling of ls1043/ls1046 gic base address. 7e8df4f - Supplying the start address to _relocate_rela() and _zeroize_bss() functions. dc36a4e - Resequencing the startup code for ddr and non-ddr builds. Fixed handling of input parameters to _ppa_main(). 52f6c8b - Cleanup monitor code. bdd2e61 - Adding temporary stack to bootcore before ppa_main() is called. aa5b722 - Added build option to relocate ppa data areas from OCRAM to ddr. This option is only to support falcon boot. d697652 - Adding spd interface Signed-off-by: Chunrong Guo <[email protected]> --- recipes-bsp/ppa/ppa-optee_git.bb | 19 ++++++++++++ recipes-bsp/ppa/ppa.inc | 57 ++++++++++++++++++++++++++++++++++ recipes-bsp/ppa/ppa_git.bb | 66 ++++++---------------------------------- 3 files changed, 85 insertions(+), 57 deletions(-) create mode 100644 recipes-bsp/ppa/ppa-optee_git.bb create mode 100644 recipes-bsp/ppa/ppa.inc diff --git a/recipes-bsp/ppa/ppa-optee_git.bb b/recipes-bsp/ppa/ppa-optee_git.bb new file mode 100644 index 0000000..b96f98c --- /dev/null +++ b/recipes-bsp/ppa/ppa-optee_git.bb @@ -0,0 +1,19 @@ +require ppa.inc + +DEPENDS += "optee-os" + +PPA_PATH_ls1046a = "ppa/soc-ls1046/platform-rdb" +PPA_PATH_ls1043a = "ppa/soc-ls2088/platform-rdb" +PPA_PATH_ls1012ardb = "ppa/soc-ls1012/platform-rdb" + +do_compile() { + export ARMV8_TOOLS_DIR="${STAGING_BINDIR_TOOLCHAIN}" + export ARMV8_TOOLS_PREFIX="${TARGET_PREFIX}" + export CROSS_COMPILE="${WRAP_TARGET_PREFIX}" + cp ${DEPLOY_DIR_IMAGE}/optee/tee_${MACHINE}.bin ${S}/${PPA_PATH}/tee.bin + cd ${S}/${PPA_PATH} + oe_runmake rdb-fit spd=on + cd ${S} +} + +COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls1012ardb)" diff --git a/recipes-bsp/ppa/ppa.inc b/recipes-bsp/ppa/ppa.inc new file mode 100644 index 0000000..6a1ed5d --- /dev/null +++ b/recipes-bsp/ppa/ppa.inc @@ -0,0 +1,57 @@ +SUMMARY = "Primary Protected Application" +LICENSE = "Freescale-EULA" +LIC_FILES_CHKSUM = "file://license.txt;md5=2ecf925c01a48f61c88f78c30fe2ee3b" + +DEPENDS += "u-boot-mkimage-native dtc-native" + +inherit deploy + +FILESEXTRAPATHS_prepend := "${THISDIR}/ppa:" + +SRC_URI = "git://github.com/qoriq-open-source/ppa-generic.git;nobranch=1 \ + file://0001-fix-path-error.patch \ +" +SRCREV = "e5641434f00d75634a285341d810df4261daf5de" + +S = "${WORKDIR}/git" + +python () { + ml = d.getVar("MULTILIB_VARIANTS", True) + arch = d.getVar("OVERRIDES", True) + if "fsl-lsch2-32b:" in arch: + if not "lib64" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") + sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux' + sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') + workdir = d.getVar('WORKDIR').replace(sys_original,sys_multilib) + d.setVar('DEPENDS_append', ' lib64-gcc-cross-aarch64 lib64-libgcc') + d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib) + d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot') + d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-') +} + +WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" +EXTRA_OEMAKE = 'CC64="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" LD64="${WRAP_TARGET_PREFIX}ld ${TOOLCHAIN_OPTIONS}" OBJ64="${WRAP_TARGET_PREFIX}objcopy"' + +PPA_NAME = "${PN}-${MACHINE}-${DATETIME}" +PPA_NAME[vardepsexclude] = "DATETIME" + +do_install() { + install -d ${D}/boot/ + install ${S}/${PPA_PATH}/build/obj/ppa.itb ${D}/boot/${PPA_NAME}.itb + ln -sfT ${PPA_NAME}.itb ${D}/boot/${PN}.itb +} + +do_deploy(){ + install -d ${DEPLOYDIR} + install ${S}/${PPA_PATH}/build/obj/ppa.itb ${DEPLOYDIR}/${PPA_NAME}.itb + ln -sfT ${PPA_NAME}.itb ${DEPLOYDIR}/${PN}.itb +} +addtask deploy before do_build after do_install + +PACKAGES += "${PN}-image" +FILES_${PN}-image += "/boot" + +CLEANBROKEN = "1" +PARALLEL_MAKE = "" +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/recipes-bsp/ppa/ppa_git.bb b/recipes-bsp/ppa/ppa_git.bb index c4f81bc..0947bfb 100644 --- a/recipes-bsp/ppa/ppa_git.bb +++ b/recipes-bsp/ppa/ppa_git.bb @@ -1,70 +1,22 @@ -SUMMARY = "Primary Protected Application" -LICENSE = "Freescale-EULA" -LIC_FILES_CHKSUM = "file://license.txt;md5=2ecf925c01a48f61c88f78c30fe2ee3b" +require ppa.inc -DEPENDS += "u-boot-mkimage-native dtc-native" - -inherit deploy - -SRC_URI = "git://github.com/qoriq-open-source/ppa-generic.git;nobranch=1 \ - file://0001-fix-path-error.patch \ -" -SRCREV = "92b208b0dbb5a47b06627ec62824cb5790b3f482" - -S = "${WORKDIR}/git" - -python () { - ml = d.getVar("MULTILIB_VARIANTS", True) - arch = d.getVar("OVERRIDES", True) - if "fsl-lsch2-32b:" in arch: - if not "lib64" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") - sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux' - sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') - workdir = d.getVar('WORKDIR').replace(sys_original,sys_multilib) - d.setVar('DEPENDS_append', ' lib64-gcc-cross-aarch64 lib64-libgcc') - d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/aarch64' + sys_multilib) - d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib64-recipe-sysroot') - d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-') -} - -WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" -EXTRA_OEMAKE = 'CC64="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" LD64="${WRAP_TARGET_PREFIX}ld ${TOOLCHAIN_OPTIONS}" OBJ64="${WRAP_TARGET_PREFIX}objcopy"' - -PPA_PATH ?= "ppa/soc-ls1043/platform-rdb" +PPA_PATH_ls1043a = "ppa/soc-ls1043/platform-rdb" PPA_PATH_ls1046a = "ppa/soc-ls1046/platform-rdb" PPA_PATH_ls2088a = "ppa/soc-ls2088/platform-rdb" PPA_PATH_ls1088a = "ppa/soc-ls1088/platform-rdb" -PPA_PATH_ls1012a = "ppa/soc-ls1012/platform-rdb" -PPA_NAME ?= "ppa-${MACHINE}-${DATETIME}" -PPA_NAME[vardepsexclude] = "DATETIME" +PPA_PATH_ls1012a = "ppa/soc-ls1012/platform-frdm" do_compile() { export ARMV8_TOOLS_DIR="${STAGING_BINDIR_TOOLCHAIN}" export ARMV8_TOOLS_PREFIX="${TARGET_PREFIX}" export CROSS_COMPILE="${WRAP_TARGET_PREFIX}" cd ${S}/${PPA_PATH} - oe_runmake rdb-fit + if [ ${MACHINE} = ls1012afrdm ]; then + oe_runmake frdm-fit + else + oe_runmake rdb-fit + fi cd ${S} } -do_install() { - install -d ${D}/boot/ - install ${S}/${PPA_PATH}/build/obj/ppa.itb ${D}/boot/${PPA_NAME}.itb - ln -sfT ${PPA_NAME}.itb ${D}/boot/ppa.itb -} - -do_deploy(){ - install -d ${DEPLOYDIR} - install ${S}/${PPA_PATH}/build/obj/ppa.itb ${DEPLOYDIR}/${PPA_NAME}.itb - ln -sfT ${PPA_NAME}.itb ${DEPLOYDIR}/ppa.itb -} -addtask deploy before do_build after do_install - -PACKAGES += "${PN}-image" -FILES_${PN}-image += "/boot" - -CLEANBROKEN = "1" -PARALLEL_MAKE = "" -COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls2088a|ls1012a|ls1088a)" -PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls2088a|ls1012afrdm|ls1088a)" -- 1.9.0 -- _______________________________________________ meta-freescale mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-freescale
