From 50c4043470eed14d1a22ec78b327daacfa3d8877 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 13 Oct 2021 14:15:19 +0530 Subject: restool: ignore maybe-uninitialized warnnings Fix: In function 'create_dpbp_v9', inlined from 'create_dpbp' at dpbp_commands.c:465:11: dpbp_commands.c:371:17: error: 'dpbp_cfg' may be used uninitialized [-Werror=maybe-uninitialized] 371 | error = dpbp_create(&restool.mc_io, 0, dpbp_cfg, &dpbp_handle); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from dpbp_commands.c:43: dpbp_commands.c: In function 'create_dpbp': mc_v9/fsl_dpbp.h:108:5: note: by argument 3 of type 'const struct dpbp_cfg *' to 'dpbp_create' declared here 108 | int dpbp_create(struct fsl_mc_io *mc_io, | ^~~~~~~~~~~ dpbp_commands.c:448:25: note: 'dpbp_cfg' declared here 448 | struct dpbp_cfg dpbp_cfg; | ^~~~~~~~ | In function 'create_dprtc_v9', | inlined from 'create_dprtc' at dprtc_commands.c:463:11: | dprtc_commands.c:369:17: error: 'dprtc_cfg' may be used uninitialized [-Werror=maybe-uninitialized] | 369 | error = dprtc_create(&restool.mc_io, 0, dprtc_cfg, &dprtc_handle); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | In file included from dprtc_commands.c:42: | dprtc_commands.c: In function 'create_dprtc': | mc_v9/fsl_dprtc.h:126:5: note: by argument 3 of type 'const struct dprtc_cfg *' to 'dprtc_create' declared here | 126 | int dprtc_create(struct fsl_mc_io *mc_io, | | ^~~~~~~~~~~~ | dprtc_commands.c:447:26: note: 'dprtc_cfg' declared here | 447 | struct dprtc_cfg dprtc_cfg; | | ^~~~~~~~~ Signed-off-by: Ting Liu --- recipes-dpaa2/restool/restool_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-dpaa2/restool/restool_git.bb b/recipes-dpaa2/restool/restool_git.bb index 5376d8f7..966f6109 100644 --- a/recipes-dpaa2/restool/restool_git.bb +++ b/recipes-dpaa2/restool/restool_git.bb @@ -9,7 +9,7 @@ SRCREV = "8ddbe4c9559ffad5d7e5dd3cd5f00ceeff7f05d4" S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces"' +EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized"' do_install () { oe_runmake install DESTDIR=${D} -- cgit v1.2.3-54-g00ecf From 3fde9bdf9f04b8243b3cb07363ad32eea4ec1921 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Wed, 13 Oct 2021 14:15:19 +0530 Subject: restool: ignore date-time warnnings Fix: | restool.c: In function 'main': | restool.c:1346:68: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time] | 1346 | DEBUG_PRINTF("restool built on " __DATE__ " " __TIME__ "\n"); | | ^ | restool.c:1346:42: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time] Signed-off-by: Ting Liu --- recipes-dpaa2/restool/restool_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-dpaa2/restool/restool_git.bb b/recipes-dpaa2/restool/restool_git.bb index 966f6109..7f4a93f7 100644 --- a/recipes-dpaa2/restool/restool_git.bb +++ b/recipes-dpaa2/restool/restool_git.bb @@ -9,7 +9,7 @@ SRCREV = "8ddbe4c9559ffad5d7e5dd3cd5f00ceeff7f05d4" S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized"' +EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized -Wno-date-time"' do_install () { oe_runmake install DESTDIR=${D} -- cgit v1.2.3-54-g00ecf From 565af7f7c405c429b1747c748bc6159f830c4dbb Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 15:28:55 +0800 Subject: restool: update to d29522a New commits: d29522a dpsw: set mem_size field in ls-addsw to 0 by default d7512d2 dpdmux: set mem_size field in ls-addmux to 0 by default 8fd3a6b restool: increase version to v2.3 53140e4 restool: change version string formatting 34e4e27 add man page for restool 2d46b18 restool: add bash completion script 2b876b5 dpdmai: add support for the new DPDMAI_OPT_CG_PER_PRIORITY create option 6188bc5 restool: support new dpsw_create and dpdmux_create option mem_size 0dd8744 restool: add DPSW_OPT_BP_PER_IF in dpsw create and ls-addsw 1bdfa99 ls-delete: take into account different naming for device links 6dd9314 dpni: memset the statistics feddfa6 dpsw: add support to configure the component-type 282bd30 restool: add support for DPDMUX_OPT_AUTO_MAX_FRAME_LEN 23cdaec restool: print max_frame_length in info command 2876f7c dpni: add page_6 missing structure to dpn_statistics_v10 18c53fc restool: info command shows newly added stats 96ce70e dpdmux: dump interface statistics in info command output afd9831 scripts: add the ls-delete helper script 0977d12 ls-addni: create a DPMCP for each DPIO created disable manpage generation. Signed-off-by: Ting Liu --- .../restool/files/disable-manpage-generation.patch | 25 ++++++++++++++++++++++ recipes-dpaa2/restool/restool_git.bb | 15 ++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 recipes-dpaa2/restool/files/disable-manpage-generation.patch diff --git a/recipes-dpaa2/restool/files/disable-manpage-generation.patch b/recipes-dpaa2/restool/files/disable-manpage-generation.patch new file mode 100644 index 00000000..ec512830 --- /dev/null +++ b/recipes-dpaa2/restool/files/disable-manpage-generation.patch @@ -0,0 +1,25 @@ +From 5392152e704ff001c41de03445d668227237a87e Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Fri, 15 Oct 2021 09:36:04 +0530 +Subject: [PATCH] disable manpage generation + +Signed-off-by: Ting Liu +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index ee669ae..ab6e499 100644 +--- a/Makefile ++++ b/Makefile +@@ -60,7 +60,6 @@ install: restool scripts/ls-main scripts/ls-append-dpl scripts/ls-debug scripts/ + install -D -m 755 scripts/ls-debug $(DESTDIR)$(bindir)/ls-debug + $(foreach symlink, $(RESTOOL_SCRIPT_SYMLINKS), sh -c "cd $(DESTDIR)$(bindir) && ln -sf ls-main $(symlink)" ;) + install -D -m 755 scripts/restool_completion.sh $(DESTDIR)$(bindir_completion)/restool +- install -m 0644 -D $(MANPAGE) $(call get_manpage_destination,$(MANPAGE)) + + clean: + rm -f $(OBJ) $(MANPAGE) \ +-- +2.25.1 + diff --git a/recipes-dpaa2/restool/restool_git.bb b/recipes-dpaa2/restool/restool_git.bb index 7f4a93f7..3ff5afd8 100644 --- a/recipes-dpaa2/restool/restool_git.bb +++ b/recipes-dpaa2/restool/restool_git.bb @@ -2,14 +2,16 @@ SUMMARY = "DPAA2 Resource Manager Tool" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=ec8d84e9cd4de287e290275d09db27f0" -RDEPENDS:${PN} += "bash dtc" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1" -SRCREV = "8ddbe4c9559ffad5d7e5dd3cd5f00ceeff7f05d4" +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1 \ + file://disable-manpage-generation.patch \ +" +SRCREV = "d29522aef9f92ff2557978d5d3979b771a9576fe" S = "${WORKDIR}/git" -EXTRA_OEMAKE = 'CC="${CC}" EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized -Wno-date-time"' +inherit bash-completion + +EXTRA_OEMAKE = 'CC="${CC}" MANPAGE= EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized -Wno-date-time"' do_install () { oe_runmake install DESTDIR=${D} @@ -18,3 +20,6 @@ do_install () { COMPATIBLE_MACHINE = "(qoriq-arm64)" PACKAGE_ARCH = "${MACHINE_ARCH}" +RDEPENDS:${PN} += "bash dtc" +RDEPENDS:${PN}-bash-completion += "bash" + -- cgit v1.2.3-54-g00ecf From cbf7d2dc847cefbe6ad4812ed81cafb4b49daa6c Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 15:36:05 +0800 Subject: rcw: update to 1f43189 New commits: 1f43189 ls1028a: use RGMII for the EC1 pins for all LS1028A-QDS boards by default e25dd0e ls1046ardb : Add proper clock dividers for QSPI fd70414 lx2162aqds: Add RCWs with DDR 3200 MT/s 337adc2 lx2162aqds: Remove RCWs with platform freq 700 52219d4 ls1046ardb: Update QSPI divisor value bd0bb76 lx2162aqds: 17_2: Add RCW with DDR at 3200 Mt/s Signed-off-by: Ting Liu --- recipes-bsp/rcw/rcw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb index 88b7b995..04f71ba3 100644 --- a/recipes-bsp/rcw/rcw_git.bb +++ b/recipes-bsp/rcw/rcw_git.bb @@ -8,7 +8,7 @@ DEPENDS += "tcl-native" inherit deploy siteinfo SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1" -SRCREV = "1caebba96b6fd8eac9ef4246c181f2b47c448c4f" +SRCREV = "1f431891c7f0e7d4f52327f1fe19504a284491c4" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 1ecb4d68009cd5206f0acabe40fe4037e41b42c7 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 15:42:11 +0800 Subject: linux-qoriq: upgrade to 5.10 Signed-off-by: Ting Liu --- recipes-kernel/linux/linux-qoriq.inc | 12 +----------- recipes-kernel/linux/linux-qoriq_5.10.bb | 8 ++++++++ recipes-kernel/linux/linux-qoriq_5.4.bb | 14 -------------- 3 files changed, 9 insertions(+), 25 deletions(-) create mode 100644 recipes-kernel/linux/linux-qoriq_5.10.bb delete mode 100644 recipes-kernel/linux/linux-qoriq_5.4.bb diff --git a/recipes-kernel/linux/linux-qoriq.inc b/recipes-kernel/linux/linux-qoriq.inc index edac1055..cd474aed 100644 --- a/recipes-kernel/linux/linux-qoriq.inc +++ b/recipes-kernel/linux/linux-qoriq.inc @@ -25,8 +25,7 @@ SCMVERSION ?= "y" LOCALVERSION = "" DELTA_KERNEL_DEFCONFIG ?= "" DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm64 = "lsdk.config " -DELTA_KERNEL_DEFCONFIG:prepend:fsl-lsch2-32b = "multi_v7_lpae.config multi_v8.config lsdk.config " -DELTA_KERNEL_DEFCONFIG:prepend:ls102xa = "multi_v7_lpae.config lsdk.config " +DELTA_KERNEL_DEFCONFIG:prepend:qoriq-arm = "multi_v7_lpae.config lsdk.config " do_merge_delta_config[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot bison-native:do_populate_sysroot" do_merge_delta_config[dirs] = "${B}" @@ -55,14 +54,5 @@ do_merge_delta_config() { } addtask merge_delta_config before do_kernel_localversion after do_patch -# The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b) -do_compile:prepend:fsl-lsch2-32b() { - ln -sfT ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/freescale ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale -} - -do_install:prepend:fsl-lsch2-32b() { - rm -f ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/freescale -} - FILES:${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*" COMPATIBLE_MACHINE = "(qoriq)" diff --git a/recipes-kernel/linux/linux-qoriq_5.10.bb b/recipes-kernel/linux/linux-qoriq_5.10.bb new file mode 100644 index 00000000..b5315c71 --- /dev/null +++ b/recipes-kernel/linux/linux-qoriq_5.10.bb @@ -0,0 +1,8 @@ +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +LINUX_VERSION = "5.10.52" + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1" +SRCREV = "a11753a89ec610768301d4070e10b8bd60fde8cd" + +require recipes-kernel/linux/linux-qoriq.inc diff --git a/recipes-kernel/linux/linux-qoriq_5.4.bb b/recipes-kernel/linux/linux-qoriq_5.4.bb deleted file mode 100644 index 54fd700c..00000000 --- a/recipes-kernel/linux/linux-qoriq_5.4.bb +++ /dev/null @@ -1,14 +0,0 @@ -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -LINUX_VERSION = "5.4.47" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1 \ - file://0001-Makfefile-linux-5.4-add-warning-cflags-on-LSDK-20.04.patch \ - file://0001-perf-tests-bp_account-Make-global-variable-static.patch \ - file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch \ - file://0001-perf-bench-Share-some-global-variables-to-fix-build-.patch \ - file://0001-libtraceevent-Fix-build-with-binutils-2.35.patch \ -" -SRCREV = "6bff40d413b394c2d742e7a42089bfc62aef0a9b" - -require recipes-kernel/linux/linux-qoriq.inc -- cgit v1.2.3-54-g00ecf From 426a8d3ddc8ef0b2e293d8f0d82b56be64884025 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 15:44:35 +0800 Subject: u-boot-qoriq: upgrade to 2021.04 Signed-off-by: Ting Liu --- recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb | 98 ------------------------------ recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb | 98 ++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb create mode 100644 recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb b/recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb deleted file mode 100644 index 69b03de1..00000000 --- a/recipes-bsp/u-boot/u-boot-qoriq_2020.04.bb +++ /dev/null @@ -1,98 +0,0 @@ -require recipes-bsp/u-boot/u-boot.inc - -DESCRIPTION = "U-Boot provided by Freescale with focus on QorIQ boards" -PROVIDES += "u-boot" - -inherit fsl-u-boot-localversion - -LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" -LIC_FILES_CHKSUM = " \ - file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ - file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ - file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ - file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ -" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1" -SRCREV= "f46a944f715f284aff1d42c009680ffe0be4058f" - -S = "${WORKDIR}/git" -B = "${WORKDIR}/build" -PV:append = "+fslgit" -LOCALVERSION = "+fsl" - -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "libgcc virtual/${TARGET_PREFIX}gcc bison-native bc-native swig-native python3-native" -DEPENDS:append:qoriq-arm64 = " dtc-native" -DEPENDS:append:qoriq-arm = " dtc-native" -DEPENDS:append:qoriq-ppc = " boot-format-native" - -python () { - if d.getVar("TCMODE") == "external-fsl": - return - - ml = d.getVar("MULTILIB_VARIANTS") - arch = d.getVar("OVERRIDES") - - if "e5500-64b:" in arch or "e6500-64b:" in arch: - if not "lib32" in ml: - raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") - sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib32-linux' - sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') - workdir = d.getVar('WORKDIR') - d.setVar('DEPENDS:append', ' lib32-gcc-cross-powerpc lib32-libgcc') - d.setVar('PATH:append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/powerpc' + sys_multilib) - d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib32-recipe-sysroot') - d.setVar("WRAP_TARGET_PREFIX", 'powerpc' + sys_multilib + '-') - elif "fsl-lsch2-32b:" in arch: - if not "lib64" in ml: - raise bb.parse.SkipRecipe("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') - 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 + '-') -} - -LE_UBOOT_FOR_ARMBE_TARGET ?= "0" -ENDIANNESS_GCC = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-mlittle-endian", "", d)}" -ENDIANNESS_LD = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-EL", "", d)}" - -WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" -EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${ENDIANNESS_GCC}" LD="${WRAP_TARGET_PREFIX}ld ${ENDIANNESS_LD}" V=1' -EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' -EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' - -do_compile:append:qoriq() { - unset i j k - for config in ${UBOOT_MACHINE}; do - i=`expr $i + 1`; - for type in ${UBOOT_CONFIG}; do - j=`expr $j + 1`; - for binary in ${UBOOT_BINARIES}; do - k=`expr $k + 1` - if [ $j -eq $i ] && [ $k -eq $i ]; then - if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then - # regenerate spi binary if BOOTFORMAT_CONFIG is set - boot_format ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ - ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin - cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX} - elif [ "qspi" = "${type}" ];then - cp ${config}/${binary} ${config}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - fi - fi - done - unset k - done - unset j - done - unset i -} - - -PACKAGES += "${PN}-images" -FILES:${PN}-images += "/boot" -COMPATIBLE_MACHINE = "(qoriq)" diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb b/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb new file mode 100644 index 00000000..db93710d --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-qoriq_2021.04.bb @@ -0,0 +1,98 @@ +require recipes-bsp/u-boot/u-boot.inc + +DESCRIPTION = "U-Boot provided by Freescale with focus on QorIQ boards" +PROVIDES += "u-boot" + +inherit fsl-u-boot-localversion + +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ +" + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1" +SRCREV= "1c0116f3da250c5a52858c53efb8b38c0963f477" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" +PV:append = "+fslgit" +LOCALVERSION = "+fsl" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "libgcc virtual/${TARGET_PREFIX}gcc bison-native bc-native swig-native python3-native" +DEPENDS:append:qoriq-arm64 = " dtc-native" +DEPENDS:append:qoriq-arm = " dtc-native" +DEPENDS:append:qoriq-ppc = " boot-format-native" + +python () { + if d.getVar("TCMODE") == "external-fsl": + return + + ml = d.getVar("MULTILIB_VARIANTS") + arch = d.getVar("OVERRIDES") + + if "e5500-64b:" in arch or "e6500-64b:" in arch: + if not "lib32" in ml: + raise bb.parse.SkipPackage("Building the u-boot for this arch requires multilib to be enabled") + sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib32-linux' + sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS') + workdir = d.getVar('WORKDIR') + d.setVar('DEPENDS:append', ' lib32-gcc-cross-powerpc lib32-libgcc') + d.setVar('PATH:append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/powerpc' + sys_multilib) + d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + '/lib32-recipe-sysroot') + d.setVar("WRAP_TARGET_PREFIX", 'powerpc' + sys_multilib + '-') + elif "fsl-lsch2-32b:" in arch: + if not "lib64" in ml: + raise bb.parse.SkipRecipe("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') + 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 + '-') +} + +LE_UBOOT_FOR_ARMBE_TARGET ?= "0" +ENDIANNESS_GCC = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-mlittle-endian", "", d)}" +ENDIANNESS_LD = "${@bb.utils.contains("LE_UBOOT_FOR_ARMBE_TARGET", "1", "-EL", "", d)}" + +WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" +EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${ENDIANNESS_GCC}" LD="${WRAP_TARGET_PREFIX}ld ${ENDIANNESS_LD}" V=1' +EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' +EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' + +do_compile:append:qoriq() { + unset i j k + for config in ${UBOOT_MACHINE}; do + i=`expr $i + 1`; + for type in ${UBOOT_CONFIG}; do + j=`expr $j + 1`; + for binary in ${UBOOT_BINARIES}; do + k=`expr $k + 1` + if [ $j -eq $i ] && [ $k -eq $i ]; then + if [ -n "${BOOTFORMAT_CONFIG}" ] && echo "${type}" |grep -q spi;then + # regenerate spi binary if BOOTFORMAT_CONFIG is set + boot_format ${STAGING_DATADIR_NATIVE}/boot_format/${BOOTFORMAT_CONFIG} \ + ${config}/u-boot-${type}.${UBOOT_SUFFIX} -spi ${config}/u-boot.format.bin + cp ${config}/u-boot.format.bin ${config}/u-boot-${type}.${UBOOT_SUFFIX} + elif [ "qspi" = "${type}" ];then + cp ${config}/${binary} ${config}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + fi + fi + done + unset k + done + unset j + done + unset i +} + + +PACKAGES += "${PN}-images" +FILES:${PN}-images += "/boot" +COMPATIBLE_MACHINE = "(qoriq)" -- cgit v1.2.3-54-g00ecf From 115d33d607bbf3b743a8047861883e0275271222 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 15:57:26 +0800 Subject: qoriq-atf: upgrade to 2.4 Signed-off-by: Ting Liu --- ...-usage-of-void-pointers-to-access-symbols.patch | 709 --------------------- recipes-bsp/atf/qoriq-atf-2.3.inc | 13 - recipes-bsp/atf/qoriq-atf-2.4.inc | 10 + recipes-bsp/atf/qoriq-atf-tools_2.3.bb | 14 - recipes-bsp/atf/qoriq-atf-tools_2.4.bb | 13 + recipes-bsp/atf/qoriq-atf_1.5.bb | 248 ------- recipes-bsp/atf/qoriq-atf_2.3.bb | 175 ----- recipes-bsp/atf/qoriq-atf_2.4.bb | 186 ++++++ 8 files changed, 209 insertions(+), 1159 deletions(-) delete mode 100644 recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch delete mode 100644 recipes-bsp/atf/qoriq-atf-2.3.inc create mode 100644 recipes-bsp/atf/qoriq-atf-2.4.inc delete mode 100644 recipes-bsp/atf/qoriq-atf-tools_2.3.bb create mode 100644 recipes-bsp/atf/qoriq-atf-tools_2.4.bb delete mode 100644 recipes-bsp/atf/qoriq-atf_1.5.bb delete mode 100644 recipes-bsp/atf/qoriq-atf_2.3.bb create mode 100644 recipes-bsp/atf/qoriq-atf_2.4.bb diff --git a/recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch b/recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch deleted file mode 100644 index e3b6f860..00000000 --- a/recipes-bsp/atf/files/0001-Clean-usage-of-void-pointers-to-access-symbols.patch +++ /dev/null @@ -1,709 +0,0 @@ -From 9f85f9e3796f1c351bbc4c8436dc66d83c140b71 Mon Sep 17 00:00:00 2001 -From: Joel Hutton -Date: Wed, 21 Mar 2018 11:40:57 +0000 -Subject: [PATCH] Clean usage of void pointers to access symbols - -Void pointers have been used to access linker symbols, by declaring an -extern pointer, then taking the address of it. This limits symbols -values to aligned pointer values. To remove this restriction an -IMPORT_SYM macro has been introduced, which declares it as a char -pointer and casts it to the required type. - -Upstream-Status: Backport - -Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0 -Signed-off-by: Joel Hutton ---- - bl1/bl1_private.h | 12 +++---- - common/runtime_svc.c | 4 +-- - drivers/auth/img_parser_mod.c | 9 +++--- - include/common/bl_common.h | 32 ++++++++++++------- - include/common/runtime_svc.h | 4 +-- - include/lib/utils_def.h | 19 ++++++++++- - include/plat/common/common_def.h | 24 ++------------ - include/services/secure_partition.h | 12 +++---- - lib/locks/bakery/bakery_lock_normal.c | 6 ++-- - lib/pmf/pmf_main.c | 19 +++++------ - plat/hisilicon/hikey/hikey_bl1_setup.c | 21 ++----------- - plat/hisilicon/hikey960/hikey960_bl1_setup.c | 16 ++-------- - plat/hisilicon/poplar/bl1_plat_setup.c | 13 ++------ - plat/mediatek/mt6795/bl31_plat_setup.c | 11 +++---- - plat/mediatek/mt8173/bl31_plat_setup.c | 28 +++-------------- - plat/nvidia/tegra/common/tegra_bl31_setup.c | 33 +++++++------------- - plat/rockchip/common/bl31_plat_setup.c | 13 ++------ - services/std_svc/spm/spm_shim_private.h | 14 +++------ - 18 files changed, 103 insertions(+), 187 deletions(-) - -diff --git a/bl1/bl1_private.h b/bl1/bl1_private.h -index 6ac3b8c67..42a74d22f 100644 ---- a/bl1/bl1_private.h -+++ b/bl1/bl1_private.h -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -8,18 +8,16 @@ - #define __BL1_PRIVATE_H__ - - #include -+#include - - /******************************************************************************* - * Declarations of linker defined symbols which will tell us where BL1 lives - * in Trusted ROM and RAM - ******************************************************************************/ --extern uintptr_t __BL1_ROM_END__; --#define BL1_ROM_END (uintptr_t)(&__BL1_ROM_END__) -+IMPORT_SYM(uintptr_t, __BL1_ROM_END__, BL1_ROM_END); - --extern uintptr_t __BL1_RAM_START__; --extern uintptr_t __BL1_RAM_END__; --#define BL1_RAM_BASE (uintptr_t)(&__BL1_RAM_START__) --#define BL1_RAM_LIMIT (uintptr_t)(&__BL1_RAM_END__) -+IMPORT_SYM(uintptr_t, __BL1_RAM_START__, BL1_RAM_BASE); -+IMPORT_SYM(uintptr_t, __BL1_RAM_END__, BL1_RAM_LIMIT); - - /****************************************** - * Function prototypes -diff --git a/common/runtime_svc.c b/common/runtime_svc.c -index 0ea4cd093..de80f30c2 100644 ---- a/common/runtime_svc.c -+++ b/common/runtime_svc.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -19,8 +19,6 @@ - * 'rt_svc_descs_indices' array. This gives the index of the descriptor in the - * 'rt_svc_descs' array which contains the SMC handler. - ******************************************************************************/ --#define RT_SVC_DESCS_START ((uintptr_t) (&__RT_SVC_DESCS_START__)) --#define RT_SVC_DESCS_END ((uintptr_t) (&__RT_SVC_DESCS_END__)) - uint8_t rt_svc_descs_indices[MAX_RT_SVCS]; - static rt_svc_desc_t *rt_svc_descs; - -diff --git a/drivers/auth/img_parser_mod.c b/drivers/auth/img_parser_mod.c -index 6a0107115..63160141d 100644 ---- a/drivers/auth/img_parser_mod.c -+++ b/drivers/auth/img_parser_mod.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -12,11 +12,10 @@ - #include - #include - #include -+#include - --extern uintptr_t __PARSER_LIB_DESCS_START__; --extern uintptr_t __PARSER_LIB_DESCS_END__; --#define PARSER_LIB_DESCS_START ((uintptr_t) (&__PARSER_LIB_DESCS_START__)) --#define PARSER_LIB_DESCS_END ((uintptr_t) (&__PARSER_LIB_DESCS_END__)) -+IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_START__, PARSER_LIB_DESCS_START); -+IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_END__, PARSER_LIB_DESCS_END); - static unsigned int parser_lib_indices[IMG_MAX_TYPES]; - static img_parser_lib_desc_t *parser_lib_descs; - -diff --git a/include/common/bl_common.h b/include/common/bl_common.h -index 4ef916f53..09a394dd1 100644 ---- a/include/common/bl_common.h -+++ b/include/common/bl_common.h -@@ -64,33 +64,41 @@ - #include - #include /* To retain compatibility */ - -+ - /* - * Declarations of linker defined symbols to help determine memory layout of - * BL images - */ - #if SEPARATE_CODE_AND_RODATA --extern uintptr_t __TEXT_START__; --extern uintptr_t __TEXT_END__; --extern uintptr_t __RODATA_START__; --extern uintptr_t __RODATA_END__; -+IMPORT_SYM(unsigned long, __TEXT_START__, BL_CODE_BASE); -+IMPORT_SYM(unsigned long, __TEXT_END__, BL_CODE_END); -+IMPORT_SYM(unsigned long, __RODATA_START__, BL_RO_DATA_BASE); -+IMPORT_SYM(unsigned long, __RODATA_END__, BL_RO_DATA_END); - #else --extern uintptr_t __RO_START__; --extern uintptr_t __RO_END__; -+IMPORT_SYM(unsigned long, __RO_START__, BL_CODE_BASE); -+IMPORT_SYM(unsigned long, __RO_END__, BL_CODE_END); - #endif - - #if defined(IMAGE_BL2) --extern uintptr_t __BL2_END__; -+IMPORT_SYM(unsigned long, __BL2_END__, BL2_END); - #elif defined(IMAGE_BL2U) --extern uintptr_t __BL2U_END__; -+IMPORT_SYM(unsigned long, __BL2U_END__, BL2U_END); - #elif defined(IMAGE_BL31) --extern uintptr_t __BL31_END__; -+IMPORT_SYM(unsigned long, __BL31_END__, BL31_END); - #elif defined(IMAGE_BL32) --extern uintptr_t __BL32_END__; -+IMPORT_SYM(unsigned long, __BL32_END__, BL32_END); - #endif /* IMAGE_BLX */ - -+/* -+ * The next 2 constants identify the extents of the coherent memory region. -+ * These addresses are used by the MMU setup code and therefore they must be -+ * page-aligned. It is the responsibility of the linker script to ensure that -+ * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to -+ * page-aligned addresses. -+ */ - #if USE_COHERENT_MEM --extern uintptr_t __COHERENT_RAM_START__; --extern uintptr_t __COHERENT_RAM_END__; -+IMPORT_SYM(unsigned long, __COHERENT_RAM_START__, BL_COHERENT_RAM_BASE); -+IMPORT_SYM(unsigned long, __COHERENT_RAM_END__, BL_COHERENT_RAM_END); - #endif - - /******************************************************************************* -diff --git a/include/common/runtime_svc.h b/include/common/runtime_svc.h -index d12af227e..5d9fa3908 100644 ---- a/include/common/runtime_svc.h -+++ b/include/common/runtime_svc.h -@@ -122,8 +122,8 @@ CASSERT(RT_SVC_DESC_HANDLE == __builtin_offsetof(rt_svc_desc_t, handle), \ - void runtime_svc_init(void); - uintptr_t handle_runtime_svc(uint32_t smc_fid, void *cookie, void *handle, - unsigned int flags); --extern uintptr_t __RT_SVC_DESCS_START__; --extern uintptr_t __RT_SVC_DESCS_END__; -+IMPORT_SYM(uintptr_t, __RT_SVC_DESCS_START__, RT_SVC_DESCS_START); -+IMPORT_SYM(uintptr_t, __RT_SVC_DESCS_END__, RT_SVC_DESCS_END); - void init_crash_reporting(void); - - extern uint8_t rt_svc_descs_indices[MAX_RT_SVCS]; -diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h -index 4a5c3e0bc..8abc73c09 100644 ---- a/include/lib/utils_def.h -+++ b/include/lib/utils_def.h -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -99,4 +99,21 @@ - ((ARM_ARCH_MAJOR > _maj) || \ - ((ARM_ARCH_MAJOR == _maj) && (ARM_ARCH_MINOR >= _min))) - -+/* -+ * Import an assembly or linker symbol as a C expression with the specified -+ * type -+ */ -+#define IMPORT_SYM(type, sym, name) \ -+ extern char sym[];\ -+ static const __attribute__((unused)) type name = (type) sym; -+ -+/* -+ * When the symbol is used to hold a pointer, its alignment can be asserted -+ * with this macro. For example, if there is a linker symbol that is going to -+ * be used as a 64-bit pointer, the value of the linker symbol must also be -+ * aligned to 64 bit. This macro makes sure this is the case. -+ */ -+#define ASSERT_SYM_PTR_ALIGN(sym) assert(((size_t)(sym) % __alignof__(*(sym))) == 0) -+ -+ - #endif /* __UTILS_DEF_H__ */ -diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h -index a841c3dbf..84923b9a7 100644 ---- a/include/plat/common/common_def.h -+++ b/include/plat/common/common_def.h -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -74,33 +74,13 @@ - * page of it with the right memory attributes. - */ - #if SEPARATE_CODE_AND_RODATA --#define BL_CODE_BASE (unsigned long)(&__TEXT_START__) --#define BL_CODE_END (unsigned long)(&__TEXT_END__) --#define BL_RO_DATA_BASE (unsigned long)(&__RODATA_START__) --#define BL_RO_DATA_END (unsigned long)(&__RODATA_END__) - - #define BL1_CODE_END BL_CODE_END --#define BL1_RO_DATA_BASE (unsigned long)(&__RODATA_START__) -+#define BL1_RO_DATA_BASE BL_RO_DATA_BASE - #define BL1_RO_DATA_END round_up(BL1_ROM_END, PAGE_SIZE) - #else --#define BL_CODE_BASE (unsigned long)(&__RO_START__) --#define BL_CODE_END (unsigned long)(&__RO_END__) - #define BL_RO_DATA_BASE 0 - #define BL_RO_DATA_END 0 -- - #define BL1_CODE_END round_up(BL1_ROM_END, PAGE_SIZE) --#define BL1_RO_DATA_BASE 0 --#define BL1_RO_DATA_END 0 - #endif /* SEPARATE_CODE_AND_RODATA */ -- --/* -- * The next 2 constants identify the extents of the coherent memory region. -- * These addresses are used by the MMU setup code and therefore they must be -- * page-aligned. It is the responsibility of the linker script to ensure that -- * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to -- * page-aligned addresses. -- */ --#define BL_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) --#define BL_COHERENT_RAM_END (unsigned long)(&__COHERENT_RAM_END__) -- - #endif /* __COMMON_DEF_H__ */ -diff --git a/include/services/secure_partition.h b/include/services/secure_partition.h -index 93df2a137..f68f711be 100644 ---- a/include/services/secure_partition.h -+++ b/include/services/secure_partition.h -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -11,15 +11,11 @@ - #include - #include - --/* Linker symbols */ --extern uintptr_t __SP_IMAGE_XLAT_TABLES_START__; --extern uintptr_t __SP_IMAGE_XLAT_TABLES_END__; -+/* Import linker symbols */ -+IMPORT_SYM(uintptr_t, __SP_IMAGE_XLAT_TABLES_START__, SP_IMAGE_XLAT_TABLES_START); -+IMPORT_SYM(uintptr_t, __SP_IMAGE_XLAT_TABLES_END__, SP_IMAGE_XLAT_TABLES_END); - - /* Definitions */ --#define SP_IMAGE_XLAT_TABLES_START \ -- (uintptr_t)(&__SP_IMAGE_XLAT_TABLES_START__) --#define SP_IMAGE_XLAT_TABLES_END \ -- (uintptr_t)(&__SP_IMAGE_XLAT_TABLES_END__) - #define SP_IMAGE_XLAT_TABLES_SIZE \ - (SP_IMAGE_XLAT_TABLES_END - SP_IMAGE_XLAT_TABLES_START) - -diff --git a/lib/locks/bakery/bakery_lock_normal.c b/lib/locks/bakery/bakery_lock_normal.c -index 8f59215e3..37697f521 100644 ---- a/lib/locks/bakery/bakery_lock_normal.c -+++ b/lib/locks/bakery/bakery_lock_normal.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - /* - * Functions in this file implement Bakery Algorithm for mutual exclusion with the -@@ -49,8 +50,7 @@ CASSERT((PLAT_PERCPU_BAKERY_LOCK_SIZE & (CACHE_WRITEBACK_GRANULE - 1)) == 0, \ - * Use the linker defined symbol which has evaluated the size reqiurement. - * This is not as efficient as using a platform defined constant - */ --extern void *__PERCPU_BAKERY_LOCK_SIZE__; --#define PERCPU_BAKERY_LOCK_SIZE ((uintptr_t)&__PERCPU_BAKERY_LOCK_SIZE__) -+IMPORT_SYM(uintptr_t, __PERCPU_BAKERY_LOCK_SIZE__, PERCPU_BAKERY_LOCK_SIZE); - #endif - - #define get_bakery_info(cpu_ix, lock) \ -diff --git a/lib/pmf/pmf_main.c b/lib/pmf/pmf_main.c -index 2cf260ec1..0208948fe 100644 ---- a/lib/pmf/pmf_main.c -+++ b/lib/pmf/pmf_main.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -11,6 +11,7 @@ - #include - #include - #include -+#include - - /******************************************************************************* - * The 'pmf_svc_descs' array holds the PMF service descriptors exported by -@@ -21,16 +22,12 @@ - * index of the descriptor in the 'pmf_svc_descs' array which contains the - * service function pointers. - ******************************************************************************/ --extern uintptr_t __PMF_SVC_DESCS_START__; --extern uintptr_t __PMF_SVC_DESCS_END__; --#define PMF_SVC_DESCS_START ((uintptr_t)(&__PMF_SVC_DESCS_START__)) --#define PMF_SVC_DESCS_END ((uintptr_t)(&__PMF_SVC_DESCS_END__)) --extern void *__PERCPU_TIMESTAMP_SIZE__; --#define PMF_PERCPU_TIMESTAMP_SIZE ((uintptr_t)&__PERCPU_TIMESTAMP_SIZE__) --extern uintptr_t __PMF_TIMESTAMP_START__; --#define PMF_TIMESTAMP_ARRAY_START ((uintptr_t)&__PMF_TIMESTAMP_START__) --extern uintptr_t __PMF_TIMESTAMP_END__; --#define PMF_TIMESTAMP_ARRAY_END ((uintptr_t)&__PMF_TIMESTAMP_END__) -+ -+IMPORT_SYM(uintptr_t, __PMF_SVC_DESCS_START__, PMF_SVC_DESCS_START); -+IMPORT_SYM(uintptr_t, __PMF_SVC_DESCS_END__, PMF_SVC_DESCS_END); -+IMPORT_SYM(uintptr_t, __PERCPU_TIMESTAMP_SIZE__, PMF_PERCPU_TIMESTAMP_SIZE); -+IMPORT_SYM(intptr_t, __PMF_TIMESTAMP_START__, PMF_TIMESTAMP_ARRAY_START); -+IMPORT_SYM(uintptr_t, __PMF_TIMESTAMP_END__, PMF_TIMESTAMP_ARRAY_END); - - #define PMF_SVC_DESCS_MAX 10 - -diff --git a/plat/hisilicon/hikey/hikey_bl1_setup.c b/plat/hisilicon/hikey/hikey_bl1_setup.c -index 69b194a53..9ede1dbc7 100644 ---- a/plat/hisilicon/hikey/hikey_bl1_setup.c -+++ b/plat/hisilicon/hikey/hikey_bl1_setup.c -@@ -23,23 +23,6 @@ - #include "hikey_def.h" - #include "hikey_private.h" - --/* -- * Declarations of linker defined symbols which will help us find the layout -- * of trusted RAM -- */ --extern unsigned long __COHERENT_RAM_START__; --extern unsigned long __COHERENT_RAM_END__; -- --/* -- * The next 2 constants identify the extents of the coherent memory region. -- * These addresses are used by the MMU setup code and therefore they must be -- * page-aligned. It is the responsibility of the linker script to ensure that -- * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to -- * page-aligned addresses. -- */ --#define BL1_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) --#define BL1_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__) -- - /* Data structure which holds the extents of the trusted RAM for BL1 */ - static meminfo_t bl1_tzram_layout; - -@@ -103,8 +86,8 @@ void bl1_plat_arch_setup(void) - bl1_tzram_layout.total_size, - BL1_RO_BASE, - BL1_RO_LIMIT, -- BL1_COHERENT_RAM_BASE, -- BL1_COHERENT_RAM_LIMIT); -+ BL_COHERENT_RAM_BASE, -+ BL_COHERENT_RAM_END); - } - - /* -diff --git a/plat/hisilicon/hikey960/hikey960_bl1_setup.c b/plat/hisilicon/hikey960/hikey960_bl1_setup.c -index 9cadba0bb..6a07f0924 100644 ---- a/plat/hisilicon/hikey960/hikey960_bl1_setup.c -+++ b/plat/hisilicon/hikey960/hikey960_bl1_setup.c -@@ -37,18 +37,6 @@ enum { - * Declarations of linker defined symbols which will help us find the layout - * of trusted RAM - */ --extern unsigned long __COHERENT_RAM_START__; --extern unsigned long __COHERENT_RAM_END__; -- --/* -- * The next 2 constants identify the extents of the coherent memory region. -- * These addresses are used by the MMU setup code and therefore they must be -- * page-aligned. It is the responsibility of the linker script to ensure that -- * __COHERENT_RAM_START__ and __COHERENT_RAM_END__ linker symbols refer to -- * page-aligned addresses. -- */ --#define BL1_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) --#define BL1_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__) - - /* Data structure which holds the extents of the trusted RAM for BL1 */ - static meminfo_t bl1_tzram_layout; -@@ -131,8 +119,8 @@ void bl1_plat_arch_setup(void) - bl1_tzram_layout.total_size, - BL1_RO_BASE, - BL1_RO_LIMIT, -- BL1_COHERENT_RAM_BASE, -- BL1_COHERENT_RAM_LIMIT); -+ BL_COHERENT_RAM_BASE, -+ BL_COHERENT_RAM_END); - } - - static void hikey960_ufs_reset(void) -diff --git a/plat/hisilicon/poplar/bl1_plat_setup.c b/plat/hisilicon/poplar/bl1_plat_setup.c -index 39551135f..25eed5938 100644 ---- a/plat/hisilicon/poplar/bl1_plat_setup.c -+++ b/plat/hisilicon/poplar/bl1_plat_setup.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -23,13 +23,6 @@ - #include "hi3798cv200.h" - #include "plat_private.h" - --/* Symbols from link script for conherent section */ --extern unsigned long __COHERENT_RAM_START__; --extern unsigned long __COHERENT_RAM_END__; -- --#define BL1_COHERENT_RAM_BASE (unsigned long)(&__COHERENT_RAM_START__) --#define BL1_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__) -- - /* Data structure which holds the extents of the trusted RAM for BL1 */ - static meminfo_t bl1_tzram_layout; - -@@ -92,8 +85,8 @@ void bl1_plat_arch_setup(void) - bl1_tzram_layout.total_size, - BL1_RO_BASE, /* l-loader and BL1 ROM */ - BL1_RO_LIMIT, -- BL1_COHERENT_RAM_BASE, -- BL1_COHERENT_RAM_LIMIT); -+ BL_COHERENT_RAM_BASE, -+ BL_COHERENT_RAM_END); - } - - void bl1_platform_setup(void) -diff --git a/plat/mediatek/mt6795/bl31_plat_setup.c b/plat/mediatek/mt6795/bl31_plat_setup.c -index 803f1ed85..32f015721 100644 ---- a/plat/mediatek/mt6795/bl31_plat_setup.c -+++ b/plat/mediatek/mt6795/bl31_plat_setup.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -21,22 +21,21 @@ - #include - #include - #include -+#include - #include -+ - /******************************************************************************* - * Declarations of linker defined symbols which will help us find the layout - * of trusted SRAM - ******************************************************************************/ --unsigned long __RO_START__; --unsigned long __RO_END__; -- - /* - * The next 2 constants identify the extents of the code & RO data region. - * These addresses are used by the MMU setup code and therefore they must be - * page-aligned. It is the responsibility of the linker script to ensure that - * __RO_START__ and __RO_END__ linker symbols refer to page-aligned addresses. - */ --#define BL31_RO_BASE (unsigned long)(&__RO_START__) --#define BL31_RO_LIMIT (unsigned long)(&__RO_END__) -+IMPORT_SYM(unsigned long, __RO_START__, BL31_RO_BASE); -+IMPORT_SYM(unsigned long, __RO_END__, BL31_RO_LIMIT); - - /* - * Placeholder variables for copying the arguments that have been passed to -diff --git a/plat/mediatek/mt8173/bl31_plat_setup.c b/plat/mediatek/mt8173/bl31_plat_setup.c -index 7b2930771..e51bdbb9e 100644 ---- a/plat/mediatek/mt8173/bl31_plat_setup.c -+++ b/plat/mediatek/mt8173/bl31_plat_setup.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -17,24 +17,6 @@ - #include - #include - --/******************************************************************************* -- * Declarations of linker defined symbols which will help us find the layout -- * of trusted SRAM -- ******************************************************************************/ --unsigned long __RO_START__; --unsigned long __RO_END__; -- --/* -- * The next 3 constants identify the extents of the code, RO data region and the -- * limit of the BL31 image. These addresses are used by the MMU setup code and -- * therefore they must be page-aligned. It is the responsibility of the linker -- * script to ensure that __RO_START__, __RO_END__ & __BL31_END__ linker symbols -- * refer to page-aligned addresses. -- */ --#define BL31_RO_BASE (unsigned long)(&__RO_START__) --#define BL31_RO_LIMIT (unsigned long)(&__RO_END__) --#define BL31_END (unsigned long)(&__BL31_END__) -- - static entry_point_info_t bl32_ep_info; - static entry_point_info_t bl33_ep_info; - -@@ -156,10 +138,10 @@ void bl31_plat_arch_setup(void) - plat_cci_init(); - plat_cci_enable(); - -- plat_configure_mmu_el3(BL31_RO_BASE, -- BL_COHERENT_RAM_END - BL31_RO_BASE, -- BL31_RO_BASE, -- BL31_RO_LIMIT, -+ plat_configure_mmu_el3(BL_CODE_BASE, -+ BL_COHERENT_RAM_END - BL_CODE_BASE, -+ BL_CODE_BASE, -+ BL_CODE_END, - BL_COHERENT_RAM_BASE, - BL_COHERENT_RAM_END); - } -diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c -index d89ad7b94..2fe4e7dbc 100644 ---- a/plat/nvidia/tegra/common/tegra_bl31_setup.c -+++ b/plat/nvidia/tegra/common/tegra_bl31_setup.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - /* length of Trusty's input parameters (in bytes) */ - #define TRUSTY_PARAMS_LEN_BYTES (4096*2) -@@ -33,29 +34,17 @@ extern void zeromem16(void *mem, unsigned int length); - * Declarations of linker defined symbols which will help us find the layout - * of trusted SRAM - ******************************************************************************/ --extern unsigned long __TEXT_START__; --extern unsigned long __TEXT_END__; --extern unsigned long __RW_START__; --extern unsigned long __RW_END__; --extern unsigned long __RODATA_START__; --extern unsigned long __RODATA_END__; --extern unsigned long __BL31_END__; -+ -+IMPORT_SYM(unsigned long, __RW_START__, BL31_RW_START); -+IMPORT_SYM(unsigned long, __RW_END__, BL31_RW_END); -+IMPORT_SYM(unsigned long, __RODATA_START__, BL31_RODATA_BASE); -+IMPORT_SYM(unsigned long, __RODATA_END__, BL31_RODATA_END); -+IMPORT_SYM(unsigned long, __TEXT_START__, TEXT_START); -+IMPORT_SYM(unsigned long, __TEXT_END__, TEXT_END); - - extern uint64_t tegra_bl31_phys_base; - extern uint64_t tegra_console_base; - --/* -- * The next 3 constants identify the extents of the code, RO data region and the -- * limit of the BL3-1 image. These addresses are used by the MMU setup code and -- * therefore they must be page-aligned. It is the responsibility of the linker -- * script to ensure that __RO_START__, __RO_END__ & __BL31_END__ linker symbols -- * refer to page-aligned addresses. -- */ --#define BL31_RW_START (unsigned long)(&__RW_START__) --#define BL31_RW_END (unsigned long)(&__RW_END__) --#define BL31_RODATA_BASE (unsigned long)(&__RODATA_START__) --#define BL31_RODATA_END (unsigned long)(&__RODATA_END__) --#define BL31_END (unsigned long)(&__BL31_END__) - - static entry_point_info_t bl33_image_ep_info, bl32_image_ep_info; - static plat_params_from_bl2_t plat_bl31_params_from_bl2 = { -@@ -311,8 +300,8 @@ void bl31_plat_arch_setup(void) - unsigned long rw_size = BL31_RW_END - BL31_RW_START; - unsigned long rodata_start = BL31_RODATA_BASE; - unsigned long rodata_size = BL31_RODATA_END - BL31_RODATA_BASE; -- unsigned long code_base = (unsigned long)(&__TEXT_START__); -- unsigned long code_size = (unsigned long)(&__TEXT_END__) - code_base; -+ unsigned long code_base = TEXT_START; -+ unsigned long code_size = TEXT_END - TEXT_START; - const mmap_region_t *plat_mmio_map = NULL; - #if USE_COHERENT_MEM - unsigned long coh_start, coh_size; -diff --git a/plat/rockchip/common/bl31_plat_setup.c b/plat/rockchip/common/bl31_plat_setup.c -index 6199edae2..e5ee68f14 100644 ---- a/plat/rockchip/common/bl31_plat_setup.c -+++ b/plat/rockchip/common/bl31_plat_setup.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -17,21 +17,14 @@ - #include - #include - --/******************************************************************************* -- * Declarations of linker defined symbols which will help us find the layout -- * of trusted SRAM -- ******************************************************************************/ --unsigned long __RO_START__; --unsigned long __RO_END__; -- - /* - * The next 2 constants identify the extents of the code & RO data region. - * These addresses are used by the MMU setup code and therefore they must be - * page-aligned. It is the responsibility of the linker script to ensure that - * __RO_START__ and __RO_END__ linker symbols refer to page-aligned addresses. - */ --#define BL31_RO_BASE (unsigned long)(&__RO_START__) --#define BL31_RO_LIMIT (unsigned long)(&__RO_END__) -+IMPORT_SYM(unsigned long, __RO_START__, BL31_RO_BASE); -+IMPORT_SYM(unsigned long, __RO_END__, BL31_RO_LIMIT); - - static entry_point_info_t bl32_ep_info; - static entry_point_info_t bl33_ep_info; -diff --git a/services/std_svc/spm/spm_shim_private.h b/services/std_svc/spm/spm_shim_private.h -index ad953cde7..8408d1e04 100644 ---- a/services/std_svc/spm/spm_shim_private.h -+++ b/services/std_svc/spm/spm_shim_private.h -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. -+ * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -@@ -8,21 +8,17 @@ - #define __SPM_SHIM_PRIVATE__ - - #include -+#include - - /* Assembly source */ --extern uintptr_t spm_shim_exceptions_ptr; -+IMPORT_SYM(uintptr_t, spm_shim_exceptions_ptr, SPM_SHIM_EXCEPTIONS_PTR); - - /* Linker symbols */ --extern uintptr_t __SPM_SHIM_EXCEPTIONS_START__; --extern uintptr_t __SPM_SHIM_EXCEPTIONS_END__; -+IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_START__, SPM_SHIM_EXCEPTIONS_START); -+IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_END__, SPM_SHIM_EXCEPTIONS_END); - - /* Definitions */ --#define SPM_SHIM_EXCEPTIONS_PTR (uintptr_t)(&spm_shim_exceptions_ptr) - --#define SPM_SHIM_EXCEPTIONS_START \ -- (uintptr_t)(&__SPM_SHIM_EXCEPTIONS_START__) --#define SPM_SHIM_EXCEPTIONS_END \ -- (uintptr_t)(&__SPM_SHIM_EXCEPTIONS_END__) - #define SPM_SHIM_EXCEPTIONS_SIZE \ - (SPM_SHIM_EXCEPTIONS_END - SPM_SHIM_EXCEPTIONS_START) - --- -2.25.1 - diff --git a/recipes-bsp/atf/qoriq-atf-2.3.inc b/recipes-bsp/atf/qoriq-atf-2.3.inc deleted file mode 100644 index bc8b912a..00000000 --- a/recipes-bsp/atf/qoriq-atf-2.3.inc +++ /dev/null @@ -1,13 +0,0 @@ -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" - -PV = "2.3+git${SRCPV}" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1 \ - git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls \ -" -SRCREV = "4e40e24590ab908773ef842cd0e17faf233767d4" -SRCREV_mbedtls = "85da85555e5b086b0250780693c3ee584f63e79f" -SRCREV_FORMAT = "atf" - -S = "${WORKDIR}/git" diff --git a/recipes-bsp/atf/qoriq-atf-2.4.inc b/recipes-bsp/atf/qoriq-atf-2.4.inc new file mode 100644 index 00000000..28045c7c --- /dev/null +++ b/recipes-bsp/atf/qoriq-atf-2.4.inc @@ -0,0 +1,10 @@ +DESCRIPTION = "ARM Trusted Firmware" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf.git;nobranch=1" +SRCREV = "bb4957067d4b96a6ee197a333425948e409e990d" + +S = "${WORKDIR}/git" + diff --git a/recipes-bsp/atf/qoriq-atf-tools_2.3.bb b/recipes-bsp/atf/qoriq-atf-tools_2.3.bb deleted file mode 100644 index d4be32be..00000000 --- a/recipes-bsp/atf/qoriq-atf-tools_2.3.bb +++ /dev/null @@ -1,14 +0,0 @@ -require qoriq-atf-${PV}.inc - -SUMMARY = "Tools for ARM Trusted Firmware, e.g. FIP image creation tool" - -DEPENDS += "openssl" - -EXTRA_OEMAKE = "fiptool V=1 HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" - -do_install () { - install -m 0755 -d ${D}/${bindir} - install -m 0755 ${S}/tools/fiptool/fiptool ${D}/${bindir}/ -} - -BBCLASSEXTEND = "native" diff --git a/recipes-bsp/atf/qoriq-atf-tools_2.4.bb b/recipes-bsp/atf/qoriq-atf-tools_2.4.bb new file mode 100644 index 00000000..eccf12c8 --- /dev/null +++ b/recipes-bsp/atf/qoriq-atf-tools_2.4.bb @@ -0,0 +1,13 @@ +require recipes-bsp/atf/qoriq-atf-2.4.inc + +DEPENDS += "openssl" + +EXTRA_OEMAKE = "fiptool V=1 HOSTCC='${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}'" + +do_install () { + install -m 0755 -d ${D}/${bindir} + install -m 0755 ${S}/tools/fiptool/fiptool ${D}/${bindir}/ +} + +BBCLASSEXTEND = "native" + diff --git a/recipes-bsp/atf/qoriq-atf_1.5.bb b/recipes-bsp/atf/qoriq-atf_1.5.bb deleted file mode 100644 index fb686c94..00000000 --- a/recipes-bsp/atf/qoriq-atf_1.5.bb +++ /dev/null @@ -1,248 +0,0 @@ -DESCRIPTION = "ARM Trusted Firmware" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443" - -PV = "1.5+git${SRCPV}" - -inherit deploy - -DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native" -DEPENDS:append:lx2160a = " ddr-phy" -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 \ - file://0001-Clean-usage-of-void-pointers-to-access-symbols.patch \ -" -SRCREV = "5ae5233c064e94a8bd1b4a1652a03b87b0be63f6" - -COMPATIBLE_MACHINE = "(qoriq)" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -PLATFORM = "${MACHINE}" -PLATFORM:ls1088ardb-pb = "ls1088ardb" -PLATFORM_ADDITIONAL_TARGET ??= "" -PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" - -RCW_FOLDER ?= "${MACHINE}" -RCW_FOLDER: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" - -EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'" - -BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc" -OTABOOTTYPE ?= "nor qspi flexspi_nor" -BUILD_SECURE = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}" -BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}" -BUILD_FUSE = "${@bb.utils.contains('DISTRO_FEATURES', 'fuse', 'true', 'false', d)}" -BUILD_OTA = "${@bb.utils.contains('DISTRO_FEATURES', 'ota', 'true', 'false', d)}" - -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \ -" -PACKAGECONFIG[optee] = ",,optee-os-qoriq" - -uboot_boot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot" -uboot_boot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa" -rcw ?= "" -rcw:ls1012a = "_default" -rcwsec ?= "_sben" - -chassistype ?= "ls2088_1088" -chassistype:ls1012a = "ls104x_1012" -chassistype:ls1043a = "ls104x_1012" -chassistype:ls1046a = "ls104x_1012" - -ddrphyopt ?= "" -ddrphyopt:lx2160a = "fip_ddr_sec" - -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 - if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then - ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 - else - cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ${S} - cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pub ${S} - fi - - if [ "${BUILD_FUSE}" = "true" ]; then - ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_fusescr ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/input_files/gen_fusescr/${chassistype}/input_fuse_file - fuseopt="fip_fuse FUSE_PROG=1 FUSE_PROV_FILE=fuse_scr.bin" - fi - 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}" - if [ ${chassistype} = ls104x_1012 ]; then - rcwtemp="${rcwsec}" - else - rcwtemp="${rcw}" - fi - else - bl33="${uboot_boot}" - rcwtemp="${rcw}" - fi - - if [ "${BUILD_OPTEE}" = "true" ]; then - bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin" - bl32opt="BL32=${bl32}" - spdopt="SPD=opteed" - fi - - if [ "${BUILD_OTA}" = "true" ]; then - otaopt="POLICY_OTA=1" - btype="${OTABOOTTYPE}" - else - btype="${BOOTTYPE}" - fi - - if [ -f ${DEPLOY_DIR_IMAGE}/ddr-phy/ddr4_pmu_train_dmem.bin ]; then - cp ${DEPLOY_DIR_IMAGE}/ddr-phy/*.bin ${S}/ - fi - - for d in ${btype}; do - case $d in - nor) - rcwimg="${RCWNOR}${rcwtemp}.bin" - uefiboot="${UEFI_NORBOOT}" - ;; - nand) - rcwimg="${RCWNAND}${rcwtemp}.bin" - ;; - qspi) - rcwimg="${RCWQSPI}${rcwtemp}.bin" - uefiboot="${UEFI_QSPIBOOT}" - if [ "${BUILD_SECURE}" = "true" ] && [ ${MACHINE} = ls1046ardb ]; then - rcwimg="RR_FFSSPPPH_1133_5559/rcw_1600_qspiboot_sben.bin" - fi - ;; - auto) - rcwimg="${RCWAUTO}${rcwtemp}.bin" - ;; - sd) - rcwimg="${RCWSD}${rcwtemp}.bin" - ;; - emmc) - rcwimg="${RCWEMMC}${rcwtemp}.bin" - ;; - flexspi_nor) - rcwimg="${RCWXSPI}${rcwtemp}.bin" - uefiboot="${UEFI_XSPIBOOT}" - ;; - esac - - if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg}" ]; 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/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} - cp -r ${S}/build/${PLATFORM}/release/bl2_${d}*.pbl ${S} - cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S} - if [ "${BUILD_FUSE}" = "true" ]; then - cp -f ${S}/build/${PLATFORM}/release/fuse_fip.bin ${S} - fi - - if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then - oe_runmake V=1 -C ${S} realclean - oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM_ADDITIONAL_TARGET} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} - cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/bl2_qspi${secext}.pbl ${S}/bl2_${d}${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl - cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fip.bin ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin - if [ "${BUILD_FUSE}" = "true" ]; then - cp -r ${S}/build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin - fi - fi - if [ -n "${uefiboot}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${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/${RCW_FOLDER}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} ${bl32opt} ${spdopt} ${secureopt} ${fuseopt} ${otaopt} - cp -r ${S}/build/${PLATFORM}/release/fip.bin ${S}/fip_uefi.bin - fi - fi - rcwimg="" - uefiboot="" - done -} - -do_install() { - install -d ${D}/boot/atf - cp -r ${S}/srk.pri ${D}/boot/atf - cp -r ${S}/srk.pub ${D}/boot/atf - if [ "${BUILD_SECURE}" = "true" ]; then - secext="_sec" - fi - if [ -f "${S}/fip_uefi.bin" ]; then - cp -r ${S}/fip_uefi.bin ${D}/boot/atf/fip_uefi.bin - fi - if [ -f "${S}/fuse_fip.bin" ]; then - cp -r ${S}/fuse_fip.bin ${D}/boot/atf/fuse_fip.bin - fi - if [ -f "${S}/fip.bin" ]; then - cp -r ${S}/fip.bin ${D}/boot/atf/fip.bin - fi - 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 [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then - cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fip_${PLATFORM_ADDITIONAL_TARGET}.bin - cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${D}/boot/atf/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl - if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then - cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin - fi - fi - chown -R root:root ${D} - if [ -f "${S}/fip_ddr_sec.bin" ]; then - cp -r ${S}/fip_ddr_sec.bin ${D}/boot/atf/fip_ddr_sec.bin - fi -} - -do_deploy() { - install -d ${DEPLOYDIR}/atf - cp -r ${D}/boot/atf/srk.pri ${DEPLOYDIR}/atf - cp -r ${D}/boot/atf/srk.pub ${DEPLOYDIR}/atf - if [ "${BUILD_SECURE}" = "true" ]; then - secext="_sec" - fi - - if [ -f "${S}/fuse_fip.bin" ]; then - cp -r ${D}/boot/atf/fuse_fip.bin ${DEPLOYDIR}/atf/fuse_fip${secext}.bin - 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 [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then - cp -r ${S}/bl2_qspi${secext}_${PLATFORM_ADDITIONAL_TARGET}.pbl ${DEPLOYDIR}/atf/ - cp -r ${S}/fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${DEPLOYDIR}/atf/fip_uboot${secext}_${PLATFORM_ADDITIONAL_TARGET}.bin - if [ -f "${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin" ]; then - cp -r ${S}/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin ${D}/boot/atf/fuse_fip_${PLATFORM_ADDITIONAL_TARGET}${secext}.bin - fi - fi - if [ -f "${S}/fip_ddr_sec.bin" ]; then - cp -r ${D}/boot/atf/fip_ddr_sec.bin ${DEPLOYDIR}/atf/fip_ddr_sec.bin - fi -} -addtask deploy after do_install -FILES:${PN} += "/boot" -BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-bsp/atf/qoriq-atf_2.3.bb b/recipes-bsp/atf/qoriq-atf_2.3.bb deleted file mode 100644 index f2922c91..00000000 --- a/recipes-bsp/atf/qoriq-atf_2.3.bb +++ /dev/null @@ -1,175 +0,0 @@ -require qoriq-atf-${PV}.inc - -DESCRIPTION = "ARM Trusted Firmware" - -inherit deploy - -DEPENDS += "cst-native" -do_compile[depends] += "u-boot:do_deploy rcw:do_deploy ddr-phy:do_deploy" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -PLATFORM = "${MACHINE}" -MBEDTLS_FOLDER ?= "${S}/mbedtls" -RCW_FOLDER ?= "${MACHINE}" - -# 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" - -EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'" - -BOOTTYPE ?= "flexspi_nor sd emmc" -ARM_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'true', 'false', d)}" -NXP_COT = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'true', 'false', d)}" -BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}" - -PACKAGECONFIG ??= " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'optee', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'optee', '', d)} \ - ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \ -" -PACKAGECONFIG[optee] = ",,optee-os-qoriq" - -uboot_sec ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot" -uboot ?= "${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa" - -do_configure[noexec] = "1" - -do_compile() { - if [ "${NXP_COT}" = "true" -a "${ARM_COT}" = "true" ]; then - bbfatal " \ - Error!, Both ARM CoT and NXP CoT are enabled. Only one CoT is built in a yocto build, \ - Don't add nxp-cot and arm-cot into DISTRO_FEATURES:append at the same time." - fi - - if [ "${NXP_COT}" = "true" ]; then - rm -fr ${S}/nxp-cot - mkdir -p ${S}/nxp-cot - outputdir="${S}/nxp-cot" - elif [ "${ARM_COT}" = "true" ]; then - rm -fr ${S}/arm-cot - mkdir -p ${S}/arm-cot - outputdir="${S}/arm-cot" - else - outputdir="${S}" - fi - - if [ "${NXP_COT}" = "true" -o "${ARM_COT}" = "true" ]; then - if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then - ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 - else - cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ${S} - cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pub ${S} - fi - - bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin" - bl33="${uboot_sec}" - secext="_sec" - else - bl33="${uboot}" - fi - - for d in ${BOOTTYPE}; do - case $d in - sd) - rcwimg="${RCWSD}.bin" - ;; - emmc) - rcwimg="${RCWEMMC}.bin" - ;; - flexspi_nor) - rcwimg="${RCWXSPI}.bin" - ;; - esac - - if [ -f "${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg}" ]; then - oe_runmake V=1 -C ${S} realclean - if [ "${ARM_COT}" = "true" ]; then - mkdir -p ${S}/build/${PLATFORM}/release - if [ -f ${outputdir}/rot_key.pem ]; then - cp -fr ${outputdir}/*.pem ${S}/build/${PLATFORM}/release - fi - oe_runmake V=1 -C ${S} fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \ - BL33=${bl33} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} TRUSTED_BOARD_BOOT=1 \ - GENERATE_COT=1 MBEDTLS_DIR=${MBEDTLS_FOLDER} CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst - - if [ ! -f ${outputdir}/ddr_fip_sec.bin ]; then - oe_runmake V=1 -C ${S} fip_ddr PLAT=${PLATFORM} TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 \ - MBEDTLS_DIR=${MBEDTLS_FOLDER} DDR_PHY_BIN_PATH=${DEPLOY_DIR_IMAGE}/ddr-phy - cp -r ${S}/build/${PLATFORM}/release/ddr_fip_sec.bin ${outputdir} - cp -r ${S}/build/${PLATFORM}/release/*.pem ${outputdir} - fi - elif [ "${NXP_COT}" = "true" ]; then - oe_runmake V=1 -C ${S} fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \ - BL33=${bl33} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} TRUSTED_BOARD_BOOT=1 \ - CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst - - if [ ! -f ${outputdir}/ddr_fip_sec.bin ]; then - oe_runmake V=1 -C ${S} fip_ddr PLAT=${PLATFORM} TRUSTED_BOARD_BOOT=1 \ - CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst DDR_PHY_BIN_PATH=${DEPLOY_DIR_IMAGE}/ddr-phy - cp -r ${S}/build/${PLATFORM}/release/ddr_fip_sec.bin ${outputdir} - fi - elif [ "${BUILD_OPTEE}" = "true" ]; then - bl32="${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin" - oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} SPD=opteed BL32=${bl32} \ - RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} - else - oe_runmake V=1 -C ${S} all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} \ - RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${bl33} - fi - - cp -r ${S}/build/${PLATFORM}/release/bl2_${d}${secext}.pbl ${outputdir} - cp -r ${S}/build/${PLATFORM}/release/fip.bin ${outputdir} - fi - rcwimg="" - done -} - -do_install() { - install -d ${D}/boot/atf - if [ "${ARM_COT}" = "true" ]; then - outputdir="${S}/arm-cot" - secext="_sec" - elif [ "${NXP_COT}" = "true" ]; then - outputdir="${S}/nxp-cot" - secext="_sec" - else - outputdir="${S}" - fi - if [ -f "${outputdir}/fip.bin" ]; then - cp -r ${outputdir}/fip.bin ${D}/boot/atf/fip_uboot${secext}.bin - fi - if [ -f "${outputdir}/ddr_fip_sec.bin" ]; then - cp -r ${outputdir}/ddr_fip_sec.bin ${D}/boot/atf/ - fi - for d in ${BOOTTYPE}; do - if [ -e ${outputdir}/bl2_${d}${secext}.pbl ]; then - cp -r ${outputdir}/bl2_${d}${secext}.pbl ${D}/boot/atf/bl2_${d}${secext}.pbl - fi - done - chown -R root:root ${D} -} - -do_deploy() { - if [ "${ARM_COT}" = "true" ]; then - outputdir="atf:arm-cot" - elif [ "${NXP_COT}" = "true" ]; then - outputdir="atf_nxp-cot" - else - outputdir="atf" - fi - - install -d ${DEPLOYDIR}/${outputdir} - cp -fr ${D}/boot/atf/* ${DEPLOYDIR}/${outputdir}/ -} -addtask deploy after do_install -FILES:${PN} += "/boot" -COMPATIBLE_MACHINE = "(lx2160a|lx2162a)" diff --git a/recipes-bsp/atf/qoriq-atf_2.4.bb b/recipes-bsp/atf/qoriq-atf_2.4.bb new file mode 100644 index 00000000..9c8937a2 --- /dev/null +++ b/recipes-bsp/atf/qoriq-atf_2.4.bb @@ -0,0 +1,186 @@ +require recipes-bsp/atf/qoriq-atf-2.4.inc + +inherit deploy + +DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native bc-native" +DEPENDS:append:lx2160a += "ddr-phy" +DEPENDS:append:lx2162a += "ddr-phy" +do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy" + +SRC_URI += "git://github.com/ARMmbed/mbedtls;nobranch=1;destsuffix=git/mbedtls;name=mbedtls" +SRCREV_mbedtls = "0795874acdf887290b2571b193cafd3c4041a708" +SRCREV_FORMAT = "atf" + +COMPATIBLE_MACHINE = "(qoriq)" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +PLATFORM = "${MACHINE}" +PLATFORM:ls1088ardb-pb = "ls1088ardb" +PLATFORM_ADDITIONAL_TARGET ??= "" +PLATFORM_ADDITIONAL_TARGET:ls1012afrwy = "ls1012afrwy_512mb" + +RCW_FOLDER ?= "${MACHINE}" +RCW_FOLDER:ls1088ardb-pb = "ls1088ardb" +RCW_FOLDER:lx2160ardb = "lx2160ardb_rev2" + +RCW_SUFFIX ?= ".bin" +RCW_SUFFIX:ls1012a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '_default.bin', d)}" +RCW_SUFFIX:ls1043a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '.bin', d)}" +RCW_SUFFIX:ls1046a = "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sben.bin', '.bin', d)}" + +UBOOT_BINARY ?= "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa-secure-boot', '${DEPLOY_DIR_IMAGE}/u-boot.bin-tfa', d)}" + +SECURE_EXTENTION ?= "${@bb.utils.contains('DISTRO_FEATURES', 'secure', '_sec', '', d)}" + +BOOTTYPE ?= "nor nand qspi flexspi_nor sd emmc" + +chassistype ?= "ls2088_1088" +chassistype:ls1012a = "ls104x_1012" +chassistype:ls1043a = "ls104x_1012" +chassistype:ls1046a = "ls104x_1012" + +DDR_PHY_BIN_PATH ?= "" +DDR_PHY_BIN_PATH:lx2160a = "${DEPLOY_DIR_IMAGE}/ddr-phy" +DDR_PHY_BIN_PATH:lx2162a = "${DEPLOY_DIR_IMAGE}/ddr-phy" + +# 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" + +EXTRA_OEMAKE += "HOSTCC='${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}'" +EXTRA_OEMAKE += "\ + ${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'BL32=${RECIPE_SYSROOT}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin SPD=opteed', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'secure', 'TRUSTED_BOARD_BOOT=1 CST_DIR=${RECIPE_SYSROOT_NATIVE}/usr/bin/cst', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'arm-cot', 'GENERATE_COT=1 MBEDTLS_DIR=${S}/mbedtls', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'fuse', 'fip_fuse FUSE_PROG=1 FUSE_PROV_FILE=fuse_scr.bin', '', d)} \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('COMBINED_FEATURES', 'optee', d)} \ +" +PACKAGECONFIG[optee] = ",,optee-os-qoriq" + +python() { + if bb.utils.contains("DISTRO_FEATURES", "arm-cot", True, False, d): + if not bb.utils.contains("DISTRO_FEATURES", "secure", True, False, d): + bb.fatal("arm-cot needs 'secure' being set in DISTRO_FEATURES") +} + +do_configure[noexec] = "1" + +do_compile() { + if [ ! -f ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri ]; then + ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_keys 1024 + else + cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pri . + cp ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/srk.pub . + fi + + ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/gen_fusescr \ + ${RECIPE_SYSROOT_NATIVE}/usr/bin/cst/input_files/gen_fusescr/${chassistype}/input_fuse_file + + for d in ${BOOTTYPE}; do + case $d in + nor) + rcwimg="${RCWNOR}${RCW_SUFFIX}" + uefiboot="${UEFI_NORBOOT}" + ;; + nand) + rcwimg="${RCWNAND}${RCW_SUFFIX}" + ;; + qspi) + rcwimg="${RCWQSPI}${RCW_SUFFIX}" + uefiboot="${UEFI_QSPIBOOT}" + if [ -n "${SECURE_EXTENTION}" ] && [ "${MACHINE}" = ls1046ardb ]; then + rcwimg="RR_FFSSPPPH_1133_5559/rcw_1600_qspiboot_sben.bin" + fi + ;; + auto) + rcwimg="${RCWAUTO}${RCW_SUFFIX}" + ;; + sd) + rcwimg="${RCWSD}${RCW_SUFFIX}" + ;; + emmc) + rcwimg="${RCWEMMC}${RCW_SUFFIX}" + ;; + flexspi_nor) + rcwimg="${RCWXSPI}${RCW_SUFFIX}" + uefiboot="${UEFI_XSPIBOOT}" + ;; + esac + + if [ -f ${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/$rcwimg ]; then + make V=1 realclean + if [ -f rot_key.pem ];then + mkdir -p build/${PLATFORM}/release/ + cp *.pem build/${PLATFORM}/release/ + fi + + oe_runmake V=1 all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${UBOOT_BINARY} + cp build/${PLATFORM}/release/bl2_${d}${SECURE_EXTENTION}.pbl . + cp build/${PLATFORM}/release/fip.bin fip_uboot${SECURE_EXTENTION}.bin + if [ -e build/${PLATFORM}/release/fuse_fip.bin ]; then + cp build/${PLATFORM}/release/fuse_fip.bin . + fi + + if [ -n "${SECURE_EXTENTION}" -a -n "${DDR_PHY_BIN_PATH}" -a ! -f ddr_fip_sec.bin ]; then + oe_runmake V=1 fip_ddr PLAT=${PLATFORM} DDR_PHY_BIN_PATH=${DDR_PHY_BIN_PATH} + if [ -e build/${PLATFORM}/release/ddr_fip_sec.bin ]; then + cp build/${PLATFORM}/release/ddr_fip_sec.bin . + fi + fi + + if [ -e build/${PLATFORM}/release/rot_key.pem ] && [ ! -f rot_key.pem ]; then + cp build/${PLATFORM}/release/*.pem . + fi + + if [ -n "${PLATFORM_ADDITIONAL_TARGET}" ]; then + make V=1 realclean + oe_runmake V=1 all fip pbl PLAT=${PLATFORM_ADDITIONAL_TARGET} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${UBOOT_BINARY} + cp build/${PLATFORM_ADDITIONAL_TARGET}/release/bl2_${d}${SECURE_EXTENTION}.pbl bl2_${d}${SECURE_EXTENTION}_${PLATFORM_ADDITIONAL_TARGET}.pbl + cp build/${PLATFORM_ADDITIONAL_TARGET}/release/fip.bin fip_uboot${SECURE_EXTENTION}_${PLATFORM_ADDITIONAL_TARGET}.bin + if [ -e build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin ]; then + cp build/${PLATFORM_ADDITIONAL_TARGET}/release/fuse_fip.bin fuse_fip_${PLATFORM_ADDITIONAL_TARGET}.bin + fi + fi + + if [ -z "${SECURE_EXTENTION}" -a -f "${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot}" ]; then + make V=1 realclean + oe_runmake V=1 all fip pbl PLAT=${PLATFORM} BOOT_MODE=${d} RCW=${DEPLOY_DIR_IMAGE}/rcw/${RCW_FOLDER}/${rcwimg} BL33=${DEPLOY_DIR_IMAGE}/uefi/${PLATFORM}/${uefiboot} + cp build/${PLATFORM}/release/fip.bin fip_uefi.bin + fi + fi + rcwimg="" + uefiboot="" + done +} + +do_install() { + install -d ${D}/boot/atf/ + cp srk.pri ${D}/boot/atf/ + cp srk.pub ${D}/boot/atf/ + cp *.pbl ${D}/boot/atf/ + if [ ! -e fuse_fip.bin ]; then + rm -f fuse_scr.bin + fi + cp *.bin ${D}/boot/atf/ + chown -R root:root ${D} +} + +do_deploy() { + install -d ${DEPLOYDIR}/atf/ + cp ${D}/boot/atf/* ${DEPLOYDIR}/atf/ +} +addtask deploy after do_install + +FILES:${PN} += "/boot" +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf From a17caf57cc1845f4ebfea825f2803dd9cbb50948 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:03:50 +0800 Subject: optee-qoriq: upgrade to 3.13 Signed-off-by: Ting Liu --- .../optee/optee-client-qoriq_3.13.0.bb | 5 ++ recipes-security/optee/optee-client-qoriq_3.8.0.bb | 28 -------- recipes-security/optee/optee-client.nxp.inc | 53 ++++++++++++++ .../optee/optee-client/tee-supplicant.service | 11 +++ ...1-allow-setting-sysroot-for-libgcc-lookup.patch | 13 ---- ...64-Disable-outline-atomics-when-compiling.patch | 41 ----------- recipes-security/optee/optee-os-qoriq_3.13.0.bb | 28 ++++++++ recipes-security/optee/optee-os-qoriq_3.8.0.bb | 83 ---------------------- recipes-security/optee/optee-os.nxp.inc | 76 ++++++++++++++++++++ recipes-security/optee/optee-test-qoriq_3.13.0.bb | 13 ++++ recipes-security/optee/optee-test-qoriq_3.8.0.bb | 47 ------------ recipes-security/optee/optee-test.nxp.inc | 61 ++++++++++++++++ 12 files changed, 247 insertions(+), 212 deletions(-) create mode 100644 recipes-security/optee/optee-client-qoriq_3.13.0.bb delete mode 100644 recipes-security/optee/optee-client-qoriq_3.8.0.bb create mode 100644 recipes-security/optee/optee-client.nxp.inc create mode 100644 recipes-security/optee/optee-client/tee-supplicant.service delete mode 100644 recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch delete mode 100644 recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch create mode 100644 recipes-security/optee/optee-os-qoriq_3.13.0.bb delete mode 100644 recipes-security/optee/optee-os-qoriq_3.8.0.bb create mode 100644 recipes-security/optee/optee-os.nxp.inc create mode 100644 recipes-security/optee/optee-test-qoriq_3.13.0.bb delete mode 100644 recipes-security/optee/optee-test-qoriq_3.8.0.bb create mode 100644 recipes-security/optee/optee-test.nxp.inc diff --git a/recipes-security/optee/optee-client-qoriq_3.13.0.bb b/recipes-security/optee/optee-client-qoriq_3.13.0.bb new file mode 100644 index 00000000..94123e43 --- /dev/null +++ b/recipes-security/optee/optee-client-qoriq_3.13.0.bb @@ -0,0 +1,5 @@ +require optee-client.nxp.inc + +PV:append = "+git${SRCPV}" + +COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-security/optee/optee-client-qoriq_3.8.0.bb b/recipes-security/optee/optee-client-qoriq_3.8.0.bb deleted file mode 100644 index 0cd9eeab..00000000 --- a/recipes-security/optee/optee-client-qoriq_3.8.0.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "OPTEE Client" -HOMEPAGE = "https://github.com/OP-TEE/optee_client" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b" - -inherit python3native systemd - -SRC_URI = "git://github.com/OP-TEE/optee_client;nobranch=1" -SRCREV = "be4fa2e36f717f03ca46e574aa66f697a897d090" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = "ARCH=arm64" - -do_install() { - oe_runmake install - - install -D -p -m0755 ${S}/out/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant - install -D -p -m0755 ${S}/out/export/usr/lib/libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0.0 - ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0 - ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1 - ln -sf libteec.so.1 ${D}${libdir}/libteec.so - - cp -a ${S}/out/export/usr/include ${D}/usr/ -} - -COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-security/optee/optee-client.nxp.inc b/recipes-security/optee/optee-client.nxp.inc new file mode 100644 index 00000000..de2ba8ae --- /dev/null +++ b/recipes-security/optee/optee-client.nxp.inc @@ -0,0 +1,53 @@ +# Copyright 2020-2021 NXP + +SUMMARY = "OPTEE Client libs" +HOMEPAGE = "http://www.optee.org/" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" + +inherit python3native systemd + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_client.git;nobranch=1" +SRCREV = "7c9c423d00e96bf51debd5fe10fd70dce83be5cc" + +FILESEXTRAPATHS:prepend := "${THISDIR}/optee-client:" +SRC_URI += "file://tee-supplicant.service" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" + +OPTEE_ARCH ?= "arm32" +OPTEE_ARCH_armv7a = "arm32" +OPTEE_ARCH:aarch64 = "arm64" + +EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} O=${B}" + +do_install () { + oe_runmake -C ${S} install + + install -d ${D}${libdir}/ + install -p -m0644 ${B}/export${libdir}/libteec.so.1.0.0 ${D}${libdir}/ + ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0 + ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1 + ln -sf libteec.so.1 ${D}${libdir}/libteec.so + + install -D -p -m0644 ${B}/export/usr/lib/libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1.0 + ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1 + ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0 + ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so + + install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant + + cp -a ${B}/export/usr/include ${D}${includedir} + + install -d ${D}${systemd_system_unitdir}/ + install -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/ + sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${D}${systemd_system_unitdir}/tee-supplicant.service +} + +SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" + +FILES:${PN} += "${libdir}/* ${includedir}/*" + +INSANE_SKIP:${PN} = "ldflags dev-elf" +INSANE_SKIP:${PN}-dev = "ldflags dev-elf" diff --git a/recipes-security/optee/optee-client/tee-supplicant.service b/recipes-security/optee/optee-client/tee-supplicant.service new file mode 100644 index 00000000..0e2b4f6b --- /dev/null +++ b/recipes-security/optee/optee-client/tee-supplicant.service @@ -0,0 +1,11 @@ +[Unit] +Description=TEE Supplicant + +[Service] +User=root +EnvironmentFile=-/etc/default/tee-supplicant +ExecStart=/usr/bin/tee-supplicant $OPTARGS + +[Install] +WantedBy=basic.target + diff --git a/recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch b/recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch deleted file mode 100644 index 17127d0b..00000000 --- a/recipes-security/optee/optee-os-qoriq/0001-allow-setting-sysroot-for-libgcc-lookup.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/mk/gcc.mk b/mk/gcc.mk -index fc38c4d..77b8d74 100644 ---- a/mk/gcc.mk -+++ b/mk/gcc.mk -@@ -12,7 +12,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ - -print-file-name=include 2> /dev/null) - - # Get location of libgcc from gcc --libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ -+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ - -print-libgcc-file-name 2> /dev/null) - - # Define these to something to discover accidental use diff --git a/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch b/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch deleted file mode 100644 index 086d4333..00000000 --- a/recipes-security/optee/optee-os-qoriq/0001-arm64-Disable-outline-atomics-when-compiling.patch +++ /dev/null @@ -1,41 +0,0 @@ -From f94d9558d9eae48e92ce8d651539b6cf69eb4394 Mon Sep 17 00:00:00 2001 -From: Joshua Watt -Date: Mon, 18 May 2020 20:00:00 -0500 -Subject: [PATCH] arm64: Disable outline-atomics when compiling - -Disables the automatic detection of LSE (Large System Extension) -instructions when compiling AArch64 code. GCC 10 implements this -detection in libgcc using __getauxval(), which optee doesn't implement. -This requires that the proper -mcpu is passed to GCC so that the code -can be correctly compiled to use either LSE or load-store-exclusive. - -Fixes linker errors like the following when compiling with GCC 10: - - aarch64-linux-ld.bfd: libgcc.a(lse-init.o): - in function `init_have_lse_atomics': - lse-init.c:44: undefined reference to `__getauxval' - core/arch/arm/kernel/link.mk:38: - recipe for target 'build/core/all_objs.o' failed - -Signed-off-by: Joshua Watt -Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/3874] ---- - core/arch/arm/arm.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk -index a18eda3b..07069c66 100644 ---- a/core/arch/arm/arm.mk -+++ b/core/arch/arm/arm.mk -@@ -115,7 +115,7 @@ arm32-platform-aflags-no-hard-float ?= - - arm64-platform-cflags-no-hard-float ?= -mgeneral-regs-only - arm64-platform-cflags-hard-float ?= --arm64-platform-cflags-generic ?= -mstrict-align -+arm64-platform-cflags-generic ?= -mstrict-align $(call cc-option,-mno-outline-atomics,) - - ifeq ($(DEBUG),1) - # For backwards compatibility --- -2.17.1 - diff --git a/recipes-security/optee/optee-os-qoriq_3.13.0.bb b/recipes-security/optee/optee-os-qoriq_3.13.0.bb new file mode 100644 index 00000000..3c3652d3 --- /dev/null +++ b/recipes-security/optee/optee-os-qoriq_3.13.0.bb @@ -0,0 +1,28 @@ +require optee-os.nxp.inc + +PV:append = "+git${SRCPV}" + +PLATFORM_FLAVOR:ls1088ardb-pb = "ls1088ardb" +PLATFORM_FLAVOR:ls1046afrwy = "ls1046ardb" +PLATFORM_FLAVOR:lx2162aqds = "lx2160aqds" + +EXTRA_OEMAKE += " \ + PLATFORM=ls \ + CFG_ARM64_core=y \ +" + +do_compile:append:ls1012afrwy() { + mv ${B}/core/tee-raw.bin ${B}/core/tee_512mb.bin + oe_runmake CFG_DRAM0_SIZE=0x40000000 all +} + +do_install:append:qoriq() { + install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin +} + +do_install:append:ls1012afrwy() { + install -m 644 ${B}/core/tee_512mb.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}_512mb.bin +} + +INHIBIT_PACKAGE_STRIP = "1" +COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-security/optee/optee-os-qoriq_3.8.0.bb b/recipes-security/optee/optee-os-qoriq_3.8.0.bb deleted file mode 100644 index f5d6d620..00000000 --- a/recipes-security/optee/optee-os-qoriq_3.8.0.bb +++ /dev/null @@ -1,83 +0,0 @@ -SUMMARY = "OP-TEE Trusted OS" -DESCRIPTION = "OPTEE OS" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" - -PV = "3.8+git${SRCPV}" - -DEPENDS += "python3-pyelftools-native python3-pycryptodome-native python3-pycryptodomex-native dtc-native" - -inherit deploy python3native - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os;nobranch=1 \ - file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \ - file://0001-arm64-Disable-outline-atomics-when-compiling.patch \ - " -SRCREV = "0cb01f7f6aee552ead49990c06f69f73f459cc65" - -S = "${WORKDIR}/git" - -OPTEEMACHINE ?= "${MACHINE}" -OPTEEMACHINE:ls1088ardb-pb = "ls1088ardb" -OPTEEMACHINE:ls1046afrwy = "ls1046ardb" -OPTEEMACHINE:lx2162aqds = "lx2160aqds" - -EXTRA_OEMAKE = "PLATFORM=ls-${OPTEEMACHINE} CFG_ARM64_core=y \ - ARCH=arm \ - CROSS_COMPILE_core=${HOST_PREFIX} \ - CROSS_COMPILE_ta_arm64=${HOST_PREFIX} \ - NOWERROR=1 \ - LDFLAGS= \ - LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \ - " -EXTRA_OEMAKE:append:lx2162aqds = " CFG_EMBED_DTB_SOURCE_FILE=fsl-lx2160a-qds.dts CFG_EMBED_DT=y" - -OPTEE_ARCH:armv7a = "arm32" -OPTEE_ARCH:aarch64 = "arm64" - -do_compile() { - unset LDFLAGS - oe_runmake all CFG_TEE_TA_LOG_LEVEL=0 - ${OBJCOPY} -v -O binary ${B}/out/arm-plat-ls/core/tee.elf ${B}/out/arm-plat-ls/core/tee.bin - - if [ ${MACHINE} = ls1012afrwy ]; then - mv ${B}/out/arm-plat-ls/core/tee.bin ${B}/out/arm-plat-ls/core/tee_512mb.bin - oe_runmake CFG_DRAM0_SIZE=0x40000000 all CFG_TEE_TA_LOG_LEVEL=0 - ${OBJCOPY} -v -O binary ${B}/out/arm-plat-ls/core/tee.elf ${B}/out/arm-plat-ls/core/tee.bin - fi -} - -do_install() { - #install core on boot directory - install -d ${D}/lib/firmware/ - if [ ${MACHINE} = ls1012afrwy ]; then - install -m 644 ${B}/out/arm-plat-ls/core/tee_512mb.bin ${D}/lib/firmware/tee_${MACHINE}_512mb.bin - fi - install -m 644 ${B}/out/arm-plat-ls/core/tee.bin ${D}/lib/firmware/tee_${MACHINE}.bin - #install TA devkit - install -d ${D}/usr/include/optee/export-user_ta/ - - for f in ${B}/out/arm-plat-ls/export-ta_${OPTEE_ARCH}/* ; do - cp -aR $f ${D}/usr/include/optee/export-user_ta/ - done -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -do_deploy() { - install -d ${DEPLOYDIR}/optee - for f in ${D}/lib/firmware/*; do - cp $f ${DEPLOYDIR}/optee/ - done -} - -addtask deploy before do_build after do_install - -FILES:${PN} = "/lib/firmware/" -FILES:${PN}-dev = "/usr/include/optee" - -INSANE_SKIP:${PN}-dev = "staticdev" - -INHIBIT_PACKAGE_STRIP = "1" -COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-security/optee/optee-os.nxp.inc b/recipes-security/optee/optee-os.nxp.inc new file mode 100644 index 00000000..f376b3ce --- /dev/null +++ b/recipes-security/optee/optee-os.nxp.inc @@ -0,0 +1,76 @@ +# Copyright 2020-2021 NXP + +SUMMARY = "OPTEE OS" +DESCRIPTION = "OPTEE OS" +HOMEPAGE = "http://www.optee.org/" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" + +inherit deploy python3native autotools +DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native" + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os.git;nobranch=1" +SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" + +PLATFORM_FLAVOR ?= "${MACHINE}" + +OPTEE_ARCH ?= "arm64" +OPTEE_ARCH_armv7a = "arm32" +OPTEE_ARCH:aarch64 = "arm64" + +OPTEE_CORE_LOG_LEVEL ?= "1" +OPTEE_TA_LOG_LEVEL ?= "0" + +# Optee-os can be built for 32 bits and 64 bits at the same time +# as long as the compilers are correctly defined. +# For 64bits, CROSS_COMPILE64 must be set +# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that +# any 32 or 64 bits builds will pass +EXTRA_OEMAKE = " \ + -C ${S} O=${B} \ + PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \ + CROSS_COMPILE=${HOST_PREFIX} \ + CROSS_COMPILE64=${HOST_PREFIX} \ + CFG_WERROR=y \ + CFG_TEE_CORE_LOG_LEVEL=${OPTEE_CORE_LOG_LEVEL} \ + CFG_TEE_TA_LOG_LEVEL=${OPTEE_TA_LOG_LEVEL} \ +" + +do_compile() { + unset LDFLAGS + export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" + oe_runmake all +} + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ + install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ + + # Install the TA devkit + install -d ${D}${includedir}/optee/export-user_ta/ + + for f in ${B}/export-ta_${OPTEE_ARCH}/*; do + cp -aR $f ${D}${includedir}/optee/export-user_ta/ + done + + install -d ${D}${nonarch_base_libdir}/optee_armtz + find ${B}/export-ta_${OPTEE_ARCH}/ta -name '*.ta' | while read name; do + install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ + done +} + +do_deploy() { + install -d ${DEPLOYDIR}/optee + install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ +} +addtask deploy before do_build after do_install + +FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" +FILES:${PN}-staticdev = "/usr/include/optee/" +RDEPENDS:${PN}-dev += "${PN}-staticdev" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/recipes-security/optee/optee-test-qoriq_3.13.0.bb b/recipes-security/optee/optee-test-qoriq_3.13.0.bb new file mode 100644 index 00000000..69ef73d3 --- /dev/null +++ b/recipes-security/optee/optee-test-qoriq_3.13.0.bb @@ -0,0 +1,13 @@ +require optee-test.nxp.inc + +PV:append = "+git${SRCPV}" + +DEPENDS += "optee-client-qoriq optee-os-qoriq" + +TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" + +EXTRA_OEMAKE += " \ + TEEC_EXPORT=${TEEC_EXPORT} \ +" + +COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-security/optee/optee-test-qoriq_3.8.0.bb b/recipes-security/optee/optee-test-qoriq_3.8.0.bb deleted file mode 100644 index 52cb1bbf..00000000 --- a/recipes-security/optee/optee-test-qoriq_3.8.0.bb +++ /dev/null @@ -1,47 +0,0 @@ -SUMMARY = "OP-TEE sanity testsuite" -HOMEPAGE = "https://github.com/OP-TEE/optee_test" - -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" - -DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycryptodome-native python3-pycryptodomex-native" - -inherit python3native - -SRC_URI = "git://github.com/OP-TEE/optee_test;nobranch=1" -SRCREV = "30481e381cb4285706e7516853495a7699c93b2c" - -S = "${WORKDIR}/git" - -OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}" -TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" -TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" - -EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ - OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ - CFG_ARM64=y \ - CROSS_COMPILE_HOST=${TARGET_PREFIX} \ - CROSS_COMPILE_TA=${TARGET_PREFIX} \ - V=1 \ - " - -do_compile() { - # Top level makefile doesn't seem to handle parallel make gracefully - oe_runmake xtest - oe_runmake ta -} - -do_install () { - install -D -p -m0755 ${S}/out/xtest/xtest ${D}${bindir}/xtest - - # install path should match the value set in optee-client/tee-supplicant - # default TEEC_LOAD_PATH is /lib - mkdir -p ${D}/lib/optee_armtz/ - install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}/lib/optee_armtz/ -} - -FILES:${PN} += "/lib/optee_armtz/" - -# Imports machine specific configs from staging to build -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-security/optee/optee-test.nxp.inc b/recipes-security/optee/optee-test.nxp.inc new file mode 100644 index 00000000..868776c5 --- /dev/null +++ b/recipes-security/optee/optee-test.nxp.inc @@ -0,0 +1,61 @@ +# Copyright 2020-2021 NXP + +SUMMARY = "OPTEE test" +HOMEPAGE = "http://www.optee.org/" + +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" + +DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native openssl" +inherit python3native cmake + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test.git;nobranch=1" +SRCREV = "69722dab8c1f2683e30e0ee3b536053367e37aad" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" + +TA_DEV_KIT_DIR ?= "${STAGING_INCDIR}/optee/export-user_ta" +OPTEE_CLIENT_EXPORT ?= "${STAGING_DIR_HOST}${prefix}" + +EXTRA_OEMAKE = " \ + TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ + OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ + CROSS_COMPILE_HOST=${HOST_PREFIX} \ + CROSS_COMPILE_TA=${HOST_PREFIX} \ + OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \ + -C ${S} O=${B} \ +" + +EXTRA_OECMAKE = " \ + -DOPTEE_TEST_SDK=${TA_DEV_KIT_DIR} \ +" + +do_compile() { + export CXXFLAGS="${CXXFLAGS} --sysroot=${STAGING_DIR_HOST}" + oe_runmake xtest + oe_runmake ta + oe_runmake test_plugin +} + +do_install() { + install -d ${D}${bindir}/ + install ${B}/xtest/xtest ${D}${bindir}/ + + install -d ${D}${nonarch_base_libdir}/optee_armtz + find ${B}/ta -name '*.ta' | while read name; do + install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ + done + + install -d ${D}${libdir}/tee-supplicant/plugins/ + find ${B}/supp_plugin -name '*.plugin' | while read name; do + install -m 755 $name ${D}${libdir}/tee-supplicant/plugins/ + done +} + +FILES:${PN} += "${nonarch_base_libdir} ${libdir}/tee-supplicant/plugins/" + +DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" +FULL_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" + +PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3-54-g00ecf From 7193f2f28e8352123d2c6b168cdbb14b4c14d973 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:07:23 +0800 Subject: mc-utils: update to 12ffee8 New commit: 12ffee8 Add APIs for MC 10.29.0 fa23626 la1575a: renamed RDB directory 32176a5 ls2085a: removed SoC f504342 ls2081a: removed SoC b84bcfd ls2080a: removed SoC 47d687f ls2088a: renamed QDS and RDB directories c827cc4 ls1088a: renamed QDS and RDB directories f6edc53 lx2162a: moved QDS SoC to lx2162a top directory 97745ca lx2160a: added Blueblox3 36f2989 lx2160a: added LA1224-RDB files 7420bce lx2160a: renamed QDS and RDB directories 2576901 config: lx2162aqds: add DPC file for SERDES protocol 3_3 8dda231 config: lx2162aqds: use USXGMII ports as TYPE_FIXED 4f762b5 Add APIs for MC 10.28.0 315dafa Add APIs for MC 10.27.0 287192c Add APIs for MC 10.26.0 b7934bb Add APIs for MC 10.25.0 folder structure has updated, update build steps accordingly. Signed-off-by: Ting Liu --- recipes-bsp/mc-utils/mc-utils_git.bb | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/recipes-bsp/mc-utils/mc-utils_git.bb b/recipes-bsp/mc-utils/mc-utils_git.bb index b725af7f..97bbd7e7 100644 --- a/recipes-bsp/mc-utils/mc-utils_git.bb +++ b/recipes-bsp/mc-utils/mc-utils_git.bb @@ -1,16 +1,14 @@ DESCRIPTION = "The Management Complex (MC) is a key component of DPAA" SECTION = "mc-utils" LICENSE = "BSD" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987 \ -" +LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987" DEPENDS += "dtc-native" inherit deploy SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils;nobranch=1" -SRCREV = "8e0b863693fc2ccbc62a62c79b4e3db6da88c16e" +SRCREV = "12ffee82d210cb6b5c8fa30fbc6f5d29e4be2e6f" S = "${WORKDIR}/git" @@ -18,10 +16,10 @@ MC_CFG ?= "" MC_CFG:ls1088a = "ls1088a" MC_CFG:ls2088a = "ls2088a" MC_CFG:lx2160a = "lx2160a" -MC_CFG:lx2162aqds = "lx2162aqds" +MC_CFG:lx2162a = "lx2162a" -MC_FLAVOUR ?= "RDB" -MC_FLAVOUR:lx2162a = "" +MC_FLAVOUR ?= "${@oe.utils.ifelse(d.getVar('MACHINE').endswith('qds'), 'QDS', 'RDB')}" +MC_FOLDER ?= "${@d.getVar('MC_CFG').upper() + '-' + d.getVar('MC_FLAVOUR')}" do_compile () { oe_runmake -C config @@ -29,23 +27,19 @@ do_compile () { do_install () { install -d ${D}/boot/mc-utils - cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/*.dtb ${D}/boot/mc-utils - if [ -d ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/ ]; then - install -d ${D}/boot/mc-utils/custom - cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/*.dtb ${D}/boot/mc-utils/custom + if [ -e ${S}/config/${MC_CFG}/${MC_FOLDER} ]; then + cp -r ${S}/config/${MC_CFG}/${MC_FOLDER}/* ${D}/boot/mc-utils/ fi + find ${D}/boot/mc-utils/ ! -name "*.dtb" ! -type d -exec rm {} \; } do_deploy () { install -d ${DEPLOYDIR}/mc-utils - cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/*.dtb ${DEPLOYDIR}/mc-utils - if [ -d ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/ ]; then - install -d ${DEPLOYDIR}/mc-utils/custom - cp -r ${S}/config/${MC_CFG}/${MC_FLAVOUR}/custom/*.dtb ${DEPLOYDIR}/mc-utils/custom - fi + cp -r ${D}/boot/mc-utils/* ${DEPLOYDIR}/mc-utils/ } addtask deploy after do_install PACKAGES += "${PN}-image" FILES:${PN}-image += "/boot" +PACKAGE_ARCH = "${MACHINE_ARCH}" COMPATIBLE_MACHINE = "(qoriq-arm64)" -- cgit v1.2.3-54-g00ecf From 8e9fa4f83f5ba32821f7c1fb4d952f7c61d1cf82 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:11:33 +0800 Subject: uefi: update to 1b28cad New commits: 1b28cad Platform: NXP: Add function to retrieve board revision 84bafbb build image with final LSDK-21.08 tag a26a4ae Update copyright for set_firmware_ver.sh 958ff19 Fix firmware version information invalid in boot log 61c6380 Fix for ACPI BIOS Errors 9eddad6 lx2: acpi: add compatible string for usxgmii 6574766 lf-5.10.35-2.0.0-rc1: update binaries Signed-off-by: Ting Liu --- recipes-bsp/uefi/uefi_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/uefi/uefi_git.bb b/recipes-bsp/uefi/uefi_git.bb index df77b420..6174e258 100644 --- a/recipes-bsp/uefi/uefi_git.bb +++ b/recipes-bsp/uefi/uefi_git.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://NXP-Binary-EULA;md5=343ec8f06efc37467a6de53686fa6315" inherit deploy SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1" -SRCREV= "06e960829ba204f35979440364b9ac7e51ed996b" +SRCREV= "1b28cad962a3f7b61baae2229cb3b84926941cfa" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From daed466ffcd165241a0060414306296a78e95879 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:15:35 +0800 Subject: tsntool: update to b767c26 New commits: b767c26 Pull request #27: tsntool: fix string copy overflow e29cb64 tsntool: fix string copy overflow 9a22d5e Pull request #26: tsntool: fix portname overflow 7fc9d6c tsntool: fix portname overflow 7f18d70 Pull request #25: cnc: change GROUP_NAME to real-time-edge 2e04fd4 cnc: change GROUP_NAME to real-time-edge c21d3d3 Pull request #24: cnc: fix isChecked undefined when using Firefox/IE/EDGE 1db711b cnc: fix isChecked undefined when using Firefox/IE/EDGE Signed-off-by: Ting Liu --- recipes-extended/tsntool/tsntool_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-extended/tsntool/tsntool_git.bb b/recipes-extended/tsntool/tsntool_git.bb index f4f10938..f1ddbec8 100644 --- a/recipes-extended/tsntool/tsntool_git.bb +++ b/recipes-extended/tsntool/tsntool_git.bb @@ -8,7 +8,7 @@ DEPENDS = "cjson libnl readline" inherit pkgconfig SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1" -SRCREV = "3111f7f79e7d1b1a5e60f37fe76785559b2d0360" +SRCREV = "b767c260b851aac94828ed26c6a9a327e4e98334" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From dc6ada8f9515e92bfdc7e5e2c18ccef87b6e80f8 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:19:30 +0800 Subject: secure-obj: update to 5ff1231 New commits: 5ff1231 securekeydev: install securekeydev.ko e3f9432 fota_secboot: fix compilation warnings 6e0b018 LF-3046: Fix for certificate generation failure 8bd117e LF-3045: Fix for signature generation failure Signed-off-by: Ting Liu --- recipes-extended/secure-obj/secure-obj.inc | 5 ++--- recipes-extended/secure-obj/secure-obj_git.bb | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-extended/secure-obj/secure-obj.inc b/recipes-extended/secure-obj/secure-obj.inc index 55f20ed5..2d26a7e9 100644 --- a/recipes-extended/secure-obj/secure-obj.inc +++ b/recipes-extended/secure-obj/secure-obj.inc @@ -10,9 +10,8 @@ inherit python3native LDFLAGS += "${TOOLCHAIN_OPTIONS}" -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1 \ -" -SRCREV = "71a6eb33b58a8578a60995da3896f8f2d638c916" +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1" +SRCREV = "5ff1231f74b4b01744be95a3137a14ad0a483e61" WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}" export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/" diff --git a/recipes-extended/secure-obj/secure-obj_git.bb b/recipes-extended/secure-obj/secure-obj_git.bb index 1fd1fea3..84ecea1e 100644 --- a/recipes-extended/secure-obj/secure-obj_git.bb +++ b/recipes-extended/secure-obj/secure-obj_git.bb @@ -13,6 +13,7 @@ export CROSS_COMPILE_HOST = "${CROSS_COMPILE}" export CROSS_COMPILE_TA = "${CROSS_COMPILE}" ARCH:qoriq-arm64 = "aarch64" ARCH:qoriq-arm = "arm" +CFLAGS += "${TOOLCHAIN_OPTIONS}" do_compile() { unset LDFLAGS -- cgit v1.2.3-54-g00ecf From 08ede515232af9922dc4dc03828dbb9fd99dd310 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:33:00 +0800 Subject: dpdk: add 20.11 recipe Signed-off-by: Ting Liu --- recipes-extended/dpdk/dpdk-20.11.inc | 15 ++++ .../dpdk-20.11/0001-Makefile-add-makefile.patch | 74 +++++++++++++++++ ...-enetfec-enet_uio.c-fix-multiple-definiti.patch | 30 +++++++ ...eson-Fix-finding-librt-using-find_library.patch | 35 ++++++++ ...ld-march-and-mcpu-already-passed-by-Yocto.patch | 38 +++++++++ recipes-extended/dpdk/dpdk-module_20.11.bb | 41 ++++++++++ recipes-extended/dpdk/dpdk_20.11.bb | 93 ++++++++++++++++++++++ 7 files changed, 326 insertions(+) create mode 100644 recipes-extended/dpdk/dpdk-20.11.inc create mode 100644 recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch create mode 100644 recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch create mode 100644 recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch create mode 100644 recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch create mode 100644 recipes-extended/dpdk/dpdk-module_20.11.bb create mode 100644 recipes-extended/dpdk/dpdk_20.11.bb diff --git a/recipes-extended/dpdk/dpdk-20.11.inc b/recipes-extended/dpdk/dpdk-20.11.inc new file mode 100644 index 00000000..00aed60d --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11.inc @@ -0,0 +1,15 @@ +DESCRIPTION = "Data Plane Development Kit" +HOMEPAGE = "http://dpdk.org" +LICENSE = "BSD-3-Clause & LGPLv2.1 & GPLv2" +LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ + file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444" + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1" +SRCREV = "f74b8bd5ab1c6ff76e956fc202a56aea2d200270" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(qoriq-arm64)" + +CVE_PRODUCT = "data_plane_development_kit" diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch b/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch new file mode 100644 index 00000000..18b75fb6 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch @@ -0,0 +1,74 @@ +From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Wed, 14 Apr 2021 17:25:53 +0800 +Subject: [PATCH] Makefile: add makefile + +Current meson build for kernel module build does not fit in Yocto. +So added Makefile to build rte_kni.ko + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini +--- + kernel/linux/kni/Kbuild | 6 ------ + kernel/linux/kni/Makefile | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 35 insertions(+), 6 deletions(-) + delete mode 100644 kernel/linux/kni/Kbuild + create mode 100644 kernel/linux/kni/Makefile + +diff --git a/kernel/linux/kni/Kbuild b/kernel/linux/kni/Kbuild +deleted file mode 100644 +index e5452d6c00..0000000000 +--- a/kernel/linux/kni/Kbuild ++++ /dev/null +@@ -1,6 +0,0 @@ +-# SPDX-License-Identifier: BSD-3-Clause +-# Copyright(c) 2018 Luca Boccassi +- +-ccflags-y := $(MODULE_CFLAGS) +-obj-m := rte_kni.o +-rte_kni-y := $(patsubst $(src)/%.c,%.o,$(wildcard $(src)/*.c)) +diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile +new file mode 100644 +index 0000000000..19897ee06e +--- /dev/null ++++ b/kernel/linux/kni/Makefile +@@ -0,0 +1,35 @@ ++# ++# Makefile for building rte_kni.ko ++# ++MODULE_CFLAGS += -include $(S)/config/rte_config.h ++MODULE_CFLAGS += -I$(S)/lib/librte_eal/include ++MODULE_CFLAGS += -I$(S)/lib/librte_kni ++MODULE_CFLAGS += -I$(S)/kernel/linux/kni ++MODULE_CFLAGS += -I$(S) ++MODULE_CFLAGS += -I$(STAGING_INCDIR) ++ ++rte_kni-objs = kni_misc.o kni_net.o ++ ++ccflags-y := $(MODULE_CFLAGS) ++cflags-y := $(MODULE_CFLAGS) ++obj-m := rte_kni.o ++ ++ ++KERNEL_MAKE_OPTS := -C $(STAGING_KERNEL_DIR) M=$(CURDIR) ++ifneq ($(ARCH),) ++KERNEL_MAKE_OPTS += ARCH=$(ARCH) ++endif ++ifneq ($(CROSS_COMPILE),) ++KERNEL_MAKE_OPTS += CROSS_COMPILE=$(CROSS_COMPILE) ++endif ++ ++build: ++ $(MAKE) $(KERNEL_MAKE_OPTS) modules ++ ++install: modules_install ++ ++modules_install: ++ $(MAKE) $(KERNEL_MAKE_OPTS) modules_install ++ ++clean: ++ $(MAKE) $(KERNEL_MAKE_OPTS) clean +-- +2.17.1 + diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch b/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch new file mode 100644 index 00000000..f19b2b32 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch @@ -0,0 +1,30 @@ +From 6fe85f3a12d15e25345ef0547035a929351a179c Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Fri, 17 Sep 2021 12:53:53 +0530 +Subject: [PATCH] drivers/net/enetfec/enet_uio.c: fix multiple definition + +.../drivers/net/enetfec/enet_uio.c:22: multiple definition of `count'; +.../examples/flow_classify/flow_classify.c:170: first defined here +collect2: error: ld returned 1 exit status + +Signed-off-by: Ting Liu +--- + drivers/net/enetfec/enet_uio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c +index b64dc522e8..9e09f9beb6 100644 +--- a/drivers/net/enetfec/enet_uio.c ++++ b/drivers/net/enetfec/enet_uio.c +@@ -19,7 +19,7 @@ + #include "enet_uio.h" + + static struct uio_job enetfec_uio_job; +-int count; ++static int count; + + /** @brief Reads first line from a file. + * Composes file name as: root/subdir/filename +-- +2.25.1 + diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch b/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch new file mode 100644 index 00000000..4df28c40 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch @@ -0,0 +1,35 @@ +From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001 +From: Mohamad Noor Alim Hussin +Date: Thu, 24 Jun 2021 11:30:09 +0800 +Subject: [PATCH] ifpga/meson: Fix finding librt using find_library() + +Finding with "librt" keyword would give the output +with full path of librt such as /usr/lib/librt.so +instead of -lrt. + +Assume find_library() will prepend "lib", thus remove +"lib" from "librt" keyword. The output will shows as +-lrt. + +Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html] + +Signed-off-by: Mohamad Noor Alim Hussin +--- + drivers/raw/ifpga/base/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build +index da2d6e33c..949f7f127 100644 +--- a/drivers/raw/ifpga/base/meson.build ++++ b/drivers/raw/ifpga/base/meson.build +@@ -25,7 +25,7 @@ sources = [ + + rtdep = dependency('librt', required: false) + if not rtdep.found() +- rtdep = cc.find_library('librt', required: false) ++ rtdep = cc.find_library('rt', required: false) + endif + if not rtdep.found() + build = false +-- +2.32.0 diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch b/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch new file mode 100644 index 00000000..bef1f45b --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch @@ -0,0 +1,38 @@ +From cf8f15824dc2dd306d9c7e111641bef045d623c2 Mon Sep 17 00:00:00 2001 +From: Naveen Saini +Date: Wed, 14 Apr 2021 16:03:10 +0800 +Subject: [PATCH] meson.build:-march and -mcpu already passed by Yocto + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini +--- + config/meson.build | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/config/meson.build b/config/meson.build +index 2f150de3b8..41bb3e9ec4 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -94,12 +94,12 @@ dpdk_conf.set('RTE_MACHINE', machine) + machine_args = [] + + # ppc64 does not support -march= at all, use -mcpu and -mtune for that +-if host_machine.cpu_family().startswith('ppc') +- machine_args += '-mcpu=' + machine +- machine_args += '-mtune=' + machine +-else +- machine_args += '-march=' + machine +-endif ++#if host_machine.cpu_family().startswith('ppc') ++# machine_args += '-mcpu=' + machine ++# machine_args += '-mtune=' + machine ++#else ++# machine_args += '-march=' + machine ++#endif + + toolchain = cc.get_id() + dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) +-- +2.17.1 + diff --git a/recipes-extended/dpdk/dpdk-module_20.11.bb b/recipes-extended/dpdk/dpdk-module_20.11.bb new file mode 100644 index 00000000..180b140b --- /dev/null +++ b/recipes-extended/dpdk/dpdk-module_20.11.bb @@ -0,0 +1,41 @@ +include dpdk-20.11.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk-${PV}:" + +SRC_URI += " \ + file://0001-Makefile-add-makefile.patch \ +" + +inherit module + +#kernel module needs 'rte_build_config.h', which is generated at buid time +DEPENDS += "dpdk" + +export S +export STAGING_KERNEL_DIR +export STAGING_INCDIR +export INSTALL_MOD_DIR="dpdk" + +do_configure[noexec] = "1" + +do_compile() { + cd ${S}/kernel/linux/kni + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ + KERNEL_VERSION=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ + ${MAKE_TARGETS} +} + +do_install() { + cd ${S}/kernel/linux/kni + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ + INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + ${MODULES_INSTALL_TARGET} +} diff --git a/recipes-extended/dpdk/dpdk_20.11.bb b/recipes-extended/dpdk/dpdk_20.11.bb new file mode 100644 index 00000000..2d27adc5 --- /dev/null +++ b/recipes-extended/dpdk/dpdk_20.11.bb @@ -0,0 +1,93 @@ +include dpdk-20.11.inc + +SRC_URI += " \ + file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \ + file://0001-ifpga-meson-Fix-finding-librt-using-find_library.patch \ + file://0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch \ +" + +MESON_BUILDTYPE = "release" + +# kernel module is provide by dpdk-module recipe, so disable here +EXTRA_OEMESON = " -Denable_kmods=false \ + -Dexamples=all \ + -Doptimization=3 \ +" + +PACKAGECONFIG ??= "openssl" +PACKAGECONFIG[afxdp] = ",,libbpf" +PACKAGECONFIG[libvirt] = ",,libvirt" +PACKAGECONFIG[openssl] = ",,openssl" + +RDEPENDS:${PN} += "bash pciutils python3-core" +RDEPENDS:${PN}-examples += "bash" +DEPENDS = "numactl" + +inherit meson + +INSTALL_PATH = "${prefix}/share/dpdk" + +do_configure:prepend() { + sed -i "/implementor_/d" ${WORKDIR}/meson.cross + sed -i "/\[properties]/aimplementor_id = 'dpaa'" ${WORKDIR}/meson.cross + sed -i "/\[properties]/aimplementor_pn = 'default'" ${WORKDIR}/meson.cross + sed -i "s/cpu =.*/cpu = 'armv8-a'/" ${WORKDIR}/meson.cross +} + +do_install:append(){ + # remove source files + rm -rf ${D}/${INSTALL_PATH}/examples/* + + # Install examples + install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ + for dirname in ${B}/examples/dpdk-* + do + if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then + install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ + fi + done + cp -rf ${S}/nxp/* ${D}/${INSTALL_PATH}/ +} + +PACKAGES =+ "${PN}-tools ${PN}-examples ${PN}-misc" + +FILES:${PN}-tools = " \ + ${bindir}/dpdk-testpmd \ + ${INSTALL_PATH}/examples/dpdk-l2fwd \ + ${INSTALL_PATH}/examples/dpdk-l2fwd-crypto \ + ${INSTALL_PATH}/examples/dpdk-l3fwd \ + ${INSTALL_PATH}/examples/dpdk-ipsec-secgw \ +" + +FILES:${PN}-examples = " \ + ${bindir}/dpdk-proc-info \ + ${bindir}/dpdk-test \ + ${bindir}/dpdk-test-crypto-perf \ + ${bindir}/dpdk-*.py \ + ${INSTALL_PATH}/examples/dpdk-cmdif \ + ${INSTALL_PATH}/examples/dpdk-cmdline \ + ${INSTALL_PATH}/examples/dpdk-ethtool \ + ${INSTALL_PATH}/examples/dpdk-ip_fragmentation \ + ${INSTALL_PATH}/examples/dpdk-ip_reassembly \ + ${INSTALL_PATH}/examples/dpdk-kni \ + ${INSTALL_PATH}/examples/dpdk-l2fwd-keepalive \ + ${INSTALL_PATH}/examples/dpdk-l2fwd-qdma \ + ${INSTALL_PATH}/examples/dpdk-l3fwd-acl \ + ${INSTALL_PATH}/examples/dpdk-link_status_interrupt \ + ${INSTALL_PATH}/examples/dpdk-mp_client \ + ${INSTALL_PATH}/examples/dpdk-mp_server \ + ${INSTALL_PATH}/examples/dpdk-qdma_demo \ + ${INSTALL_PATH}/examples/dpdk-simple_mp \ + ${INSTALL_PATH}/examples/dpdk-symmetric_mp \ + ${INSTALL_PATH}/examples/dpdk-symmetric_mp_qdma \ + ${INSTALL_PATH}/examples/dpdk-timer \ +" + +FILES:${PN}-misc = " \ + ${bindir}/dpdk-pdump \ + ${bindir}/dpdk-test-* \ + ${bindir}/dpdk-*.py \ + ${INSTALL_PATH}/examples/* \ +" + +INSANE_SKIP:${PN} = "dev-so" -- cgit v1.2.3-54-g00ecf From bd9de08cc72d1a3a1a4d8a58bc9f5df9171bbc35 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:37:00 +0800 Subject: libpkcs11: update to 8d85182 Fix for double free happening when running sign_digest_update_final app. remove duplicate pkcs11.h which optee_os install too. Signed-off-by: Ting Liu --- recipes-extended/libpkcs11/libpkcs11_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-extended/libpkcs11/libpkcs11_git.bb b/recipes-extended/libpkcs11/libpkcs11_git.bb index 5496b09c..42b48779 100644 --- a/recipes-extended/libpkcs11/libpkcs11_git.bb +++ b/recipes-extended/libpkcs11/libpkcs11_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=803852533e29eb1d6d5e55ad3078b625" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/libpkcs11;nobranch=1 \ file://0001-fix-multiple-definition-error.patch \ " -SRCREV = "a243fb21772f1bd434d8bc1ac45feb36571afadb" +SRCREV = "8d85182b7a7cd393ab6dd72930f8d1b69468f741" DEPENDS = "openssl secure-obj" @@ -30,6 +30,7 @@ do_install(){ mkdir -p ${D}/${includedir} ${D}/${bindir} cp ${S}/out/export/lib/libpkcs11.so ${D}/${libdir} cp ${S}/out/export/include/*.h ${D}/${includedir} + rm -f ${D}${includedir}/pkcs11.h cp ${S}/out/export/app/* ${D}/${bindir} } -- cgit v1.2.3-54-g00ecf From 6ab74151605998436d2480d90d6d5d9efeab1d91 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:42:40 +0800 Subject: ovs-dpdk: upgrade to 2.15 Signed-off-by: Ting Liu --- recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb | 48 ---------------------------- recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb | 36 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 48 deletions(-) delete mode 100644 recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb create mode 100644 recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb diff --git a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb b/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb deleted file mode 100644 index f9d32773..00000000 --- a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb +++ /dev/null @@ -1,48 +0,0 @@ -DESCRIPTION = "OVS DPDK" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab" - -DEPENDS = "dpdk python3-six-native coreutils-native" -RDEPENDS:${PN} = "bash libcrypto libssl python3" - -inherit python3native - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1" -SRCREV = "072130412196029bcc284e353023d81019a8daa7" - -S = "${WORKDIR}/git" - -DPAA_VER ?= "dpaa" -export RTE_TARGET = "${ARCH}-${DPAA_VER}-linuxapp-gcc" - -EXTRA_OEMAKE += 'ARCH="${ARCH}" CROSS="${TARGET_PREFIX}" \ - CPU_CFLAGS="--sysroot=${STAGING_DIR_HOST}" RTE_SDK="${S}" \ - OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \ - RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" \ -' - -do_configure() { - export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR} - ${S}/boot.sh - ${S}/configure --host aarch64-fsl-linux --with-dpdk=${SYSROOT_DPDK}/usr/share/${RTE_TARGET} --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast" -} - -do_compile() { - oe_runmake O="${RTE_TARGET}" T="${RTE_TARGET}" -} - -do_install() { - install -d ${D}${bindir}/ovs-dpdk - cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk - cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk - cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk - cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk - cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk - cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk - chmod 777 -R ${D}${bindir}/ovs-dpdk/* -} - -ALLOW_EMPTY:${PN} = "1" -INHIBIT_PACKAGE_STRIP = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb b/recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb new file mode 100644 index 00000000..fb41b457 --- /dev/null +++ b/recipes-extended/ovs-dpdk/ovs-dpdk_2.15.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "OVS DPDK" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab" + +DEPENDS = "dpdk python3-six-native coreutils-native autoconf-native automake-native" +RDEPENDS:${PN} = "bash libcrypto libssl python3" + +inherit python3native pkgconfig + +SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1" +SRCREV = "f2c0744d2f68c4cd2840d6e409d7b0520e4caf99" + +S = "${WORKDIR}/git" + +do_configure() { + export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR} + ${S}/boot.sh + ${S}/configure --host aarch64-fsl-linux --with-dpdk=static --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast" +} + +do_install:append() { + install -d ${D}${bindir}/ovs-dpdk + cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk + cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk + cp -rf ${S}/ovsdb/ovsdb-client ${D}${bindir}/ovs-dpdk + cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk + cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk + cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk + cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk + chmod 777 -R ${D}${bindir}/ovs-dpdk/* +} + +ALLOW_EMPTY:${PN} = "1" +INHIBIT_PACKAGE_STRIP = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(qoriq-arm64)" -- cgit v1.2.3-54-g00ecf From 7fade9243aeeef32a972bec3aa263ab7201a7681 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:44:08 +0800 Subject: pktgen-dpdk: upgrade to 21.05.0 Signed-off-by: Ting Liu --- .../files/fix-gcc11-mismatched-dealloc-error.patch | 72 ++++++++++++++++++++++ .../pktgen-dpdk/pktgen-dpdk_19.12.0.bb | 33 ---------- .../pktgen-dpdk/pktgen-dpdk_21.05.0.bb | 37 +++++++++++ 3 files changed, 109 insertions(+), 33 deletions(-) create mode 100644 recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch delete mode 100644 recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb create mode 100644 recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb diff --git a/recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch b/recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch new file mode 100644 index 00000000..a2befbd6 --- /dev/null +++ b/recipes-extended/pktgen-dpdk/files/fix-gcc11-mismatched-dealloc-error.patch @@ -0,0 +1,72 @@ +From 530fbb2e2deb6b9214466933df221910c2c50b7c Mon Sep 17 00:00:00 2001 +From: Ting Liu +Date: Fri, 15 Oct 2021 08:01:15 +0530 +Subject: [PATCH] fix gcc11 mismatched-dealloc error + +Fix build error with gcc 11: +| FAILED: lib/common/libcommon.a.p/lscpu.c.o +| aarch64-poky-linux-gcc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wdate-time --sysroot=/opt/ci/yocto/honister/build-lx2162aqds/tmp/work/lx2162aqds-poky-linux/pktgen-dpdk/21.05.0-r0/recipe-sysroot -Ilib/common/libcommon.a.p -Ilib/common -I../git/lib/common -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -DRTE_FORCE_INTRINSICS -fPIC -include rte_config.h -march=armv8-a+crc -moutline-atomics -MD -MQ lib/common/libcommon.a.p/lscpu.c.o -MF lib/common/libcommon.a.p/lscpu.c.o.d -o lib/common/libcommon.a.p/lscpu.c.o -c ../git/lib/common/lscpu.c +| In function 'lscpu_info_get', +| inlined from 'lscpu_info' at ../git/lib/common/lscpu.c:210:2: +| ../git/lib/common/lscpu.c:167:9: error: 'fclose' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc] +| 167 | fclose(f); +| | ^~~~~~~~~ +| ../git/lib/common/lscpu.c: In function 'lscpu_info': +| ../git/lib/common/lscpu.c:146:22: note: returned from 'popen' +| 146 | FILE *f = popen(lscpu_path, "r"); +| | ^~~~~~~~~~~~~~~~~~~~~~ +| In function 'cpu_proc_info', +| inlined from 'lscpu_info' at ../git/lib/common/lscpu.c:211:2: +| ../git/lib/common/lscpu.c:195:9: error: 'fclose' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc] +| 195 | fclose(f); +| | ^~~~~~~~~ +| ../git/lib/common/lscpu.c: In function 'lscpu_info': +| ../git/lib/common/lscpu.c:174:22: note: returned from 'popen' +| 174 | FILE *f = popen(proc_path, "r"); +| | ^~~~~~~~~~~~~~~~~~~~~ +| cc1: all warnings being treated as errors + +Signed-off-by: Ting Liu +--- + app/pktgen.h | 2 +- + lib/common/lscpu.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/app/pktgen.h b/app/pktgen.h +index 7c61fc8..2f24c65 100644 +--- a/app/pktgen.h ++++ b/app/pktgen.h +@@ -531,7 +531,7 @@ do_command(const char *cmd, int (*display)(char *, int)) { + i = display(line, i); + + if (f) +- fclose(f); ++ pclose(f); + if (line) + free(line); + +diff --git a/lib/common/lscpu.c b/lib/common/lscpu.c +index 8b56ccd..912c601 100644 +--- a/lib/common/lscpu.c ++++ b/lib/common/lscpu.c +@@ -164,7 +164,7 @@ lscpu_info_get(const char *lscpu_path) + } + } + +- fclose(f); ++ pclose(f); + free(line); + } + +@@ -192,7 +192,7 @@ cpu_proc_info(const char *proc_path) + } + } + +- fclose(f); ++ pclose(f); + free(line); + } + +-- +2.25.1 + diff --git a/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb b/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb deleted file mode 100644 index 6a039129..00000000 --- a/recipes-extended/pktgen-dpdk/pktgen-dpdk_19.12.0.bb +++ /dev/null @@ -1,33 +0,0 @@ -DESCRIPTION = "PKTGEN DPDK" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=30ac8fa65a07ea7cc1c7ee84e1c80294" - -DEPENDS += "libpcap dpdk lua lua-native" - -SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \ -" -SRCREV = "7a61e4dfcdf037c31460b6c9bcb301797813036a" - -S = "${WORKDIR}/git" - -DPAA_VER ?= "dpaa" -export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc" -export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/" - -EXTRA_OEMAKE += 'CC="${CC}" LD="${LD}" RTE_SDK="${RECIPE_SYSROOT}/usr/share/" RTE_TARGET="arm64-${DPAA_VER}-linuxapp-gcc"' - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${bindir}/ - cp -f ${S}/app/arm64-dpaa-linuxapp-gcc/pktgen ${D}${bindir}/ - cp -f ${S}/Pktgen.lua ${D}${bindir}/ -} - -INSANE_SKIP:${PN} = "ldflags" -INHIBIT_PACKAGE_STRIP = "1" -PACKAGE_ARCH = "${MACHINE_ARCH}" -PARALLEL_MAKE = "" -COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb b/recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb new file mode 100644 index 00000000..f04e1e9f --- /dev/null +++ b/recipes-extended/pktgen-dpdk/pktgen-dpdk_21.05.0.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "PKTGEN DPDK" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0245ceedaef59ae0129500b0ce1e8a45" + +DEPENDS += "libpcap dpdk lua lua-native" + +SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \ + file://fix-gcc11-mismatched-dealloc-error.patch \ +" +SRCREV = "3a09aa916597fb9a97ee8eec50044cbdb9c4abde" + +S = "${WORKDIR}/git" + +DPAA_VER ?= "dpaa" +export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc" +export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/dpdk" + +inherit meson pkgconfig + +MESON_BUILDTYPE = "release" +EXTRA_OEMESON += '-Dc_args="-DRTE_FORCE_INTRINSICS"' + +do_configure:prepend() { + sed -i "/^add_project_arguments('-march=native'/s/^/#&/" ${S}/meson.build +} + +do_install() { + install -d ${D}${bindir}/ + install -m 0755 app/pktgen ${D}${bindir}/ + install -m 0644 ${S}/Pktgen.lua ${D}${bindir}/ +} + +INSANE_SKIP:${PN} = "ldflags" +INHIBIT_PACKAGE_STRIP = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +PARALLEL_MAKE = "" +COMPATIBLE_MACHINE = "(qoriq-arm64)" -- cgit v1.2.3-54-g00ecf From d70e4ef35a98b6ca589b5fabd541084ca1f4a078 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Thu, 14 Oct 2021 16:49:19 +0800 Subject: qemu-qoriq: upgrade to 4.2 Signed-off-by: Ting Liu --- ...0001-linux-user-remove-host-stime-syscall.patch | 67 ---------------------- recipes-devtools/qemu/qemu-qoriq_4.1.0.bb | 65 --------------------- recipes-devtools/qemu/qemu-qoriq_4.2.bb | 64 +++++++++++++++++++++ 3 files changed, 64 insertions(+), 132 deletions(-) delete mode 100644 recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch delete mode 100644 recipes-devtools/qemu/qemu-qoriq_4.1.0.bb create mode 100644 recipes-devtools/qemu/qemu-qoriq_4.2.bb diff --git a/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch b/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch deleted file mode 100644 index 2d3bd7e0..00000000 --- a/recipes-devtools/qemu/qemu-qoriq/0001-linux-user-remove-host-stime-syscall.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 0f1f2d4596aee037d3ccbcf10592466daa54107f Mon Sep 17 00:00:00 2001 -From: Laurent Vivier -Date: Tue, 12 Nov 2019 15:25:56 +0100 -Subject: [PATCH] linux-user: remove host stime() syscall - -stime() has been withdrawn from glibc -(12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.") - -Implement the target stime() syscall using host -clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc. - -Tested qemu-ppc/x86_64 with: - - #include - #include - - int main(void) - { - time_t t; - int ret; - - /* date -u -d"2019-11-12T15:11:00" "+%s" */ - t = 1573571460; - ret = stime(&t); - printf("ret %d\n", ret); - return 0; - } - - # date; ./stime; date - Tue Nov 12 14:18:32 UTC 2019 - ret 0 - Tue Nov 12 15:11:00 UTC 2019 - -Upstream-Status: Backport - -Buglink: https://bugs.launchpad.net/qemu/+bug/1852115 -Reported-by: Cole Robinson -Signed-off-by: Laurent Vivier -Reviewed-by: Peter Maydell -Message-Id: <20191112142556.6335-1-laurent@vivier.eu> ---- - linux-user/syscall.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 4e97bcf1e5..ce399a55f0 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -7764,10 +7764,12 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, - #ifdef TARGET_NR_stime /* not on alpha */ - case TARGET_NR_stime: - { -- time_t host_time; -- if (get_user_sal(host_time, arg1)) -+ struct timespec ts; -+ ts.tv_nsec = 0; -+ if (get_user_sal(ts.tv_sec, arg1)) { - return -TARGET_EFAULT; -- return get_errno(stime(&host_time)); -+ } -+ return get_errno(clock_settime(CLOCK_REALTIME, &ts)); - } - #endif - #ifdef TARGET_NR_alarm /* not on alpha */ --- -2.24.0 - diff --git a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb b/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb deleted file mode 100644 index 26c78639..00000000 --- a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb +++ /dev/null @@ -1,65 +0,0 @@ -BBCLASSEXTEND = "" - -require qemu.inc - -COMPATIBLE_MACHINE = "(qoriq)" - -DEPENDS = "glib-2.0 zlib pixman bison-native" - -LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ - file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" - -SRC_URI = "gitsm://source.codeaurora.org/external/qoriq/qoriq-components/qemu;nobranch=1 \ - file://powerpc_rom.bin \ - file://run-ptest \ - file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ - file://0001-linux-user-remove-host-stime-syscall.patch \ - " - -SRCREV = "0b88a503e43ca629d6e8165638ac6b312e5c66bd" - -S = "${WORKDIR}/git" - -python() { - d.appendVar('PROVIDES', ' ' + d.getVar('BPN').replace('-qoriq', '')) - pkgs = d.getVar('PACKAGES').split() - for p in pkgs: - if '-qoriq' in p: - d.appendVar('RPROVIDES:' + p, ' ' + p.replace('-qoriq', '')) - d.appendVar('RCONFLICTS:' + p, ' ' + p.replace('-qoriq', '')) - d.appendVar('RREPLACES:' + p, ' ' + p.replace('-qoriq', '')) -} - -RDEPENDS:${PN}:class-target += "bash" - -EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" -EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" -EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" - -do_install:append:class-nativesdk() { - ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -} - -do_install_ptest() { - cp -rL ${B}/tests ${D}${PTEST_PATH} - find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} - - cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests - # Don't check the file genreated by configure - sed -i -e '/wildcard config-host.mak/d' \ - -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include - sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \ - ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env -} - -PACKAGECONFIG ??= " \ - fdt sdl kvm aio libusb vhost \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ -" -PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm" - -PACKAGECONFIG[xkbcommon] = ",," -PACKAGECONFIG[libudev] = ",," - -DISABLE_STATIC = "" - diff --git a/recipes-devtools/qemu/qemu-qoriq_4.2.bb b/recipes-devtools/qemu/qemu-qoriq_4.2.bb new file mode 100644 index 00000000..f788f724 --- /dev/null +++ b/recipes-devtools/qemu/qemu-qoriq_4.2.bb @@ -0,0 +1,64 @@ +BBCLASSEXTEND = "" + +require qemu.inc + +COMPATIBLE_MACHINE = "(qoriq)" + +DEPENDS = "glib-2.0 zlib pixman bison-native" + +LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ + file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" + +SRC_URI = "gitsm://source.codeaurora.org/external/qoriq/qoriq-components/qemu;nobranch=1 \ + file://powerpc_rom.bin \ + file://run-ptest \ + file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \ + " + +SRCREV = "14fda5a42df6c72e890d6a97ff88c5852172604b" + +S = "${WORKDIR}/git" + +python() { + d.appendVar('PROVIDES', ' ' + d.getVar('BPN').replace('-qoriq', '')) + pkgs = d.getVar('PACKAGES').split() + for p in pkgs: + if '-qoriq' in p: + d.appendVar('RPROVIDES:' + p, ' ' + p.replace('-qoriq', '')) + d.appendVar('RCONFLICTS:' + p, ' ' + p.replace('-qoriq', '')) + d.appendVar('RREPLACES:' + p, ' ' + p.replace('-qoriq', '')) +} + +RDEPENDS:${PN}:class-target += "bash" + +EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" +EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" +EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" + +do_install:append:class-nativesdk() { + ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} +} + +do_install_ptest() { + cp -rL ${B}/tests ${D}${PTEST_PATH} + find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {} + + cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests + # Don't check the file genreated by configure + sed -i -e '/wildcard config-host.mak/d' \ + -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include + sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \ + ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env +} + +PACKAGECONFIG ??= " \ + fdt sdl kvm aio libusb vhost numa \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ +" +PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm" + +PACKAGECONFIG[xkbcommon] = ",," +PACKAGECONFIG[libudev] = ",," + +DISABLE_STATIC = "" + -- cgit v1.2.3-54-g00ecf From 4b68cd3d29951a207a2743b4a50b8ae1c1a4f4b9 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 15 Oct 2021 11:03:11 +0800 Subject: spc: update to 39813868 Add multiple SP Profiles configuration. Signed-off-by: Ting Liu --- recipes-dpaa2/spc/spc_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-dpaa2/spc/spc_git.bb b/recipes-dpaa2/spc/spc_git.bb index 3e68ae89..2ef1d01d 100644 --- a/recipes-dpaa2/spc/spc_git.bb +++ b/recipes-dpaa2/spc/spc_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=163b09a1c249a6ff2b28da1ceca2e0a8" DEPENDS = "libxml2 fmlib tclap" SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/spc;nobranch=1" -SRCREV = "be7dd8e346a934aae1e4bdd6b579f2aa4bb5cd86" +SRCREV = "398138687a3d3d6ef174501221711de74ff7bc40" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 3f6f4bd60f9497008deea11d3ca4f500200e5b30 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 15 Oct 2021 11:04:27 +0800 Subject: management-complex: add recipe for 10.29.0 Signed-off-by: Ting Liu --- .../management-complex_10.29.0.bb | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 recipes-dpaa2/management-complex/management-complex_10.29.0.bb diff --git a/recipes-dpaa2/management-complex/management-complex_10.29.0.bb b/recipes-dpaa2/management-complex/management-complex_10.29.0.bb new file mode 100644 index 00000000..ba43b761 --- /dev/null +++ b/recipes-dpaa2/management-complex/management-complex_10.29.0.bb @@ -0,0 +1,41 @@ +SUMMARY = "DPAA2 Management Complex Firmware" +LICENSE = "NXP-Binary-EULA" +LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=2cb2fee5d3558ee2a81331ed121647ad" + +inherit deploy + +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1" +SRCREV = "d21bc22000a14b0b6eeafc017fb93bc70499f74a" + +S = "${WORKDIR}/git" + +REGLEX:ls2088a = "ls2088a" +REGLEX:ls2080a = "ls2080a" +REGLEX:ls1088a = "ls1088a" +REGLEX:lx2160a = "lx216xa" +REGLEX:lx2162a = "lx216xa" + +do_install () { + install -d ${D}/boot + install -m 755 ${S}/${REGLEX}/*.itb ${D}/boot +} + +do_deploy () { + install -d ${DEPLOYDIR}/mc_app + install -m 755 ${S}/${REGLEX}/*.itb ${DEPLOYDIR}/mc_app + # make a symlink to the latest binary + for mc_binary in `find ${DEPLOYDIR}/mc_app -type f -printf "%f\n" |sort`;do + ln -sfT ${mc_binary} ${DEPLOYDIR}/mc_app/mc.itb + done +} +addtask deploy before do_build after do_install + +PACKAGES += "${PN}-image" +FILES:${PN}-image += "/boot" + +INHIBIT_PACKAGE_STRIP = "1" + +COMPATIBLE_MACHINE = "(qoriq-arm64)" +PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3-54-g00ecf From 33e2435e2f3421b1ad205e8c5212c66d836c6080 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 15 Oct 2021 13:02:59 +0800 Subject: lx2160ardb: update rcw to support rev2 board Signed-off-by: Ting Liu --- conf/machine/lx2160ardb.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/machine/lx2160ardb.conf b/conf/machine/lx2160ardb.conf index e1a24f84..1945ad31 100644 --- a/conf/machine/lx2160ardb.conf +++ b/conf/machine/lx2160ardb.conf @@ -28,9 +28,9 @@ SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyAMA0" SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}" UEFI_XSPIBOOT ?= "LX2160ARDB_EFI_NORBOOT.fd" -RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" -RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" -RCWEMMC ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2000_700_2900_19_5_2" +RCWXSPI ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2" +RCWSD ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2" +RCWEMMC ?= "XGGFF_PP_HHHH_RR_19_5_2/rcw_2200_750_3200_19_5_2" EXTRA_IMAGEDEPENDS += "management-complex mc-utils rcw ls2-phy ddr-phy uefi qoriq-atf inphi" USE_VT = "0" -- cgit v1.2.3-54-g00ecf From 93d26c3d784f38b5629f31eb08ae7169c44ccb31 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 15 Oct 2021 16:13:53 +0800 Subject: cst: suppress deprecated-declarations error Fix below build error with openssl 3.0: | gcc -c -g -Wall -Wno-strict-aliasing -Werror -Itools/header_generation/create_hdr_isbc/include/ -Itools/header_generation/create_hdr_esbc/include/ -Itools/header_generation/create_hdr_pbi/include/ -Itools/header_generation/create_hdr_cf/include/ -Itools/fuse_provisioning/include/ -Itaal/include -Icommon/include -Ilib_hash_drbg/include -isystem.../usr/include -O2 -pipe common/crypto_utils.c | common/crypto_utils.c: In function 'crypto_hash_init' | common/crypto_utils.c:46:2: error: 'SHA256_Init' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations] | 46 | SHA256_Init(c); | | ^~~~~~~~~~~ | In file included from .../usr/include/openssl/x509.h:41, | from .../usr/include/openssl/ssl.h:31, | from common/crypto_utils.c:37: | .../usr/include/openssl/sha.h:73:27: note: declared here | 73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c); | | ^~~~~~~~~~~ | cc1: all warnings being treated as errors | make: *** [Makefile:172: crypto_utils.o] Error 1 | ERROR: oe_runmake failed | WARNING: exit code 1 from a shell command. | NOTE: recipe cst-native-git-r0: task do_compile: Failed Signed-off-by: Ting Liu --- recipes-devtools/cst/cst_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-devtools/cst/cst_git.bb b/recipes-devtools/cst/cst_git.bb index 71df0a35..d4a9a859 100644 --- a/recipes-devtools/cst/cst_git.bb +++ b/recipes-devtools/cst/cst_git.bb @@ -24,6 +24,7 @@ SRCREV = "dfe30d3f05cfe281896482839e57ed49c52f2088" S = "${WORKDIR}/git" EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"' +CFLAGS:append = ' -Wno-deprecated-declarations' PARALLEL_MAKE = "" -- cgit v1.2.3-54-g00ecf