Skip to contentSkip to conversation

xtensa: add support for the Xtensa architecture

PATCH New Chris Zankel 2 participants 3 messages Nov 10, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 xtensa: add support for the Xtensa architecture

The Xtensa architecture had been removed because it required special handling and depended on additional directories and files that became obsolete over time. This change is more aligned to other architectures.

arch/Config.in +8 -0
index 4d1f81f..ad4a9e0 100644
@@ -145,6 +145,13 @@ config BR2_x86_64
 	  architecture compatible microprocessor).
 	  http://en.wikipedia.org/wiki/X86_64
 
+config BR2_xtensa
+	bool "Xtensa"
+	help
+	  Xtensa is a Tensilica processor IP architecture.
+	  http://en.wikipedia.org/wiki/Xtensa
+	  http://www.tensilica.com/
+
 endchoice
 
 config BR2_microblaze
@@ -158,4 +165,5 @@ source "arch/Config.in.powerpc"
 source "arch/Config.in.sh"
 source "arch/Config.in.sparc"
 source "arch/Config.in.x86"
+source "arch/Config.in.xtensa"
 source "arch/Config.in.common"
arch/Config.in.common +1 -0
index 1ed9929..d2bfd59 100644
@@ -49,6 +49,7 @@ config BR2_ARCH
 	default "sh4aeb"	if BR2_sh4aeb
 	default "sh64"		if BR2_sh64
 	default "sparc"		if BR2_sparc
+	default "xtensa"	if BR2_xtensa
 
 
 config BR2_ENDIAN
linux/Config.in +2 -1
index 277ef0e..29a2110 100644
@@ -152,7 +152,8 @@ config BR2_LINUX_KERNEL_BZIMAGE
 
 config BR2_LINUX_KERNEL_ZIMAGE
 	bool "zImage"
-	depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || BR2_sh || BR2_sh64
+	depends on BR2_arm || BR2_armeb || BR2_powerpc || BR2_sparc || \
+		   BR2_sh || BR2_sh64 || BR2_xtensa
 
 config BR2_LINUX_KERNEL_APPENDED_ZIMAGE
 	bool "zImage with appended DT"
package/autoconf/Config.in +4 -2
index c304572..3622f3d 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_AUTOCONF
 	bool "autoconf"
-	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || BR2_sh3eb || BR2_sh64)
+	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3)
+	depends on !(BR2_sh3eb || BR2_sh64 || BR2_xtensa)
 	select BR2_PACKAGE_PERL
 	help
 	  Extensible program for developing configure scripts.  These
@@ -9,4 +10,5 @@ config BR2_PACKAGE_AUTOCONF
 	  http://www.gnu.org/software/autoconf/
 
 comment "autoconf requires an architecture supported by qemu"
-	depends on BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || BR2_sh3eb || BR2_sh64
+	depends on BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || \
+		   BR2_sh3eb || BR2_sh64 || BR2_xtensa
package/automake/Config.in +4 -2
index f8d74ef..6e48517 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_AUTOMAKE
 	bool "automake"
-	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || BR2_sh3eb || BR2_sh64)
+	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3)
+	depends on !(BR2_sh3eb || BR2_sh64 || BR2_xtensa)
 	select BR2_PACKAGE_AUTOCONF
 	select BR2_PACKAGE_PERL
 	help
@@ -10,4 +11,5 @@ config BR2_PACKAGE_AUTOMAKE
 	  http://www.gnu.org/software/automake/
 
 comment "automake requires an architecture supported by qemu"
-	depends on BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || BR2_sh3eb || BR2_sh64
+	depends on BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || \
+		   BR2_sh3eb || BR2_sh64 || BR2_xtensa
package/ltrace/Config.in +1 -0
index a65ca48..4cce767 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LTRACE
 	bool "ltrace"
 	depends on !(BR2_avr32 || BR2_mips || BR2_mipsel || BR2_sh || BR2_sh64)
+	depends on !BR2_xtensa
 	select BR2_PACKAGE_LIBELF
 	help
 	  Debugging program which runs a specified command until it exits.
toolchain/Config.in +1 -1
index 29ed2f0..7edf82b 100644
@@ -23,7 +23,7 @@ config BR2_TOOLCHAIN_EXTERNAL
 
 config BR2_TOOLCHAIN_CTNG
 	bool "Crosstool-NG toolchain"
-	depends on !BR2_microblaze && !BR2_aarch64
+	depends on !BR2_microblaze && !BR2_aarch64 && !BR2_xtensa
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED
 	help
toolchain/toolchain-buildroot/Config.in.2 +3 -1
index 956ec2f..d27c9f3 100644
@@ -68,7 +68,7 @@ config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
 
 choice
 	prompt "Thread library implementation"
-	default BR2_PTHREADS_NATIVE if (!BR2_UCLIBC_VERSION_0_9_31) && !BR2_ARM_OABI
+	default BR2_PTHREADS_NATIVE if (!BR2_UCLIBC_VERSION_0_9_31) && !BR2_ARM_OABI && !BR2_xtensa
 	default BR2_PTHREADS_OLD
 	help
 	  Use this option to select the thread library implementation
@@ -82,6 +82,7 @@ choice
 
 	config BR2_PTHREADS
 		bool "linuxthreads"
+		depends on !BR2_xtensa
 	        select BR2_TOOLCHAIN_HAS_THREADS
 
 	config BR2_PTHREADS_OLD
@@ -94,6 +95,7 @@ choice
 		depends on !BR2_UCLIBC_VERSION_0_9_31
 		depends on !BR2_ARM_OABI
 		depends on !BR2_x86_i386
+		depends on !BR2_xtensa
 endchoice
 
 source "toolchain/elf2flt/Config.in"
toolchain/toolchain-common.in +1 -1
index 4c2a28b..9f11a39 100644
@@ -93,7 +93,7 @@ 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_mips || BR2_mipsel || BR2_sh
+	bool "Enable MMU support" if BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_sh || BR2_xtensa
 	default y if !BR2_bfin
 	help
 	  If your target has a MMU, you should say Y here.  If you
toolchain/uClibc/Config.in +3 -2
index f46a415..e47bc9b 100644
@@ -12,14 +12,15 @@ choice
 
 	config BR2_UCLIBC_VERSION_0_9_31
 		bool "uClibc 0.9.31.x"
+		depends on !BR2_xtensa
 
 	config BR2_UCLIBC_VERSION_0_9_32
 		bool "uClibc 0.9.32.x"
-		depends on !(BR2_avr32 || BR2_sh)
+		depends on !(BR2_avr32 || BR2_sh || BR2_xtensa)
 
 	config BR2_UCLIBC_VERSION_0_9_33
 		bool "uClibc 0.9.33.x"
-		depends on !BR2_avr32
+		depends on !(BR2_avr32 || BR2_xtensa)
 
 	config BR2_UCLIBC_VERSION_SNAPSHOT
 		bool "daily snapshot"
toolchain/uClibc/uclibc.mk +1 -0
index 8cf59bc..055267c 100644
@@ -38,6 +38,7 @@ UCLIBC_TARGET_ARCH:=$(shell $(SHELL) -c "echo $(ARCH) | sed \
 		-e 's/sh[234].*/sh/' \
 		-e 's/mips.*/mips/' \
 		-e 's/cris.*/cris/' \
+		-e 's/xtensa.*/xtensa/' \
 ")
 
 UCLIBC_TARGET_ENDIAN:=$(call qstrip,$(BR2_ENDIAN))
#1 lore raw

PATCH v3 1/2 xtensa: add support for the Xtensa architecture

package/autoconf/Config.in line 7

Quoted 13 lines · Chris Zankel
package/autoconf/Config.in +2 -1
index c304572..3622f3d 100644
@@ -1,6 +1,7 @@
  config BR2_PACKAGE_AUTOCONF
  	bool "autoconf"
-	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || BR2_sh3eb || BR2_sh64)
+	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3)
+	depends on !(BR2_sh3eb || BR2_sh64 || BR2_xtensa)
  	select BR2_PACKAGE_PERL
  	help
  	  Extensible program for developing configure scripts.  These

Actually, these dependencies can be removed again, because perl no longer
depends on host-qemu. I'll post a patch removing them.

And anyway, host-qemu exists for xtensa, no?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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
#2 lore raw

PATCH v3 1/2 xtensa: add support for the Xtensa architecture

HI Arnout,

Quoted 16 lines · Arnout Vandecappelle

package/autoconf/Config.in line 7

Quoted 13 lines · Chris Zankel
package/autoconf/Config.in +2 -1
index c304572..3622f3d 100644
@@ -1,6 +1,7 @@
  config BR2_PACKAGE_AUTOCONF
  	bool "autoconf"
-	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || BR2_sh3eb || BR2_sh64)
+	depends on !(BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3)
+	depends on !(BR2_sh3eb || BR2_sh64 || BR2_xtensa)
  	select BR2_PACKAGE_PERL
  	help
  	  Extensible program for developing configure scripts.  These

Actually, these dependencies can be removed again, because perl no longer
depends on host-qemu. I'll post a patch removing them.

So, I guess that breaks my patch ;-)

Quoted 1 line

And anyway, host-qemu exists for xtensa, no?

Yes, there is a version of Qemu that was done my Max, but it might require a different processor configuration than what's in the toolchain by default.

-Chris