Skip to contentSkip to conversation

nios2: Add new architecture

PATCH New Ezequiel Garcia 5 participants 14 messages Aug 20, 2013 – Aug 21, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nios2: Add new architecture

From: Ezequiel Garcia <[email protected]>

This commit adds very basic support to build for the Nios II architecture. Toolchain support is still missing and instead we need to use an external custom toolchain.

Notice that this architecture had been previously removed in Buildroot 2010.05-rc1 release (as explained in the CHANGES file) and this commit adds it back.

---
 arch/Config.in       | 11 +++++++++++
 arch/Config.in.nios2 |  5 +++++
 2 files changed, 16 insertions(+)
 create mode 100644 arch/Config.in.nios2
arch/Config.in +11 -0
index 0b5b218..2495110 100644
@@ -124,6 +124,13 @@ config BR2_mips64el
 	  http://www.mips.com/
 	  http://en.wikipedia.org/wiki/MIPS_Technologies
 
+config BR2_nios2
+	bool "Nios II"
+	help
+	  Nios II is a soft core processor from Altera Coporation.
+	  http://www.altera.com/
+	  http://en.wikipedia.org/wiki/Nios_II
+
 config BR2_powerpc
 	bool "PowerPC"
 	help
@@ -305,6 +312,10 @@ if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el
 source "arch/Config.in.mips"
 endif
 
+if BR2_nios2
+source "arch/Config.in.nios2"
+endif
+
 if BR2_powerpc
 source "arch/Config.in.powerpc"
 endif
arch/Config.in.nios2 new file +5 -0
new file mode 100644
index 0000000..ed63898
@@ -0,0 +1,5 @@
+config BR2_ARCH
+	default "nios2"
+
+config BR2_ENDIAN
+	default "LITTLE"
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

From: Ezequiel Garcia <[email protected]>

This commit adds the pre-built Sourcery CodeBench toolchains currently available for the Nios-II architecture.

---
 toolchain/toolchain-external/Config.in   | 26 ++++++++++++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |  6 ++++++
 2 files changed, 32 insertions(+)
toolchain/toolchain-external/Config.in +26 -0
index ad1f203..9c0ffb1 100644
@@ -402,6 +402,30 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
 comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
 	depends on BR2_MIPS_NABI32
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12
+	bool "Sourcery CodeBench Nios-II 2013.05-12"
+	depends on BR2_nios2
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	help
+	  Sourcery CodeBench toolchain for the Nios-II architecture,
+	  from Mentor Graphics.
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43
+	bool "Sourcery CodeBench Nios-II 2013.05-43"
+	depends on BR2_nios2
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	help
+	  Sourcery CodeBench toolchain for the Nios-II architecture,
+	  from Mentor Graphics.
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
 	bool "Sourcery CodeBench PowerPC 2011.03"
 	depends on BR2_powerpc
@@ -818,6 +842,8 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201305
+	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43
+	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
toolchain/toolchain-external/ext-tool.mk +6 -0
index 01be85c..1d7b2f4 100644
@@ -247,6 +247,12 @@ TOOLCHAIN_EXTERNAL_SOURCE = mips-2012.09-99-mips-linux-gnu-i686-pc-linux-gnu.tar
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201305),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE = mips-2013.05-36-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12),y)
+TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2013.05-12-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43),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
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE = freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

Quoted 20 lines · Ezequiel Garcia

From: Ezequiel Garcia <[email protected]>

This commit adds the pre-built Sourcery CodeBench toolchains currently available for the Nios-II architecture.

---
  toolchain/toolchain-external/Config.in   | 26 ++++++++++++++++++++++++++
  toolchain/toolchain-external/ext-tool.mk |  6 ++++++
  2 files changed, 32 insertions(+)
toolchain/toolchain-external/Config.in +1 -0
index ad1f203..9c0ffb1 100644
@@ -402,6 +402,30 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
  comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
  	depends on BR2_MIPS_NABI32
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 · line 415

Quoted 10 lines
toolchain/toolchain-external/Config.in +10 -0
+	bool "Sourcery CodeBench Nios-II 2013.05-12"
+	depends on BR2_nios2
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	help
+	  Sourcery CodeBench toolchain for the Nios-II architecture,
+	  from Mentor Graphics.

The help text should say which gcc and glibc version are included.

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 · line 418

Quoted 3 lines
toolchain/toolchain-external/Config.in +3 -0
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43
+	bool "Sourcery CodeBench Nios-II 2013.05-43"

Why do you want to support two patchlevels of the same base version?

Regards,
Arnout

Quoted 40 lines
toolchain/toolchain-external/Config.in +12 -0
+	depends on BR2_nios2
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	help
+	  Sourcery CodeBench toolchain for the Nios-II architecture,
+	  from Mentor Graphics.
+
  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
  	bool "Sourcery CodeBench PowerPC 2011.03"
  	depends on BR2_powerpc
@@ -818,6 +842,8 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
  	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
  	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
  	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201305
+	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43
+	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12
  	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
  	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
  	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
toolchain/toolchain-external/ext-tool.mk +6 -0
index 01be85c..1d7b2f4 100644
@@ -247,6 +247,12 @@ TOOLCHAIN_EXTERNAL_SOURCE = mips-2012.09-99-mips-linux-gnu-i686-pc-linux-gnu.tar
  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201305),y)
  TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/
  TOOLCHAIN_EXTERNAL_SOURCE = mips-2013.05-36-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12),y)
+TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2013.05-12-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43),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
  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y)
  TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu/
  TOOLCHAIN_EXTERNAL_SOURCE = freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

Hi Arnout,

Quoted 23 lines · Arnout Vandecappelle
Quoted 22 lines · Ezequiel Garcia

From: Ezequiel Garcia <[email protected]>

This commit adds the pre-built Sourcery CodeBench toolchains currently available for the Nios-II architecture.

---
  toolchain/toolchain-external/Config.in   | 26 ++++++++++++++++++++++++++
  toolchain/toolchain-external/ext-tool.mk |  6 ++++++
  2 files changed, 32 insertions(+)
toolchain/toolchain-external/Config.in +0 -0
index ad1f203..9c0ffb1 100644
@@ -402,6 +402,30 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
  comment "Sourcery CodeBench toolchains are only available for

MIPS/MIPS64 o32 and n64"
depends on BR2_MIPS_NABI32

Quoted 16 lines

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 · line 415

Quoted 11 lines
toolchain/toolchain-external/Config.in +11 -0
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12
+       bool "Sourcery CodeBench Nios-II 2013.05-12"
+       depends on BR2_nios2
+       depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+       select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+       select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+       select BR2_INSTALL_LIBSTDCPP
+       select BR2_HOSTARCH_NEEDS_IA32_LIBS
+       help
+         Sourcery CodeBench toolchain for the Nios-II architecture,
+         from Mentor Graphics.

The help text should say which gcc and glibc version are included.

Yes, I was aware of that. I tried to find such information, but couldn't :-(

Any idea how do I get that information from the toolchain itself?

Quoted 7 lines

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 · line 418

Quoted 3 lines
toolchain/toolchain-external/Config.in +3 -0
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43
+       bool "Sourcery CodeBench Nios-II 2013.05-43"

Why do you want to support two patchlevels of the same base version?

Not sure, actually. Just added all the options currently available.

Do you think is silly? Should I leave the latest one alone?

Thanks,

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar
#4 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

Quoted 43 lines · Ezequiel Garc?a

Hi Arnout,

Quoted 23 lines · Arnout Vandecappelle
Quoted 22 lines · Ezequiel Garcia

From: Ezequiel Garcia <[email protected]>

This commit adds the pre-built Sourcery CodeBench toolchains currently available for the Nios-II architecture.

---
   toolchain/toolchain-external/Config.in   | 26 ++++++++++++++++++++++++++
   toolchain/toolchain-external/ext-tool.mk |  6 ++++++
   2 files changed, 32 insertions(+)
toolchain/toolchain-external/Config.in +0 -0
index ad1f203..9c0ffb1 100644
@@ -402,6 +402,30 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
   comment "Sourcery CodeBench toolchains are only available for

MIPS/MIPS64 o32 and n64"
depends on BR2_MIPS_NABI32

Quoted 16 lines

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 · line 415

Quoted 11 lines
toolchain/toolchain-external/Config.in +11 -0
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_12
+       bool "Sourcery CodeBench Nios-II 2013.05-12"
+       depends on BR2_nios2
+       depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+       select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+       select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+       select BR2_INSTALL_LIBSTDCPP
+       select BR2_HOSTARCH_NEEDS_IA32_LIBS
+       help
+         Sourcery CodeBench toolchain for the Nios-II architecture,
+         from Mentor Graphics.

The help text should say which gcc and glibc version are included.

Quoted 3 lines

Yes, I was aware of that. I tried to find such information, but couldn't :-(

Any idea how do I get that information from the toolchain itself?

cross-gcc --version
cross-gdb --version
cross-ar --version
ls -l output/staging/lib*/libc-*.so

Kernel version is a bit more difficult: cat
output/staging/usr/include/linux/version.h and convert the decimal version number to hex.

Look at the rest of the toolchain-external/Config.in for examples.

The supported architectures should also be mentioned, but that may be
more difficult.

Quoted 9 lines
Quoted 8 lines

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203 · line 418

Quoted 4 lines
toolchain/toolchain-external/Config.in +3 -0
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305_43
+       bool "Sourcery CodeBench Nios-II 2013.05-43"

Why do you want to support two patchlevels of the same base version?

Quoted 3 lines

Not sure, actually. Just added all the options currently available.

Do you think is silly? Should I leave the latest one alone?

Yes, only the latest one.

We do usually keep an older version around as well, but I'm not really
sure why. For the Sourcery toolchains it makes sense because they have different gcc versions, but the Linaro toolchains often only have bugfixes between one version and the next.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#5 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

Hi Arnout,

On 21 August 2013 13:57, Arnout Vandecappelle <[email protected]> wrote:
[...]

Quoted 5 lines

Kernel version is a bit more difficult: cat
output/staging/usr/include/linux/version.h and convert the decimal version number to hex.

Right.

Quoted 3 lines

The supported architectures should also be mentioned, but that may be more
difficult.

Mmm... what do you mean by supported architectures?
I'm not an expert Nios-II user (just started working on it) but there doesn't seem to be any architectural variants.

Quoted 6 lines

We do usually keep an older version around as well, but I'm not really sure
why. For the Sourcery toolchains it makes sense because they have different gcc versions, but the Linaro toolchains often only have bugfixes between one version and the next.

Speaking of toolchains. Any recomendations on how to *choose* a toolchain?

Should I safely use Sourcery?
Should I prefer Buildroot internal (when we add support for it)? Which should be the rationale behind such decision? (aside from the fact the buildroot toolchain allows to be tuned)

Thanks a lot for the help!

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar
#6 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

On 21/08/13 21:23, Ezequiel Garc?a wrote:
[snip]

Quoted 6 lines

Speaking of toolchains. Any recomendations on how to *choose* a toolchain?

Should I safely use Sourcery?
Should I prefer Buildroot internal (when we add support for it)? Which should be the rationale behind such decision? (aside from the fact the buildroot toolchain allows to be tuned)

External toolchain has the advantage that you don't have to spend time
(about an hour) on building it.

Internal toolchain has the advantage that it is configurable, and can
be uClibc based and therefore smaller. The difference between uClibc and glibc is in the order of 1MB, so it only really makes sense when you want a really small rootfs.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#7 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

In reply to Ezequiel García

Dear Ezequiel Garc?a,

Quoted 3 lines · Ezequiel Garc?a

Yes, I was aware of that. I tried to find such information, but couldn't :-(

Any idea how do I get that information from the toolchain itself?

Usually, all the Sourcery CodeBench toolchain have a document in share/doc/<tuple>/pdf/getting-started.pdf with many details about the toolchain.

Otherwise:

* nios-linux-gcc -v
* nios-linux-gdb -v
* find . -name 'ld-*.so' will identify which ld-2.xx.so, which will tell you the version of glibc

Quoted 4 lines
Quoted 2 lines

Why do you want to support two patchlevels of the same base version?

Not sure, actually. Just added all the options currently available.

Hum?

Quoted 1 line

Do you think is silly? Should I leave the latest one alone?

You can support multiple versions, but not multiple patchlevel of the same version, because it's silly.

Since I know you know how kernel versions work, what you did is like supporting 3.10.6 and 3.10.7: it's pointless, 3.10.7 is basically the same as 3.10.6 with a few additional fixes. Of course, supporting both 3.9 and 3.10 might make sense.

Look at the other Sourcery Codebench toolchain entries in Buildroot. We support multiple versions, but not multiple patchlevel of the same version.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#8 lore raw

PATCH 2/2 toolchain-external: Add Sourcery CodeBench for Nios-II

Quoted 4 lines · Thomas Petazzoni

Dear Ezequiel Garc?a,

On Wed, 21 Aug 2013 10:32:25 -0300, Ezequiel Garc?a wrote:

Quoted 8 lines
Quoted 3 lines

Yes, I was aware of that. I tried to find such information, but couldn't :-(

Any idea how do I get that information from the toolchain itself?

Usually, all the Sourcery CodeBench toolchain have a document in share/doc/<tuple>/pdf/getting-started.pdf with many details about the toolchain.

Ah, good hint. The PDFs have many details, indeed.

Quoted 4 lines

Otherwise:

* nios-linux-gcc -v
* nios-linux-gdb -v

Yup, I manage to get up to here....

Quoted 3 lines

* find . -name 'ld-*.so' will identify which ld-2.xx.so, which will tell you the version of glibc

.. and I couldn't get to get the libc and binutils version.

Quoted 12 lines
Quoted 4 lines
Quoted 2 lines

Why do you want to support two patchlevels of the same base version?

Not sure, actually. Just added all the options currently available.

Hum?

Quoted 1 line

Do you think is silly? Should I leave the latest one alone?

You can support multiple versions, but not multiple patchlevel of the same version, because it's silly.

Quoted 9 lines

Since I know you know how kernel versions work, what you did is like supporting 3.10.6 and 3.10.7: it's pointless, 3.10.7 is basically the same as 3.10.6 with a few additional fixes. Of course, supporting both 3.9 and 3.10 might make sense.

Look at the other Sourcery Codebench toolchain entries in Buildroot. We support multiple versions, but not multiple patchlevel of the same version.

Sure. Now I see why it was silly.

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar
#9 lore raw

PATCH 1/2 nios2: Add new architecture

In reply to Ezequiel Garcia

Op 20-aug.-2013 14:07 schreef "Ezequiel Garcia" <
[email protected]> het volgende:

Quoted 23 lines

From: Ezequiel Garcia <[email protected]>

This commit adds very basic support to build for the Nios II architecture. Toolchain support is still missing and instead we need to use an external custom toolchain.

Notice that this architecture had been previously removed in Buildroot 2010.05-rc1 release (as explained in the CHANGES file) and this commit adds it back.

---
 arch/Config.in       | 11 +++++++++++
 arch/Config.in.nios2 |  5 +++++
 2 files changed, 16 insertions(+)
 create mode 100644 arch/Config.in.nios2
arch/Config.in +0 -0
index 0b5b218..2495110 100644

arch/Config.in config BR2_mips64el · line 130

Quoted 7 lines
arch/Config.in +4 -0
@@ -124,6 +124,13 @@ config BR2_mips64el
          http://www.mips.com/
          http://en.wikipedia.org/wiki/MIPS_Technologies
 
+config BR2_nios2
+       bool "Nios II"
+       help
+         Nios II is a soft core processor from Altera Coporation.

This should probably be Corporation.

arch/Config.in if BR2_mips || BR2_mips64 || BR2_mipsel ||

Quoted 7 lines
arch/Config.in +3 -0
+         http://www.altera.com/
+         http://en.wikipedia.org/wiki/Nios_II
+
 config BR2_powerpc
        bool "PowerPC"
        help
@@ -305,6 +312,10 @@ if BR2_mips || BR2_mips64 || BR2_mipsel ||

BR2_mips64el

Quoted 24 lines
arch/Config.in +4 -0
 source "arch/Config.in.mips"
 endif
 
+if BR2_nios2
+source "arch/Config.in.nios2"
+endif
+
 if BR2_powerpc
 source "arch/Config.in.powerpc"
 endif
arch/Config.in.nios2 new file +5 -1
new file mode 100644
index 0000000..ed63898
@@ -0,0 +1,5 @@
+config BR2_ARCH
+       default "nios2"
+
+config BR2_ENDIAN
+       default "LITTLE"
--

1.8.1.5

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130820/58c1b9a3/attachment.html>

#10 lore raw

PATCH 1/2 nios2: Add new architecture

Quoted 1 line · Thomas De Schampheleire

[...]

Quoted 8 lines

arch/Config.in config BR2_mips64el · line 130

Quoted 5 lines
arch/Config.in +4 -0
+config BR2_nios2
+       bool "Nios II"
+       help
+         Nios II is a soft core processor from Altera Coporation.

This should probably be Corporation.

Yes, of course.

Thanks,

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar
#11 lore raw

PATCH 1/2 nios2: Add new architecture

In reply to Ezequiel Garcia
Quoted 5 lines · Ezequiel Garcia

From: Ezequiel Garcia <[email protected]>

This commit adds very basic support to build for the Nios II architecture. Toolchain support is still missing and instead we need to use an external custom toolchain.

Then you probably want to exclude it from the buildroot toolchain.

Regards,
Arnout

Quoted 53 lines

Notice that this architecture had been previously removed in Buildroot 2010.05-rc1 release (as explained in the CHANGES file) and this commit adds it back.

---
  arch/Config.in       | 11 +++++++++++
  arch/Config.in.nios2 |  5 +++++
  2 files changed, 16 insertions(+)

create mode 100644 arch/Config.in.nios2

arch/Config.in +11 -0
index 0b5b218..2495110 100644
@@ -124,6 +124,13 @@ config BR2_mips64el
  	  http://www.mips.com/
  	  http://en.wikipedia.org/wiki/MIPS_Technologies
 
+config BR2_nios2
+	bool "Nios II"
+	help
+	  Nios II is a soft core processor from Altera Coporation.
+	  http://www.altera.com/
+	  http://en.wikipedia.org/wiki/Nios_II
+
  config BR2_powerpc
  	bool "PowerPC"
  	help
@@ -305,6 +312,10 @@ if BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el
  source "arch/Config.in.mips"
  endif
 
+if BR2_nios2
+source "arch/Config.in.nios2"
+endif
+
  if BR2_powerpc
  source "arch/Config.in.powerpc"
  endif
arch/Config.in.nios2 new file +5 -0
new file mode 100644
index 0000000..ed63898
@@ -0,0 +1,5 @@
+config BR2_ARCH
+	default "nios2"
+
+config BR2_ENDIAN
+	default "LITTLE"
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#12 lore raw

PATCH 1/2 nios2: Add new architecture

Quoted 11 lines · Arnout Vandecappelle
Quoted 6 lines · Ezequiel Garcia

From: Ezequiel Garcia <[email protected]>

This commit adds very basic support to build for the Nios II architecture. Toolchain support is still missing and instead we need to use an external custom toolchain.

Then you probably want to exclude it from the buildroot toolchain.

Ok, I'll take a look.

I want to support buildroot toolchain, but I'm not sure when I'll be able to do that.

Thanks,

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar
#13 lore raw

PATCH 1/2 nios2: Add new architecture

Dear Ezequiel Garc?a,

Quoted 10 lines · Ezequiel Garc?a
Quoted 9 lines · Arnout Vandecappelle
Quoted 6 lines · Ezequiel Garcia

From: Ezequiel Garcia <[email protected]>

This commit adds very basic support to build for the Nios II architecture. Toolchain support is still missing and instead we need to use an external custom toolchain.

Quoted 4 lines
Quoted 2 lines

Then you probably want to exclude it from the buildroot toolchain.

Ok, I'll take a look.

See toolchain/Config.in. You can add a !BR2_nios2 in both BR2_TOOLCHAIN_BUILDROOT and BR2_TOOLCHAIN_CTNG.

Quoted 2 lines

I want to support buildroot toolchain, but I'm not sure when I'll be able to do that.

You can do that later. Just exclude the internal and crosstool-ng backends for now.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com