Skip to contentSkip to conversation

imx-base.inc: Enable thumb2 and vfp capability

PATCH In review Khem Raj 3 participants 8 messages May 27, 2015 – May 29, 2015 Arm i.MX and Layerscape

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 imx-base.inc: Enable thumb2 and vfp capability

MX6 SoCs have VFP unit and also support thumb2 ISA
This patch makes the default machine tunes aware of thumb2 and VFP.

The ISA for code generation still remains as it was before this patch, in addition it now offers different ISA options to OE distributions e.g thumb2, mixed (Thumb2/ARM) or ARM (default)

Discussions which resulted in this patch are here [1]

[1] https://lists.yoctoproject.org/pipermail/meta-freescale/2015-May/013904.html

---
 conf/machine/include/imx-base.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
conf/machine/include/imx-base.inc +5 -3
index 5683041..d80ca46 100644
@@ -30,11 +30,13 @@ PREFERRED_VERSION_directfb_mx6 = "1.7.4"
 # Ship kernel modules
 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
-# Float-Point setting
+# Defaults is to show thumb2, VFP and Neon
+# capabilities
+# Float-Point ABI setting
 # handled by software
-# DEFAULTTUNE_mx6 ?= "cortexa9-neon"
+# DEFAULTTUNE_mx6 ?= "cortexa9t2-vfp-neon"
 # handled by hardware
-DEFAULTTUNE_mx6 ?= "cortexa9hf-neon"
+DEFAULTTUNE_mx6 ?= "cortexa9t2hf-vfp-neon"
 
 # Sub-architecture support
 MACHINE_SOCARCH_SUFFIX ?= ""
Signature · 1 line
2.1.4
#1 lore raw
Quoted 40 lines · Khem Raj

MX6 SoCs have VFP unit and also support thumb2 ISA
This patch makes the default machine tunes aware of thumb2 and VFP.

The ISA for code generation still remains as it was before this patch, in addition it now offers different ISA options to OE distributions e.g thumb2, mixed (Thumb2/ARM) or ARM (default)

Discussions which resulted in this patch are here [1]

[1] https://lists.yoctoproject.org/pipermail/meta-freescale/2015-May/013904.html

---
 conf/machine/include/imx-base.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
conf/machine/include/imx-base.inc +5 -4
index 5683041..d80ca46 100644
@@ -30,11 +30,13 @@ PREFERRED_VERSION_directfb_mx6 = "1.7.4"
 # Ship kernel modules
 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
-# Float-Point setting
+# Defaults is to show thumb2, VFP and Neon
+# capabilities
+# Float-Point ABI setting
 # handled by software
-# DEFAULTTUNE_mx6 ?= "cortexa9-neon"
+# DEFAULTTUNE_mx6 ?= "cortexa9t2-vfp-neon"
 # handled by hardware
-DEFAULTTUNE_mx6 ?= "cortexa9hf-neon"
+DEFAULTTUNE_mx6 ?= "cortexa9t2hf-vfp-neon"
 
 # Sub-architecture support
 MACHINE_SOCARCH_SUFFIX ?= ""
--

2.1.4

Quoted 1 line

--

Instead discussing commit message: this patch breaks parsing with

ERROR: OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the
checker (see sanity.conf).
Following is the list of potential problems / advisories:

Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH
(${ARMPKGARCH_tune-cortexa9t2hf-vfp-neon}).Toolchain tunings invalid:
Tuning 'cortexa9t2hf-vfp-neon' has no defined features, and cannot be used.

A look into oe-core meta/conf/machine/include/tune-cortexa9.inc / line

PACKAGE_EXTRA_ARCHS_tune-cortexa9thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa9hf-vfp cortexa9hf-vfp-neon cortexa9t2hf-vfp cortexa9t2hf-vfp-neon"

makes me say "my patch is nicer" :)

Andreas

author
#2 lore raw
Quoted 5 lines · Andreas Müller
Quoted 3 lines · Khem Raj

MX6 SoCs have VFP unit and also support thumb2 ISA
This patch makes the default machine tunes aware of thumb2 and VFP.

Quoted 7 lines
Quoted 7 lines

The ISA for code generation still remains as it was before this patch, in addition it now offers different ISA options to OE distributions e.g thumb2, mixed (Thumb2/ARM) or ARM (default)

Discussions which resulted in this patch are here [1]

[1]

https://lists.yoctoproject.org/pipermail/meta-freescale/2015-May/013904.html

Quoted 7 lines

Review

Quoted 7 lines
---
 conf/machine/include/imx-base.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/conf/machine/include/imx-base.inc

Quoted 23 lines
Quoted 23 lines

index 5683041..d80ca46 100644

conf/machine/include/imx-base.inc +5 -4
@@ -30,11 +30,13 @@ PREFERRED_VERSION_directfb_mx6 = "1.7.4"
 # Ship kernel modules
 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
-# Float-Point setting
+# Defaults is to show thumb2, VFP and Neon
+# capabilities
+# Float-Point ABI setting
 # handled by software
-# DEFAULTTUNE_mx6 ?= "cortexa9-neon"
+# DEFAULTTUNE_mx6 ?= "cortexa9t2-vfp-neon"
 # handled by hardware
-DEFAULTTUNE_mx6 ?= "cortexa9hf-neon"
+DEFAULTTUNE_mx6 ?= "cortexa9t2hf-vfp-neon"
 
 # Sub-architecture support
 MACHINE_SOCARCH_SUFFIX ?= ""
--

2.1.4

Quoted 4 lines
Quoted 1 line

--

Instead discussing commit message: this patch breaks parsing with

ERROR: OE-core's config sanity checker detected a potential

misconfiguration.

Quoted 7 lines

Either fix the cause of this error or at your own risk disable the
checker (see sanity.conf).
Following is the list of potential problems / advisories:

Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH
(${ARMPKGARCH_tune-cortexa9t2hf-vfp-neon}).Toolchain tunings invalid:
Tuning 'cortexa9t2hf-vfp-neon' has no defined features, and cannot be

used.

Quoted 8 lines

A look into oe-core meta/conf/machine/include/tune-cortexa9.inc / line

PACKAGE_EXTRA_ARCHS_tune-cortexa9thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa9hf-vfp cortexa9hf-vfp-neon cortexa9t2hf-vfp cortexa9t2hf-vfp-neon"

makes me say "my patch is nicer" :

Yes just see if you can add vfp to it
I think oe-core needs fixing probably for t2 case meanwhile we can live with it.

Quoted 2 lines

Andreas

#3 lore raw
Quoted 4 lines · Khem Raj

Yes just see if you can add vfp to it
I think oe-core needs fixing probably for t2 case meanwhile we can live with it.

??? - sorry you lost me here. Just a note: Working with angstrom (enabling thumb(2))) leads to many packages with vfp/thumb2. What change do you have in mind?

Andreas

author
#4 lore raw
Quoted 9 lines · Andreas Müller
Quoted 4 lines · Khem Raj

Yes just see if you can add vfp to it
I think oe-core needs fixing probably for t2 case meanwhile we can live with it.

??? - sorry you lost me here. Just a note: Working with angstrom (enabling thumb(2))) leads to many packages with vfp/thumb2. What change do you have in mind?

because in angstrom we change to use t2 when you have 't' in incoming tunes and the processor supports
t2 thats why you see what you see. So when you just use 't' it all works out. However OE-Core should not
freak out when we use 't2' since thats a valid combination. Hope that helps you

Quoted 1 line

Andreas

#5 lore raw

Hi

Quoted 13 lines · Khem Raj
Quoted 9 lines · On Wed, May 27, 2015 at 3:28 PM, Andreas Müller <schnitzeltony <at>…
Quoted 4 lines · On Wed, May 27, 2015 at 11:49 PM, Khem Raj <raj.khem <at> gmail.com> wrote:

Yes just see if you can add vfp to it
I think oe-core needs fixing probably for t2 case meanwhile we can live with it.

??? - sorry you lost me here. Just a note: Working with angstrom (enabling thumb(2))) leads to many packages with vfp/thumb2. What change do you have in mind?

Quoted 5 lines

because in angstrom we change to use t2 when you have 't' in incoming tunes and the processor supports
t2 thats why you see what you see. So when you just use 't' it all works out. However OE-Core should not
freak out when we use 't2' since thats a valid combination. Hope that

helps you

Quoted 2 lines
Quoted 2 lines

Andreas

I believe that DEFAULTTUNE must be set to one of the AVAILTUNES from oe-core.
http://cgit.openembedded.org/openembedded-core/tree/meta/conf/machine/include/arm/arch-armv7a.inc#n27

For the i.MX 6 that would be armv7at-neon and armv7athf-neon. (note the missing 2 and vfp)

arch-armv7a.inc will then add thumb vfp and neon to the TUNE_FEATURES, so the patch should read:
-# DEFAULTTUNE_mx6 ?= "cortexa9-neon"
+# DEFAULTTUNE_mx6 ?= "cortexa9t-neon"

 # handled by hardware
-DEFAULTTUNE_mx6 ?= "cortexa9hf-neon"
+DEFAULTTUNE_mx6 ?= "cortexa9thf-neon"

thumb vs. thumb2 is chosen by gcc form the -mcpu, -march arguments.

That oe-core uses t for thumb in AVAILTUNES for arm archs which supports thumb or thumb2, but does use t and t2 in the package feed names is a bit confusing but IMHO not warranting a change in oe-core breaking a lot of BSP layers in the process.

Regards
Max

#6 lore raw
Quoted 42 lines · Max Krummenacher

Hi

Quoted 13 lines · Khem Raj
Quoted 9 lines · On Wed, May 27, 2015 at 3:28 PM, Andreas Müller <schnitzeltony <at>…
Quoted 4 lines · On Wed, May 27, 2015 at 11:49 PM, Khem Raj <raj.khem <at> gmail.com> wrote:

Yes just see if you can add vfp to it
I think oe-core needs fixing probably for t2 case meanwhile we can live with it.

??? - sorry you lost me here. Just a note: Working with angstrom (enabling thumb(2))) leads to many packages with vfp/thumb2. What change do you have in mind?

Quoted 5 lines

because in angstrom we change to use t2 when you have 't' in incoming tunes and the processor supports
t2 thats why you see what you see. So when you just use 't' it all works out. However OE-Core should not
freak out when we use 't2' since thats a valid combination. Hope that

helps you

Quoted 2 lines
Quoted 2 lines

Andreas

I believe that DEFAULTTUNE must be set to one of the AVAILTUNES from oe-core.
http://cgit.openembedded.org/openembedded-core/tree/meta/conf/machine/include/arm/arch-armv7a.inc#n27

For the i.MX 6 that would be armv7at-neon and armv7athf-neon. (note the missing 2 and vfp)

arch-armv7a.inc will then add thumb vfp and neon to the TUNE_FEATURES, so the patch should read:

conf/machine/include/imx-base.inc +2 -2
-# DEFAULTTUNE_mx6 ?= "cortexa9-neon"
+# DEFAULTTUNE_mx6 ?= "cortexa9t-neon"
 # handled by hardware
-DEFAULTTUNE_mx6 ?= "cortexa9hf-neon"
+DEFAULTTUNE_mx6 ?= "cortexa9thf-neon"
Quoted 8 lines

thumb vs. thumb2 is chosen by gcc form the -mcpu, -march arguments.

That oe-core uses t for thumb in AVAILTUNES for arm archs which supports thumb or thumb2, but does use t and t2 in the package feed names is a bit confusing but IMHO not warranting a change in oe-core breaking a lot of BSP layers in the process.

Hi Max,

how about an Ack for the patch [1] doing exactly that ?

[1] https://lists.yoctoproject.org/pipermail/meta-freescale/2015-May/014042.html

Andreas

#7 lore raw

Hi

Am Freitag, den 29.05.2015, 18:18 +0200 schrieb Andreas Müller:

Quoted 7 lines
Quoted 5 lines · Andreas Müller

thanks to Khem Raj for helping hint & more

discussion found at [1]

[1]

https://lists.yoctoproject.org/pipermail/meta-freescale/2015-May/013904.html

Quoted 7 lines

Review

Quoted 7 lines
---
 conf/machine/include/imx-base.inc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/conf/machine/include/imx-base.inc

Quoted 9 lines

conf/machine/include/imx-base.inc PREFERRED_VERSION_directfb_mx6 = "1.7.4" · line 33

Quoted 9 lines

index 5683041..ee5492f 100644

conf/machine/include/imx-base.inc +1 -1
@@ -30,11 +30,14 @@ PREFERRED_VERSION_directfb_mx6 = "1.7.4"
 # Ship kernel modules
 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
-# Float-Point setting
+# Tunes for hard/soft float-point selection. Note that we allow

building for

Quoted 1 line

conf/machine/include/imx-base.inc PREFERRED_VERSION_directfb_mx6 = "1.7.4" · line 34

Quoted 1 line
conf/machine/include/imx-base.inc +1 -0
+# thumb support giving distros the chance to enable thumb by

setting

Quoted 7 lines
Quoted 7 lines
conf/machine/include/imx-base.inc +3 -2
+# ARM_INSTRUCTION_SET = "thumb"
+#
 # handled by software
-# DEFAULTTUNE_mx6 ?= "cortexa9-neon"
+# DEFAULTTUNE_mx6 ?= "cortexa9t-neon"
 # handled by hardware
-DEFAULTTUNE_mx6 ?= "cortexa9hf-neon"
Quoted 8 lines
Quoted 7 lines
conf/machine/include/imx-base.inc +1 -0
+DEFAULTTUNE_mx6 ?= "cortexa9thf-neon"

rpm/cortexa9t2hf_vfp_neon_mx6qdl
# Sub-architecture support
MACHINE_SOCARCH_SUFFIX ?= ""
--
1.9.3

ping

I built core-image-minimal with the patch.

Packages are created with the ARM ISA as expected.

When adding ARM_INSTRUCTION_SET = "thumb" to a recipe the packages are compiled with thumb and put into tmp/rpm/cortexa9t2hf_vfp_neon or rpm/cortexa9t2hf_vfp_neon_mx6qdl.

Regards
Max