arm-bsp: Fix cortexm tunes
PATCH 1/1 arm-bsp: Fix cortexm tunes
Fix the cortex-m tunes to actually function properly. Tested with meta-zephyr on musca-b1.
--- .../conf/machine/include/arm/arch-armv7em.inc | 1 - .../conf/machine/include/arm/arch-armv7m.inc | 13 -------- .../include/arm/arch-armv8-1m-main.inc | 1 - .../machine/include/arm/arch-armv8-2a.inc | 1 - .../machine/include/arm/arch-armv8m-base.inc | 1 - .../machine/include/arm/arch-armv8m-main.inc | 33 ++++++++++++++----- .../conf/machine/include/tune-cortexm1.inc | 1 - .../conf/machine/include/tune-cortexm23.inc | 1 - .../conf/machine/include/tune-cortexm3.inc | 1 - .../conf/machine/include/tune-cortexm33.inc | 18 +++++----- .../conf/machine/include/tune-cortexm35p.inc | 10 +++--- .../conf/machine/include/tune-cortexm4.inc | 1 - .../conf/machine/include/tune-cortexm55.inc | 1 - .../conf/machine/include/tune-cortexm7.inc | 1 - meta-arm-bsp/conf/machine/musca-b1.conf | 1 + 15 files changed, 42 insertions(+), 43 deletions(-)
meta-arm-bsp/conf/machine/include/arm/arch-armv7em.inc +0 -1
@@ -11,7 +11,6 @@ TUNECONFLICTS[armv7em] = "armv4 armv5 armv6 armv7a" require conf/machine/include/arm/arch-armv7m.inc - AVAILTUNES += "armv7em" ARMPKGARCH_tune-armv7em = "armv7em" TUNE_FEATURES_tune-armv7em = "armv7em"
meta-arm-bsp/conf/machine/include/arm/arch-armv7m.inc +0 -13
@@ -1,15 +1,3 @@ -# -# Tune Settings for Cortex-M3 -# -TUNEVALID[cortexm3] = "Enable Cortex-M3 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm3', ' -mcpu=cortex-m3', '', d)}" - - -AVAILTUNES += "cortexm3" -ARMPKGARCH_tune-cortexm3 = "cortexm3" -TUNE_FEATURES_tune-cortexm3 = "${TUNE_FEATURES_tune-armv7m} cortexm3" -PACKAGE_EXTRA_ARCHS_tune-cortexm3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7m} cortexm3" - # # Defaults for ARMv7-m #
@@ -23,7 +11,6 @@ TUNECONFLICTS[armv7m] = "armv4 armv5 armv6 armv7a" require conf/machine/include/arm/arch-armv6m.inc - AVAILTUNES += "armv7m" ARMPKGARCH_tune-armv7m = "armv7m" TUNE_FEATURES_tune-armv7m = "armv7m"
meta-arm-bsp/conf/machine/include/arm/arch-armv8-1m-main.inc +0 -1
@@ -12,7 +12,6 @@ TUNECONFLICTS[armv8-1m-main] = "armv4 armv5 armv6 armv7a" require conf/machine/include/arm/arch-armv8m-main.inc - AVAILTUNES += "armv8-1m-main" ARMPKGARCH_tune-armv8-1m-main = "armv8-1m-main" TUNE_FEATURES_tune-armv8-1m-main = "armv8-1m-main"
meta-arm-bsp/conf/machine/include/arm/arch-armv8-2a.inc +0 -1
@@ -7,7 +7,6 @@ MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8-2a', 'armv8-2a require conf/machine/include/arm/arch-armv8a.inc - AVAILTUNES += "armv8-2a armv8-2a-crypto" ARMPKGARCH_tune-armv8-2a ?= "armv8-2a" ARMPKGARCH_tune-armv8-2a-crypto ?= "armv8-2a"
meta-arm-bsp/conf/machine/include/arm/arch-armv8m-base.inc +0 -1
@@ -11,7 +11,6 @@ TUNECONFLICTS[armv8m-base] = "armv4 armv5 armv6 armv7a" require conf/machine/include/arm/arch-armv7m.inc - AVAILTUNES += "armv8m-base" ARMPKGARCH_tune-armv8m-base = "armv8m-base" TUNE_FEATURES_tune-armv8m-base = "armv8m-base"
meta-arm-bsp/conf/machine/include/arm/arch-armv8m-main.inc +25 -8
@@ -1,19 +1,36 @@ # -# -# Defaults for ARMv8-M.main +# Defaults for ARMv8-m.main # DEFAULTTUNE ?= "armv8m-main" +require conf/machine/include/arm/arch-armv8m-base.inc + TUNEVALID[armv8m-main] = "Enable instructions for ARMv8-m.main" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8m-main', ' -march=armv8-m.main', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8m-main', ' -march=armv8-m.main${MARCH_DSP}${MARCH_FPU}', '', d)}" MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8m-main', 'armv8m-main:', '', d)}" TUNECONFLICTS[armv8m-main] = "armv4 armv5 armv6 armv7a" -require conf/machine/include/arm/arch-armv8m-base.inc +# FIXME - below taken from meta/conf/machine/include/arm/arch-armv5-dsp.inc and should be put into something more generic +TUNEVALID[dsp] = "ARM DSP functionality" +ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ], 'e', '', d)}" +MARCH_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ], '+dsp', '+nodsp', d)}" +# FIXME - Below belongs in meta/conf/machine/include/arm/feature-arm-neon.inc +TUNEVALID[vfpv5spd16] = "Enable Vector Floating Point Version 5, Single Precision. with 16 registers (fpv5-sp-d16) unit." +TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv5spd16', 'fpv5-sp-d16', '', d)}" +MARCH_FPU = "${@bb.utils.contains('TUNE_FEATURES', [ 'vfpv5spd16' ], '+fp', '+nofp', d)}" -AVAILTUNES += "armv8m-main" -ARMPKGARCH_tune-armv8m-main = "armv8m-main" -TUNE_FEATURES_tune-armv8m-main = "armv8m-main" -PACKAGE_EXTRA_ARCHS_tune-armv8m-main = "armv8m-main" +AVAILTUNES += "armv8m-main armv8m-mainearmv8m-main-vfpv5spd16 armv8m-maine-vfpv5spd16" +ARMPKGARCH_tune-armv8m-main = "armv8m-main" +ARMPKGARCH_tune-armv8m-maine = "armv8m-main" +ARMPKGARCH_tune-armv8m-main-vfpv5spd16 = "armv8m-main" +ARMPKGARCH_tune-armv8m-maine-vfpv5spd16 = "armv8m-main" +TUNE_FEATURES_tune-armv8m-main = "armv8m-main" +TUNE_FEATURES_tune-armv8m-maine = "${TUNE_FEATURES_tune-armv8m-main} dsp" +TUNE_FEATURES_tune-armv8m-main-vfpv5spd16 = "${TUNE_FEATURES_tune-armv8m-main} vfpv5spd16" +TUNE_FEATURES_tune-armv8m-maine-vfpv5spd16 = "${TUNE_FEATURES_tune-armv8m-main-vfpv5spd16} dsp" +PACKAGE_EXTRA_ARCHS_tune-armv8m-main = "armv8m-main" +PACKAGE_EXTRA_ARCHS_tune-armv8m-maine = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-main} armv8m-maine" +PACKAGE_EXTRA_ARCHS_tune-armv8m-main-vfpv5spd16 = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-main} armv8m-main-fpv5-spd16" +PACKAGE_EXTRA_ARCHS_tune-armv8m-maine-vfpv5spd16 = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-main} armv8m-maine-fpv5-spd16"
meta-arm-bsp/conf/machine/include/tune-cortexm1.inc +0 -1
@@ -8,7 +8,6 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm1', ' -mcpu=cortex require conf/machine/include/arm/arch-armv6m.inc - AVAILTUNES += "cortexm1" ARMPKGARCH_tune-cortexm1 = "cortexm1" TUNE_FEATURES_tune-cortexm1 = "${TUNE_FEATURES_tune-armv6m} cortexm1"
meta-arm-bsp/conf/machine/include/tune-cortexm23.inc +0 -1
@@ -8,7 +8,6 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm23', ' -mcpu=corte require conf/machine/include/arm/arch-armv8m-base.inc - AVAILTUNES += "cortexm23" ARMPKGARCH_tune-cortexm23 = "cortexm23" TUNE_FEATURES_tune-cortexm23 = "${TUNE_FEATURES_tune-armv8m-base} cortexm23"
meta-arm-bsp/conf/machine/include/tune-cortexm3.inc +0 -1
@@ -8,7 +8,6 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm3', ' -mcpu=cortex require conf/machine/include/arm/arch-armv7m.inc - AVAILTUNES += "cortexm3" ARMPKGARCH_tune-cortexm3 = "cortexm3" TUNE_FEATURES_tune-cortexm3 = "${TUNE_FEATURES_tune-armv7m} cortexm3"
meta-arm-bsp/conf/machine/include/tune-cortexm33.inc +10 -8
@@ -1,15 +1,17 @@ # # Tune Settings for Cortex-M33 # -DEFAULTTUNE ?= "armv8m" +DEFAULTTUNE ?= "cortexm33" -TUNEVALID[armv8m] = "Enable instructions for ARMv8-m" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8m', ' -march=armv7-m', '', d)}" +TUNEVALID[cortexm33] = "Enable Cortex-M33 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm33', ' -mcpu=cortex-m33', '', d)}" require conf/machine/include/arm/arch-armv8m-main.inc -AVAILTUNES += "armv8m" -ARMPKGARCH_tune-armv8m ?= "armv8m" -TUNE_FEATURES_tune-armv8m = "armv8m" -PACKAGE_EXTRA_ARCHS_tune-armv8m = "armv8m" - +# GCC thnks that DSP and VFP are required, but Arm docs say it is +# optional. So forcing below so that compiling works, but this should +# be fixed in GCC +AVAILTUNES += "cortexm33" +ARMPKGARCH_tune-cortexm33 = "cortexm33" +TUNE_FEATURES_tune-cortexm33 = "${TUNE_FEATURES_tune-armv8m-maine-vfpv5spd16} cortexm33" +PACKAGE_EXTRA_ARCHS_tune-cortexm33 = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-maine-vfpv5spd16} cortexm33e-fpv5-spd16"
meta-arm-bsp/conf/machine/include/tune-cortexm35p.inc +6 -4
@@ -1,15 +1,17 @@ # # Tune Settings for Cortex-M35P # -DEFAULTTUNE ?= "cortexm33p" +DEFAULTTUNE ?= "cortexm35p" TUNEVALID[cortexm35p] = "Enable Cortex-M35p specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm35p', ' -mcpu=cortex-m35p', '', d)}" require conf/machine/include/arm/arch-armv8m-main.inc - +# GCC thnks that DSP and VFP are required, but Arm docs say it is +# optional. So forcing below so that compiling works, but this should +# be fixed in GCC AVAILTUNES += "cortexm35p" ARMPKGARCH_tune-cortexm35p = "cortexm35p" -TUNE_FEATURES_tune-cortexm35p = "${TUNE_FEATURES_tune-armv8m-main} cortexm35p" -PACKAGE_EXTRA_ARCHS_tune-cortexm35p = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-main} cortexm35p" +TUNE_FEATURES_tune-cortexm35p = "${TUNE_FEATURES_tune-armv8m-maine-vfpv5spd16} cortexm35p" +PACKAGE_EXTRA_ARCHS_tune-cortexm35p = "${PACKAGE_EXTRA_ARCHS_tune-armv8m-maine-vfpv5spd16} cortexm35pe-fpv5-spd16"
meta-arm-bsp/conf/machine/include/tune-cortexm4.inc +0 -1
@@ -8,7 +8,6 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm4', ' -mcpu=cortex require conf/machine/include/arm/arch-armv7em.inc - AVAILTUNES += "cortexm4" ARMPKGARCH_tune-cortexm4 = "cortexm4" TUNE_FEATURES_tune-cortexm4 = "${TUNE_FEATURES_tune-armv7em} cortexm4"
meta-arm-bsp/conf/machine/include/tune-cortexm55.inc +0 -1
@@ -8,7 +8,6 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm55', ' -mcpu=corte require conf/machine/include/arm/arch-armv8-1m-main.inc - AVAILTUNES += "cortexm55" ARMPKGARCH_tune-cortexm55 = "cortexm55" TUNE_FEATURES_tune-cortexm55 = "${TUNE_FEATURES_tune-armv8-1m-main} cortexm55"
meta-arm-bsp/conf/machine/include/tune-cortexm7.inc +0 -1
@@ -8,7 +8,6 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexm7', ' -mcpu=cortex require conf/machine/include/arm/arch-armv7em.inc - AVAILTUNES += "cortexm7" ARMPKGARCH_tune-cortexm7 = "cortexm7" TUNE_FEATURES_tune-cortexm7 = "${TUNE_FEATURES_tune-armv7em} cortexm7"
meta-arm-bsp/conf/machine/musca-b1.conf +1 -0
@@ -7,6 +7,7 @@ EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-m" PREFERRED_VERSION_trusted-firmware-m = "1.0" +DEFAULTTUNE ?= "armv8m-main" require conf/machine/include/tune-cortexm33.inc # GLIBC will not work with Cortex-M.
Signature · 1 line
2.17.1
PATCH 1/1 arm-bsp: convert general u-boot bbappend to version specific
The generic u-boot bbappend is causing issues upstream when trying to use new or older versions of u-boot, by trying to apply patches from folders that do not exist.
---
.../0001-arm-Add-corstone700-platform.patch | 0
...02-boot-add-bootx-command-to-start-XiP-images.patch | 0
...t-starting-the-XIP-kernel-using-bootx-command.patch | 0
.../0004-arm-enabling-the-arch_timer-driver.patch | 0
.../recipes-bsp/u-boot/u-boot_2020.04.bbappend | 8 ++++++++
.../{u-boot_%.bbappend => u-boot_2020.07.bbappend} | 10 ----------
6 files changed, 8 insertions(+), 10 deletions(-)
rename meta-arm-bsp/recipes-bsp/u-boot/{files => u-boot-2020.04}/corstone700/0001-arm-Add-corstone700-platform.patch (100%)
rename meta-arm-bsp/recipes-bsp/u-boot/{files => u-boot-2020.04}/corstone700/0002-boot-add-bootx-command-to-start-XiP-images.patch (100%)
rename meta-arm-bsp/recipes-bsp/u-boot/{files => u-boot-2020.04}/corstone700/0003-boot-starting-the-XIP-kernel-using-bootx-command.patch (100%)
rename meta-arm-bsp/recipes-bsp/u-boot/{files => u-boot-2020.04}/corstone700/0004-arm-enabling-the-arch_timer-driver.patch (100%)
create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot_2020.04.bbappend
rename meta-arm-bsp/recipes-bsp/u-boot/{u-boot_%.bbappend => u-boot_2020.07.bbappend} (66%)meta-arm-bsp/recipes-bsp/u-boot/u-boot-2020.04/corstone700/0001-arm-Add-corstone700-platform.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/files/corstone700/0001-arm-Add-corstone700-platform.patch +0 -0
meta-arm-bsp/recipes-bsp/u-boot/u-boot-2020.04/corstone700/0002-boot-add-bootx-command-to-start-XiP-images.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/files/corstone700/0002-boot-add-bootx-command-to-start-XiP-images.patch +0 -0
meta-arm-bsp/recipes-bsp/u-boot/u-boot-2020.04/corstone700/0003-boot-starting-the-XIP-kernel-using-bootx-command.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/files/corstone700/0003-boot-starting-the-XIP-kernel-using-bootx-command.patch +0 -0
meta-arm-bsp/recipes-bsp/u-boot/u-boot-2020.04/corstone700/0004-arm-enabling-the-arch_timer-driver.patch renamed from meta-arm-bsp/recipes-bsp/u-boot/files/corstone700/0004-arm-enabling-the-arch_timer-driver.patch +0 -0
meta-arm-bsp/recipes-bsp/u-boot/u-boot_2020.04.bbappend new file +8 -0
@@ -0,0 +1,8 @@ +# +# Corstone700 KMACHINE +# +FILESEXTRAPATHS_prepend_corstone700 := "${THISDIR}/${BP}/corstone700:" +SRC_URI_append_corstone700 = " file://0001-arm-Add-corstone700-platform.patch \ + file://0002-boot-add-bootx-command-to-start-XiP-images.patch \ + file://0003-boot-starting-the-XIP-kernel-using-bootx-command.patch \ + file://0004-arm-enabling-the-arch_timer-driver.patch"
meta-arm-bsp/recipes-bsp/u-boot/u-boot_2020.07.bbappend renamed from meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend +0 -10
@@ -35,13 +35,3 @@ SRC_URI_append_juno = " file://u-boot_vexpress_uenv.patch" # Total Compute KMACHINE # SRC_URI_append_tc0 = " file://0001-Add-support-for-Total-Compute.patch" - -# -# Corstone700 KMACHINE -# -FILESEXTRAPATHS_prepend_corstone700 := "${THISDIR}/files/corstone700:" - -SRC_URI_append_corstone700 = " file://0001-arm-Add-corstone700-platform.patch \ - file://0002-boot-add-bootx-command-to-start-XiP-images.patch \ - file://0003-boot-starting-the-XIP-kernel-using-bootx-command.patch \ - file://0004-arm-enabling-the-arch_timer-driver.patch"
Signature · 1 line
2.17.1
Re: [meta-arm] [PATCH] arm-bsp: convert general u-boot bbappend to version specific
Quoted 4 lines · Jon Mason
The generic u-boot bbappend is causing issues upstream when trying to use new or older versions of u-boot, by trying to apply patches from folders that do not exist.
Quoted 8 lines
Change-Id I399e3234fba852382fc73ab68f14a7e826bb5a42Signed-off-by Jon Mason <[email protected]>--- .../0001-arm-Add-corstone700-platform.patch | 0 ...02-boot-add-bootx-command-to-start-XiP-images.patch | 0 ...t-starting-the-XIP-kernel-using-bootx-command.patch | 0 .../0004-arm-enabling-the-arch_timer-driver.patch | 0 .../recipes-bsp/u-boot/u-boot_2020.04.bbappend | 8 ++++++++
Thanks for this, it did resolve an error we were seeing on the autobuilder. Unfortunately it is still generating a warning:
https://autobuilder.yoctoproject.org/typhoon/#/builders/113/builds/427
Cheers,
Richard
Re: [meta-arm] [PATCH] arm-bsp: convert general u-boot bbappend to version specific
Quoted 14 lines · Richard Purdie
Quoted 4 lines · Jon Mason
The generic u-boot bbappend is causing issues upstream when trying to use new or older versions of u-boot, by trying to apply patches from folders that do not exist.
Quoted 8 lines
Change-Id I399e3234fba852382fc73ab68f14a7e826bb5a42Signed-off-by Jon Mason <[email protected]>--- .../0001-arm-Add-corstone700-platform.patch | 0 ...02-boot-add-bootx-command-to-start-XiP-images.patch | 0 ...t-starting-the-XIP-kernel-using-bootx-command.patch | 0 .../0004-arm-enabling-the-arch_timer-driver.patch | 0 .../recipes-bsp/u-boot/u-boot_2020.04.bbappend | 8 ++++++++
Quoted 4 lines
Thanks for this, it did resolve an error we were seeing on the autobuilder. Unfortunately it is still generating a warning:
https://autobuilder.yoctoproject.org/typhoon/#/builders/113/builds/427
I've traded one u-boot problem for another. I think the best way to handle this is to create a recipe in master for 2020.07. This will fix master, but have redundant recipes on gatesgarth. So, I'll wait to push this until after we fork the gatesgarth branch, which I am hopeful will be this week (as we are waiting on patches that were promised last week to fix a bug). This would be a temporary solution, as I want meta-arm-bsp off of that 2020.07 u-boot ASAP. Also, I'll do the patch now so that it can be staged to go in as soon as the branch is forked.
Thanks,
Jon
Quoted 10 lines
Cheers,
Richard