ARM Cortex-M3 support
cover ARM Cortex-M3 support
A small patchset to add support for Cortex-M3 building. It allows to produce nice Buildroot-based rootfs, on MMUless MCUs such as NXP LPC Cortex-M3.
The work was originally started by Thomas, who kindly shared with us. Guido wrote the rest of the patches, and cleaned-up a bit the support to make it acceptable upstream.
I have tested it and it works fairly well on LPC43xx-based board, with 8 MiB of external SDRAM, which proved to be enough to get to a shell and run some commands. However, I had to tailor the Busybox configuration heavily to avoid memory depletion and the OOM assasin.
Comments welcome.
/*
* As an interesting trivia, this board is the result of the collective effort
* of Argentine universities and small companies to produce an industrial-grade
* open board. More info about the Linux port:
* http://www.proyecto-ciaa.com.ar/devwiki/doku.php?id=desarrollo:linux:linux_en_ciaa-nxp
* The links are in spanish, though.
*/
Guido Mart?nez (3):
arm: conditionally support regular ARM instructions
arm: update processor types
toolchain: allow for stupid toolchains
Thomas Petazzoni (1):
toolchain-external: add OSELAS 2013.12.2 Cortex-M3 toolchain
arch/Config.in | 8 +++---- arch/Config.in.arm | 28 +++++++++++++++++++++- toolchain/helpers.mk | 6 ++++- toolchain/toolchain-common.in | 6 +++-- toolchain/toolchain-external/Config.in | 16 +++++++++++++ .../toolchain-external/toolchain-external.hash | 3 +++ toolchain/toolchain-external/toolchain-external.mk | 11 +++++++++ 7 files changed, 70 insertions(+), 8 deletions(-)
Signature · 1 line
2.2.1
PATCH 1/4 arm: conditionally support regular ARM instructions
From: Guido Mart?nez <[email protected]>
Until now, all ARM processors supported the original ARM instructions. However, the Cortex-M variants don't support them, and support only Thumb/Thumb2 modes.
So, make a Kconfig option for ARM support and use it.
--- arch/Config.in.arm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
arch/Config.in.arm +22 -1
@@ -31,6 +31,9 @@ config BR2_ARM_CPU_HAS_VFPV4 bool select BR2_ARM_CPU_HAS_VFPV3 +config BR2_ARM_CPU_HAS_ARM + bool + config BR2_ARM_CPU_HAS_THUMB bool
@@ -58,83 +61,100 @@ choice config BR2_arm920t bool "arm920t" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV4 config BR2_arm922t bool "arm922t" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV4 config BR2_arm926t bool "arm926t" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_MAYBE_HAS_VFPV2 select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV5 config BR2_arm1136jf_s bool "arm1136jf-s" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_VFPV2 select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV6 config BR2_arm1176jz_s bool "arm1176jz-s" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV6 config BR2_arm1176jzf_s bool "arm1176jzf-s" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_VFPV2 select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV6 config BR2_cortex_a5 bool "cortex-A5" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_MAYBE_HAS_NEON select BR2_ARM_CPU_MAYBE_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A config BR2_cortex_a7 bool "cortex-A7" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A config BR2_cortex_a8 bool "cortex-A8" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV3 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A config BR2_cortex_a9 bool "cortex-A9" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_MAYBE_HAS_NEON select BR2_ARM_CPU_MAYBE_HAS_VFPV3 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A config BR2_cortex_a12 bool "cortex-A12" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A config BR2_cortex_a15 bool "cortex-A15" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_NEON select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A config BR2_fa526 bool "fa526/626" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_ARMV4 config BR2_pj4 bool "pj4" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_VFPV3 select BR2_ARM_CPU_ARMV7A config BR2_strongarm bool "strongarm sa110/sa1100" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_ARMV4 config BR2_xscale bool "xscale" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_HAS_THUMB select BR2_ARM_CPU_ARMV5 config BR2_iwmmxt bool "iwmmxt" + select BR2_ARM_CPU_HAS_ARM select BR2_ARM_CPU_ARMV5 endchoice
@@ -318,10 +338,11 @@ endchoice choice prompt "ARM instruction set" - depends on BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2 + depends on BR2_ARM_CPU_HAS_ARM || BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2 config BR2_ARM_INSTRUCTIONS_ARM_CHOICE bool "ARM" + depends on BR2_ARM_CPU_HAS_ARM help This option instructs the compiler to generate regular ARM instructions, that are all 32 bits wide.
Signature · 1 line
2.2.1
PATCH 1/4 arm: conditionally support regular ARM instructions
Hi Ezequiel,
Le 22/01/2015 19:33, Ezequiel Garcia a ?crit :
Quoted 10 lines
From: Guido Mart?nez <[email protected]>
Until now, all ARM processors supported the original ARM instructions. However, the Cortex-M variants don't support them, and support only Thumb/Thumb2 modes.
So, make a
Kconfigoption for ARM support and use it.Signed-off-by Guido Mart?nez <[email protected]>---
[...]
arch/Config.in.arm endchoice · line 341
Quoted 4 lines
choice
arch/Config.in.arm +1
-1prompt "ARM instruction set" - depends on BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2 + depends on BR2_ARM_CPU_HAS_ARM || BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2
This prompt is now always displayed, so the depends on can be removed.
arch/Config.in.arm endchoice · line 348
Quoted 8 lines
config
BR2_ARM_INSTRUCTIONS_ARM_CHOICEarch/Config.in.arm +1
-0bool "ARM" + depends on BR2_ARM_CPU_HAS_ARM help This option instructs the compiler to generate regular ARM instructions, that are all 32 bits wide.
Best regards,
Romain Naour
PATCH 1/4 arm: conditionally support regular ARM instructions
In reply to Ezequiel GarciaDear Ezequiel Garcia,
Quoted 6 lines · Ezequiel Garcia
From: Guido Mart?nez <[email protected]>
Until now, all ARM processors supported the original ARM instructions. However, the Cortex-M variants don't support them, and support only Thumb/Thumb2 modes.
Quoted 6 lines
So, make a
Kconfigoption for ARM support and use it.Signed-off-by Guido Mart?nez <[email protected]>--- arch/Config.in.arm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
I've applied this patch, after taking into account Romain's comment, and also after renaming BR2_ARM_INSTRUCTIONS_ARM_CHOICE to BR2_ARM_INSTRUCTIONS_ARM and removing the hidden option BR2_ARM_INSTRUCTIONS_ARM outside the choice.
From the commit log:
[Thomas:
- Remove the dependency in the choice between ARM/Thumb/Thumb-2, because basically the choice is now always visible.
- Replace the BR2_ARM_INSTRUCTIONS_ARM_CHOICE choice option directly by BR2_ARM_INSTRUCTIONS_ARM, instead of having this blind option defined separately. This means the choice is now always visible, even when only the ARM instruction set is supported.]
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/4 arm: update processor types
In reply to Ezequiel GarciaFrom: Guido Mart?nez <[email protected]>
Add the Cortex M3 variant. These microcontrollers don't support regular ARM instructions and don't have an MMU.
--- arch/Config.in | 8 ++++---- arch/Config.in.arm | 5 +++++ toolchain/toolchain-common.in | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-)
arch/Config.in +4 -4
@@ -258,13 +258,13 @@ config BR2_BINFMT_SUPPORTS_SHARED # Set up target binary format choice prompt "Target Binary Format" - default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k) + default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k || BR2_cortex_m3) default BR2_BINFMT_FDPIC if BR2_bfin - default BR2_BINFMT_FLAT if BR2_m68k + default BR2_BINFMT_FLAT if BR2_m68k || BR2_cortex_m3 config BR2_BINFMT_ELF bool "ELF" - depends on !BR2_bfin && !BR2_m68k + depends on !BR2_bfin && !BR2_m68k && !BR2_cortex_m3 select BR2_BINFMT_SUPPORTS_SHARED help ELF (Executable and Linkable Format) is a format for libraries and
@@ -283,7 +283,7 @@ config BR2_BINFMT_FDPIC config BR2_BINFMT_FLAT bool "FLAT" - depends on BR2_bfin || BR2_m68k + depends on BR2_bfin || BR2_m68k || BR2_cortex_m3 help FLAT binary is a relatively simple and lightweight executable format based on the original a.out format. It is widely used in environment
arch/Config.in.arm +5 -0
@@ -134,6 +134,10 @@ config BR2_cortex_a15 select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A +config BR2_cortex_m3 + bool "cortex-M3" + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_HAS_THUMB2 config BR2_fa526 bool "fa526/626" select BR2_ARM_CPU_HAS_ARM
@@ -396,6 +400,7 @@ config BR2_GCC_TARGET_CPU default "cortex-a9" if BR2_cortex_a9 default "cortex-a12" if BR2_cortex_a12 default "cortex-a15" if BR2_cortex_a15 + default "cortex-m3" if BR2_cortex_m3 default "fa526" if BR2_fa526 default "marvell-pj4" if BR2_pj4 default "strongarm" if BR2_strongarm
toolchain/toolchain-common.in +4 -2
@@ -114,8 +114,10 @@ config BR2_NEEDS_GETTEXT_IF_LOCALE default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE) config BR2_USE_MMU - bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa - default y if !BR2_bfin + bool "Enable MMU support" + depends on BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa + depends on !BR2_cortex_m3 && !BR2_bfin + default y help If your target has a MMU, you should say Y here. If you are unsure, just say Y.
Signature · 1 line
2.2.1
PATCH 2/4 arm: update processor types
Hi Ezequiel,
Le 22/01/2015 19:33, Ezequiel Garcia a ?crit :
Quoted 17 lines
From: Guido Mart?nez <[email protected]>
Add the Cortex M3 variant. These microcontrollers don't support regular ARM instructions and don't have an MMU.
Signed-off-by Guido Mart?nez <[email protected]>--- arch/Config.in | 8 ++++---- arch/Config.in.arm | 5 +++++ toolchain/toolchain-common.in | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-)arch/Config.in +0
-0
arch/Config.in config BR2_BINFMT_SUPPORTS_SHARED · line 263
Quoted 8 lines
arch/Config.in +2
-2@@ -258,13 +258,13 @@ config BR2_BINFMT_SUPPORTS_SHARED # Set up target binary format choice prompt "Target Binary Format" - default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k) + default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k || BR2_cortex_m3) default BR2_BINFMT_FDPIC if BR2_bfin - default BR2_BINFMT_FLAT if BR2_m68k + default BR2_BINFMT_FLAT if BR2_m68k || BR2_cortex_m3
What do you think about adding BR2_ARCH_HAS_EFL_SUPPORT in each architecture Config.in.x instead of black-listing them here ?
Quoted 9 lines
arch/Config.in +1
-1config BR2_BINFMT_ELF bool "ELF" - depends on !BR2_bfin && !BR2_m68k + depends on !BR2_bfin && !BR2_m68k && !BR2_cortex_m3 select BR2_BINFMT_SUPPORTS_SHARED help ELF (Executable and Linkable Format) is a format for libraries and
arch/Config.in config BR2_BINFMT_FDPIC · line 286
Quoted 5 lines
arch/Config.in +1
-1@@ -283,7 +283,7 @@ config BR2_BINFMT_FDPIC config BR2_BINFMT_FLAT bool "FLAT" - depends on BR2_bfin || BR2_m68k + depends on BR2_bfin || BR2_m68k || BR2_cortex_m3
Same here with BR2_ARCH_HAS_FLAT_SUPPORT.
Quoted 31 lines
arch/Config.in +0
-0help FLAT binary is a relatively simple and lightweight executable format based on the original a.out format. It is widely used in environmentarch/Config.in.arm +5
-0@@ -134,6 +134,10 @@ config BR2_cortex_a15 select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A +config BR2_cortex_m3 + bool "cortex-M3" + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_HAS_THUMB2 config BR2_fa526 bool "fa526/626" select BR2_ARM_CPU_HAS_ARM@@ -396,6 +400,7 @@ config BR2_GCC_TARGET_CPU default "cortex-a9" if BR2_cortex_a9 default "cortex-a12" if BR2_cortex_a12 default "cortex-a15" if BR2_cortex_a15 + default "cortex-m3" if BR2_cortex_m3 default "fa526" if BR2_fa526 default "marvell-pj4" if BR2_pj4 default "strongarm" if BR2_strongarmtoolchain/toolchain-common.in +0
-0
toolchain/toolchain-common.in config BR2_NEEDS_GETTEXT_IF_LOCALE · line 120
Quoted 9 lines
toolchain/toolchain-common.in +4
-2@@ -114,8 +114,10 @@ config BR2_NEEDS_GETTEXT_IF_LOCALE default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE) config BR2_USE_MMU - bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa - default y if !BR2_bfin + bool "Enable MMU support" + depends on BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa + depends on !BR2_cortex_m3 && !BR2_bfin + default y
And here with BR2_ARCH_HAS_MMU_SUPPORT ?
toolchain/toolchain-common.in config BR2_NEEDS_GETTEXT_IF_LOCALE · line 123
Quoted 4 lines
toolchain/toolchain-common.in +0
-0help If your target has a MMU, you should say Y here. If you are unsure, just say Y.
Best regards,
Romain Naour
PATCH 2/4 arm: update processor types
Quoted 82 lines · Romain Naour
Hi Ezequiel,
Le 22/01/2015 19:33, Ezequiel Garcia a ?crit :
Quoted 17 lines
From: Guido Mart?nez <[email protected]>
Add the Cortex M3 variant. These microcontrollers don't support regular ARM instructions and don't have an MMU.
Signed-off-by Guido Mart?nez <[email protected]>--- arch/Config.in | 8 ++++---- arch/Config.in.arm | 5 +++++ toolchain/toolchain-common.in | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-)arch/Config.in +0
-0arch/Config.in config BR2_BINFMT_SUPPORTS_SHARED · line 263
Quoted 8 lines
arch/Config.in +2
-2@@ -258,13 +258,13 @@ config BR2_BINFMT_SUPPORTS_SHARED # Set up target binary format choice prompt "Target Binary Format" - default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k) + default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k || BR2_cortex_m3) default BR2_BINFMT_FDPIC if BR2_bfin - default BR2_BINFMT_FLAT if BR2_m68k + default BR2_BINFMT_FLAT if BR2_m68k || BR2_cortex_m3What do you think about adding
BR2_ARCH_HAS_EFL_SUPPORTin each architecture Config.in.x instead of black-listing them here ?Quoted 9 lines
arch/Config.in +1
-1config BR2_BINFMT_ELF bool "ELF" - depends on !BR2_bfin && !BR2_m68k + depends on !BR2_bfin && !BR2_m68k && !BR2_cortex_m3 select BR2_BINFMT_SUPPORTS_SHARED help ELF (Executable and Linkable Format) is a format for libraries andarch/Config.in config BR2_BINFMT_FDPIC · line 286
Quoted 5 lines
arch/Config.in +1
-1@@ -283,7 +283,7 @@ config BR2_BINFMT_FDPIC config BR2_BINFMT_FLAT bool "FLAT" - depends on BR2_bfin || BR2_m68k + depends on BR2_bfin || BR2_m68k || BR2_cortex_m3Same here with
BR2_ARCH_HAS_FLAT_SUPPORT.Quoted 33 lines
arch/Config.in +0
-0help FLAT binary is a relatively simple and lightweight executable format based on the original a.out format. It is widely used in environmentarch/Config.in.arm +5
-0@@ -134,6 +134,10 @@ config BR2_cortex_a15 select BR2_ARM_CPU_HAS_VFPV4 select BR2_ARM_CPU_HAS_THUMB2 select BR2_ARM_CPU_ARMV7A +config BR2_cortex_m3 + bool "cortex-M3" + select BR2_ARM_CPU_HAS_THUMB + select BR2_ARM_CPU_HAS_THUMB2 config BR2_fa526 bool "fa526/626" select BR2_ARM_CPU_HAS_ARM@@ -396,6 +400,7 @@ config BR2_GCC_TARGET_CPU default "cortex-a9" if BR2_cortex_a9 default "cortex-a12" if BR2_cortex_a12 default "cortex-a15" if BR2_cortex_a15 + default "cortex-m3" if BR2_cortex_m3 default "fa526" if BR2_fa526 default "marvell-pj4" if BR2_pj4 default "strongarm" if BR2_strongarmtoolchain/toolchain-common.in +0
-0@@ -114,8 +114,10 @@ config BR2_NEEDS_GETTEXT_IF_LOCALE default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
Quoted 10 lines
toolchain/toolchain-common.in config BR2_NEEDS_GETTEXT_IF_LOCALE · line 120
Quoted 7 lines
toolchain/toolchain-common.in +4
-2config BR2_USE_MMU - bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa - default y if !BR2_bfin + bool "Enable MMU support" + depends on BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa + depends on !BR2_cortex_m3 && !BR2_bfin + default yAnd here with
BR2_ARCH_HAS_MMU_SUPPORT?
Hm.. shouldn't that be, BR2_ARCH_HAS_OPTIONAL_MMU or something ?
At least that's what it seems: only some architectures expose the build time config to disable MMU.
Signature · 2 lines
Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar
PATCH 2/4 arm: update processor types
Hi Ezequiel,
[snip]
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
toolchain/toolchain-common.in +0
-0@@ -114,8 +114,10 @@ config BR2_NEEDS_GETTEXT_IF_LOCALE default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
Quoted 10 lines
Quoted 10 lines
toolchain/toolchain-common.in config BR2_NEEDS_GETTEXT_IF_LOCALE · line 120
Quoted 7 lines
toolchain/toolchain-common.in +4
-2config BR2_USE_MMU - bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa - default y if !BR2_bfin + bool "Enable MMU support" + depends on BR2_arm || BR2_armeb || BR2_sh || BR2_xtensa + depends on !BR2_cortex_m3 && !BR2_bfin + default yAnd here with
BR2_ARCH_HAS_MMU_SUPPORT?
Sorry for the delay...
Quoted 6 lines
Hm.. shouldn't that be,
BR2_ARCH_HAS_OPTIONAL_MMUor something ?At least that's what it seems: only some architectures expose the build time config to disable MMU.
I think we need BR2_ARCH_HAS_MMU_SUPPORT if there is an MMU in the CPU and BR2_ARCH_HAS_OPTIONAL_MMU if the MMU can be disabled.
The BR2_ARCH_HAS_OPTIONAL_MMU should automatically select BR2_ARCH_HAS_MMU_SUPPORT when set to y.
Then BR2_arm, BR2_armeb, BR2_sh and BR2_xtensa should select BR2_ARCH_HAS_OPTIONAL_MMU.
And all other architecture should select BR2_ARCH_HAS_MMU_SUPPORT except BR2_bfin and BR2_cortex_m3.
So BR2_USE_MMU look like this:
config BR2_USE_MMU
boot "Enable MMU support" if BR2_ARCH_HAS_OPTIONAL_MMU default y if BR2_ARCH_HAS_MMU_SUPPORT
When looking again at your patch, there is an error when another architecture like i386 is selected.BR2_USE_MMU must be set to y in that case.
What do you think ?
Best regards,
Romain
PATCH 2/4 arm: update processor types
In reply to Romain NaourHi Romain,
First of all, thanks for the great feedback.
On 02/02/2015 01:18 PM, Romain Naour wrote:
[..]
Quoted 6 lines
arch/Config.in config BR2_BINFMT_SUPPORTS_SHARED · line 263
Quoted 2 lines
arch/Config.in +1
-1- default BR2_BINFMT_FLAT if BR2_m68k + default BR2_BINFMT_FLAT if BR2_m68k || BR2_cortex_m3What do you think about adding
BR2_ARCH_HAS_EFL_SUPPORTin each architecture Config.in.x instead of black-listing them here ?
I've been thinking about this. At first it seemed like a good idea, but then I realised that Cortex-M3 is not really an architecture, but a variant.
Introducing BR2_ARCH_HAS_ELF_SUPPORT would mean selecting it on almost each architecture and almost each of the ARM variants, except Cortex-M3.
So, it seems like it would be an elegant way of doing this, but I'm not sure it's worth such an invasive change.
Signature · 2 lines
Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar
PATCH 2/4 arm: update processor types
Hi Ezequiel,
Le 07/02/2015 20:47, Ezequiel Garcia a ?crit :
Quoted 3 lines
Hi Romain,
First of all, thanks for the great feedback.
You're welcome :)
Quoted 14 lines · Romain Naour
[..]
Quoted 6 lines
arch/Config.in config BR2_BINFMT_SUPPORTS_SHARED · line 263
Quoted 2 lines
arch/Config.in +1
-1- default BR2_BINFMT_FLAT if BR2_m68k + default BR2_BINFMT_FLAT if BR2_m68k || BR2_cortex_m3What do you think about adding
BR2_ARCH_HAS_EFL_SUPPORTin each architecture Config.in.x instead of black-listing them here ?I've been thinking about this. At first it seemed like a good idea, but then I realised that Cortex-M3 is not really an architecture, but a variant.
Quoted 6 lines
Introducing
BR2_ARCH_HAS_ELF_SUPPORTwould mean selecting it on almost each architecture and almost each of the ARM variants, except Cortex-M3.So, it seems like it would be an elegant way of doing this, but I'm not sure it's worth such an invasive change.
We may introduce BR2_ARCH_HAS_ELF_SUPPORT as an hidden option which is set to y by default except for BR2_bfin, BR2_m68k and BR2_cortex_m3. (like for BR2_USE_MMU)
config BR2_ARCH_HAS_ELF_SUPPORT
bool default y if !(BR2_bfin || BR2_m68k || BR2_cortex_m3)
What other developer think ?
Best regards,
Romain
PATCH 3/4 toolchain: allow for stupid toolchains
In reply to Ezequiel GarciaFrom: Guido Mart?nez <[email protected]>
check_arm_abi builds a test C file to check that the toolchain is working correctly, with the output redirected to /dev/null.
However, some toolchains (OSELAS 2013.12.2, for instance) foolishly append ".gdb" to the output filename for an intermediate file, causing an attempt to write to /dev/null.gdb, which obviously fails.
Fix this by adding an option to skip this check, so it can be selected in the OSELAS toolchain.
--- toolchain/helpers.mk | 6 +++++- toolchain/toolchain-external/Config.in | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-)
toolchain/helpers.mk +5 -1
@@ -297,13 +297,17 @@ check_arm_abi = \ if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \ echo "External toolchain uses the unsuported OABI" ; \ exit 1 ; \ - fi ; \ + fi + +ifneq ($(BR2_ARM_TOOLCHAIN_SKIP_CHECK),y) +check_arm_abi += ; \ if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - ; then \ abistr_$(BR2_ARM_EABI)='EABI'; \ abistr_$(BR2_ARM_EABIHF)='EABIhf'; \ echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \ exit 1 ; \ fi +endif # # Check that the external toolchain supports C++
toolchain/toolchain-external/Config.in +4 -0
@@ -1,5 +1,9 @@ if BR2_TOOLCHAIN_EXTERNAL +config BR2_ARM_TOOLCHAIN_SKIP_CHECK + bool + default n + choice prompt "Toolchain"
Signature · 1 line
2.2.1
PATCH 3/4 toolchain: allow for stupid toolchains
Dear Ezequiel Garcia,
Quoted 5 lines · Ezequiel Garcia
From: Guido Mart?nez <[email protected]>
check_arm_abibuilds a test C file to check that the toolchain is working correctly, with the output redirected to/dev/null.
Quoted 8 lines
However, some toolchains (OSELAS 2013.12.2, for instance) foolishly append ".gdb" to the output filename for an intermediate file, causing an attempt to write to
/dev/null.gdb, which obviously fails.Fix this by adding an option to skip this check, so it can be selected in the OSELAS toolchain.
Signed-off-by Guido Mart?nez <[email protected]>
Instead of skipping the check, can we fix the check instead? Like outputting to a temporary file, and removing it afterward, or something like that?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/4 toolchain: allow for stupid toolchains
In reply to Ezequiel GarciaHi Ezequiel,
Le 22/01/2015 19:33, Ezequiel Garcia a ?crit :
Quoted 29 lines
From: Guido Mart?nez <[email protected]>
check_arm_abibuilds a test C file to check that the toolchain is working correctly, with the output redirected to/dev/null.However, some toolchains (OSELAS 2013.12.2, for instance) foolishly append ".gdb" to the output filename for an intermediate file, causing an attempt to write to
/dev/null.gdb, which obviously fails.Fix this by adding an option to skip this check, so it can be selected in the OSELAS toolchain.
Signed-off-by Guido Mart?nez <[email protected]>--- toolchain/helpers.mk | 6 +++++- toolchain/toolchain-external/Config.in | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-)toolchain/helpers.mk +2
-1@@ -297,13 +297,17 @@ check_arm_abi = \ if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \ echo "External toolchain uses the unsuported OABI" ; \ exit 1 ; \ - fi ; \ + fi +
toolchain/helpers.mk check_arm_abi = \ · line 311
Quoted 10 lines
toolchain/helpers.mk +3
-0+ifneq ($(BR2_ARM_TOOLCHAIN_SKIP_CHECK),y) +check_arm_abi += ; \ if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - ; then \ abistr_$(BR2_ARM_EABI)='EABI'; \ abistr_$(BR2_ARM_EABIHF)='EABIhf'; \ echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \ exit 1 ; \ fi +endif
I looked at this issue and tried to avoid the use of /dev/null.gdb ... In the Cortex-M toolchain, it seems to have a wrapper around the linker like this one [1] which append the .gdb suffix.
However, there is no error if "-Wl,-r" (Generate relocatable output) is added in the gcc's command line but it's not really nice solution because this option will be there for other toolchains.
Yann proposed to use $BUILD_DIR/br-foo instead of /dev/null and add a comment why we do that.
What do you think ?
I'm Cc Yann.
[1] https://github.com/m-labs/elf2flt-lm32/blob/master/ld-elf2flt.in
Best regards,
Romain Naour
PATCH 3/4 toolchain: allow for stupid toolchains
Ezequiel, Romain, All,
On 2015-02-02 17:18 +0100, Romain Naour spake thusly:
Quoted 45 lines
Le 22/01/2015 19:33, Ezequiel Garcia a ?crit :
Quoted 29 lines
From: Guido Mart?nez <[email protected]>
check_arm_abibuilds a test C file to check that the toolchain is working correctly, with the output redirected to/dev/null.However, some toolchains (OSELAS 2013.12.2, for instance) foolishly append ".gdb" to the output filename for an intermediate file, causing an attempt to write to
/dev/null.gdb, which obviously fails.Fix this by adding an option to skip this check, so it can be selected in the OSELAS toolchain.
Signed-off-by Guido Mart?nez <[email protected]>--- toolchain/helpers.mk | 6 +++++- toolchain/toolchain-external/Config.in | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-)toolchain/helpers.mk +2
-1@@ -297,13 +297,17 @@ check_arm_abi = \ if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \ echo "External toolchain uses the unsuported OABI" ; \ exit 1 ; \ - fi ; \ + fi +toolchain/helpers.mk check_arm_abi = \ · line 311
Quoted 10 lines
toolchain/helpers.mk +3
-0+ifneq ($(BR2_ARM_TOOLCHAIN_SKIP_CHECK),y) +check_arm_abi += ; \ if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - ; then \ abistr_$(BR2_ARM_EABI)='EABI'; \ abistr_$(BR2_ARM_EABIHF)='EABIhf'; \ echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \ exit 1 ; \ fi +endifI looked at this issue and tried to avoid the use of
/dev/null.gdb... In the Cortex-M toolchain, it seems to have a wrapper around the linker like this one [1] which append the .gdb suffix.
Quoted 6 lines
However, there is no error if "-Wl,-r" (Generate relocatable output) is added in the gcc's command line but it's not really nice solution because this option will be there for other toolchains.
Yann proposed to use $BUILD_DIR/br-foo instead of
/dev/nulland add a comment why we do that.
Yeah, something like the following:
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 3121da4..44696c0 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -298,12 +298,14 @@ check_arm_abi = \
echo "External toolchain uses the unsuported OABI" ; \
exit 1 ; \
fi ; \
- if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o /dev/null - ; then \
+ if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o $(BUILD_DIR)/.br-temp-out - ; then \
+ rm -f $(BUILD_DIR)/.br-temp-out*; \
abistr_$(BR2_ARM_EABI)='EABI'; \
abistr_$(BR2_ARM_EABIHF)='EABIhf'; \
echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \
exit 1 ; \
- fi
+ fi; \
+ rm -f $(BUILD_DIR)/.br-temp-out*
#
# Check that the external toolchain supports C++(does not apply, copy-paste with tab-brokenness)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 4/4 toolchain-external: add OSELAS 2013.12.2 Cortex-M3 toolchain
In reply to Ezequiel GarciaFrom: Thomas Petazzoni <[email protected]>
Binary toolchain based on uClibc for Cortex-M3 processor based on GCC 4.8.2.
--- toolchain/toolchain-external/Config.in | 12 ++++++++++++ toolchain/toolchain-external/toolchain-external.hash | 3 +++ toolchain/toolchain-external/toolchain-external.mk | 11 +++++++++++ 3 files changed, 26 insertions(+)
toolchain/toolchain-external/Config.in +12 -0
@@ -192,6 +192,17 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 This toolchain uses software-floating point. +config BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3 + bool "OSELAS ARM Cortex-M3" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_LARGEFILE + select BR2_INET_IPV6 + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_ARM_TOOLCHAIN_SKIP_CHECK + config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411 bool "Sourcery CodeBench MIPS 2014.11" depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
@@ -970,6 +981,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201405 default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109 default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 + default "arm-cortexm3-uclinuxeabi" if BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 default "microblazeel-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3
toolchain/toolchain-external/toolchain-external.hash +3 -0
@@ -56,3 +56,6 @@ sha256 3e1c7c53fadfd3346ab60386c573f07f0617ab119546ec8cb93bc20c23cff2b3 lin32-m sha256 b72f7be654a75bb643372f3909de7b8739f0f56bdf8bea98fea41dcecefe6b6b microblazeel-unknown-linux-gnu.tgz sha256 ed2fea022f2def257ca6db09911b73c7102aaa1792d2da2d81371a763e5c2eff lin32-microblaze-unknown-linux-gnu_14.3_early.tar.xz sha256 53ee0b1ad50e651eb14d0b53044b90e7bf7e3cb341ee57fe575bc4c4e142ea37 microblaze-unknown-linux-gnu.tgz + +# OSELAS Cortex-M3 toolchain +sha1 b5a85b489e32c3730673b74e998e08444e36aab4 oselas.toolchain-2013.12.2-arm-cortexm3-uclinuxeabi-gcc-4.8.2-uclibc-0.9.33.2-binutils-2.24-kernel-3.12-sanitized_2013.12.2_i386.deb
toolchain/toolchain-external/toolchain-external.mk +11 -0
@@ -287,6 +287,9 @@ TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.05-27-mips-linux-gnu-i686-pc-linux-gnu.tar else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/ TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.11-22-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3),y) +TOOLCHAIN_EXTERNAL_SITE = http://debian.pengutronix.de/debian/pool/main/o/oselas.toolchain-2013.12.2-arm-cortexm3-uclinuxeabi-gcc-4.8.2-uclibc-0.9.33.2-binutils-2.24-kernel-3.12-sanitized/ +TOOLCHAIN_EXTERNAL_SOURCE = oselas.toolchain-2013.12.2-arm-cortexm3-uclinuxeabi-gcc-4.8.2-uclibc-0.9.33.2-binutils-2.24-kernel-3.12-sanitized_2013.12.2_i386.deb else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/ TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2013.05-43-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
@@ -417,6 +420,14 @@ define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - endef +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3),y) +# Special handling for OSELAS toolchains +define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS + mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) + (cd $(@D); ar xvf $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE)) + $(call suitable-extractor,data.tar.xz) $(@D)/data.tar.xz | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=5 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - +endef else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) # Normal handling of toolchain tarball extraction. define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS
Signature · 1 line
2.2.1
PATCH 4/4 toolchain-external: add OSELAS 2013.12.2 Cortex-M3 toolchain
Hi Ezequiel,
Le 22/01/2015 19:33, Ezequiel Garcia a ?crit :
Quoted 74 lines
From: Thomas Petazzoni <[email protected]>
Binary toolchain based on uClibc for Cortex-M3 processor based on GCC 4.8.2.
Signed-off-by Thomas Petazzoni <[email protected]>Signed-off-by Guido Mart?nez <[email protected]>--- toolchain/toolchain-external/Config.in | 12 ++++++++++++ toolchain/toolchain-external/toolchain-external.hash | 3 +++ toolchain/toolchain-external/toolchain-external.mk | 11 +++++++++++ 3 files changed, 26 insertions(+)toolchain/toolchain-external/Config.in +12
-0@@ -192,6 +192,17 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 This toolchain uses software-floating point. +config BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3 + bool "OSELAS ARM Cortex-M3" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_LARGEFILE + select BR2_INET_IPV6 + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_ARM_TOOLCHAIN_SKIP_CHECK + config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411 bool "Sourcery CodeBench MIPS 2014.11" depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el@@ -970,6 +981,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201405 default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109 default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 + default "arm-cortexm3-uclinuxeabi" if BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 default "microblazeel-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3toolchain/toolchain-external/toolchain-external.hash +3
-0@@ -56,3 +56,6 @@ sha256 3e1c7c53fadfd3346ab60386c573f07f0617ab119546ec8cb93bc20c23cff2b3 lin32-m sha256 b72f7be654a75bb643372f3909de7b8739f0f56bdf8bea98fea41dcecefe6b6b microblazeel-unknown-linux-gnu.tgz sha256 ed2fea022f2def257ca6db09911b73c7102aaa1792d2da2d81371a763e5c2eff lin32-microblaze-unknown-linux-gnu_14.3_early.tar.xz sha256 53ee0b1ad50e651eb14d0b53044b90e7bf7e3cb341ee57fe575bc4c4e142ea37 microblaze-unknown-linux-gnu.tgz + +# OSELAS Cortex-M3 toolchain +sha1 b5a85b489e32c3730673b74e998e08444e36aab4 oselas.toolchain-2013.12.2-arm-cortexm3-uclinuxeabi-gcc-4.8.2-uclibc-0.9.33.2-binutils-2.24-kernel-3.12-sanitized_2013.12.2_i386.debtoolchain/toolchain-external/toolchain-external.mk +4
-0@@ -287,6 +287,9 @@ TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.05-27-mips-linux-gnu-i686-pc-linux-gnu.tar else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/ TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.11-22-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3),y) +TOOLCHAIN_EXTERNAL_SITE = http://debian.pengutronix.de/debian/pool/main/o/oselas.toolchain-2013.12.2-arm-cortexm3-uclinuxeabi-gcc-4.8.2-uclibc-0.9.33.2-binutils-2.24-kernel-3.12-sanitized/ +TOOLCHAIN_EXTERNAL_SOURCE = oselas.toolchain-2013.12.2-arm-cortexm3-uclinuxeabi-gcc-4.8.2-uclibc-0.9.33.2-binutils-2.24-kernel-3.12-sanitized_2013.12.2_i386.deb else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/ TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2013.05-43-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2@@ -417,6 +420,14 @@ define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - endef +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_OSELAS_ARM_CORTEX_M3),y)
toolchain/toolchain-external/toolchain-external.mk define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS · line 433
Quoted 10 lines
toolchain/toolchain-external/toolchain-external.mk +7
-0+# Special handling for OSELAS toolchains +define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS + mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) + (cd $(@D); ar xvf $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE)) + $(call suitable-extractor,data.tar.xz) $(@D)/data.tar.xz | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=5 -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - +endef else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) # Normal handling of toolchain tarball extraction. define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS
I tried to build some packages to test this toolchain and it fail with Busybox :-/
/home/naourr/git/buildroot/test/cortexM/host/opt/ext-toolchain/arm-cortexm3-uclinuxeabi/bin/ld.real:
warning: cannot find entry symbol lf2flt; defaulting to 00000000 networking/lib.a(nslookup.o): In function `set_default_dns':
nslookup.c:(.text.set_default_dns+0x12): undefined reference to __res_state' nslookup.c:(.text.set_default_dns+0x2c): undefined reference to __res_state' networking/lib.a(nslookup.o): In function `nslookup_main':
nslookup.c:(.text.nslookup_main+0x16): undefined reference to __res_init' nslookup.c:(.text.nslookup_main+0x20): undefined reference to __res_state'
collect2: error: ld returned 1 exit status
make[1]: *** [busybox_unstripped] Erreur 1
That's because __UCLIBC_HAS_RESOLVER_SUPPORT__ is not defined in the toolchain configuration:opt/sysroot-arm-cortexm3-uclinuxeabi/usr/include/bits/uClibc_config.h
To support this toolchain, we need to have another toolchain option named BR2_TOOLCHAIN_HAS_RESOLVER_SUPPORT in order to be able to disable packages/options which needs resolver support.
Best regards,
Romain Naour
cover ARM Cortex-M3 support
In reply to Ezequiel GarciaDear Ezequiel Garcia,
Quoted 7 lines · Ezequiel Garcia
Guido Mart?nez (3):
arm: conditionally support regular ARM instructions
arm: update processor types
toolchain: allow for stupid toolchainsThomas Petazzoni (1):
toolchain-external: add OSELAS 2013.12.2 Cortex-M3 toolchain
So as I said, PATCH 1/4 applied. Several comments have been made on the other patches. Can you respin a new iteration for these?
In the mean time, I'll mark those three patches as 'Changes Requested' in patchwork, so please remember to send a new version.
Also, if you could send at least one defconfig for a Cortex-M3 board, it would be good.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
cover ARM Cortex-M3 support
Thomas,
Quoted 9 lines · Thomas Petazzoni
Dear Ezequiel Garcia,
Quoted 5 lines · Ezequiel Garcia
Guido Mart?nez (3):
arm: conditionally support regular ARM instructions
arm: update processor types
toolchain: allow for stupid toolchains
Quoted 6 lines
Quoted 2 lines
Thomas Petazzoni (1):
toolchain-external: add OSELAS 2013.12.2 Cortex-M3 toolchainSo as I said, PATCH 1/4 applied. Several comments have been made on the other patches. Can you respin a new iteration for these?
Sure, we are already looking at the comments.
Quoted 6 lines
In the mean time, I'll mark those three patches as 'Changes Requested' in patchwork, so please remember to send a new version.
Also, if you could send at least one defconfig for a Cortex-M3 board, it would be good.
Sure, no problem.
Signature · 2 lines
Ezequiel Garcia, VanguardiaSur www.vanguardiasur.com.ar