Skip to contentSkip to conversation

Buildroot support for X1000

RFC In review Kinsella 2 participants 2 messages Oct 16, 2015

lore
Share & tools
lore

Kinsella

#0 lore raw

RFC 1/1 Buildroot support for X1000

Hi Arnout,

X1000 is the Intel microprocessor that ships with Intel Galileo Gen 1/2. As discussed previously, here is an RFC that prototypes changes to arch and toolchain-wrapper to omit the lock prefix for the X1000.

If you agree, I will send a formal patch with these.

Ray K

---
 arch/Config.in.x86                                            |  4 ++++
 toolchain/toolchain-wrapper.c                                 |  3 +++
 toolchain/toolchain-wrapper.mk                                |  4 ++++
 4 files changed, 11 insertions(+), 11 deletions(-)
 delete mode 100644 board/intel/galileo/patches/binutils/2.25/default-lock-prefix.patch
arch/Config.in.x86 +4 -0
index 43f6abc..a284e4f 100644
@@ -34,6 +34,9 @@ config BR2_x86_i486
 config BR2_x86_i586
 	bool "i586"
 	depends on !BR2_x86_64
+config BR2_x86_X1000
+	bool "X1000"
+	depends on !BR2_x86_64
 config BR2_x86_i686
 	bool "i686"
 	depends on !BR2_x86_64
@@ -202,6 +205,7 @@ config BR2_ARCH
 	default "i386"		if BR2_x86_i386
 	default "i486"		if BR2_x86_i486
 	default "i586"		if BR2_x86_i586
+	default "i586"		if BR2_x86_X1000
 	default "i586"		if BR2_x86_pentium_mmx
 	default "i586"		if BR2_x86_geode
 	default "i586"		if BR2_x86_c3
toolchain/toolchain-wrapper.c +3 -0
index 632696c..ef53d36 100644
@@ -63,6 +63,9 @@ static char *predef_args[] = {
 #ifdef BR_64
 	"-m64",
 #endif
+#ifdef BR_X1000
+	"-Wa,-momit-lock-prefix=yes", 
+#endif
 #ifdef BR_BINFMT_FLAT
 	"-Wl,-elf2flt",
 #endif
toolchain/toolchain-wrapper.mk +4 -0
index c78363a..893669c 100644
@@ -20,6 +20,10 @@ ifeq ($(BR2_CCACHE),y)
 TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE
 endif
 
+ifeq ($(BR2_x86_X1000),y)
+TOOLCHAIN_WRAPPER_ARGS += -DBR_X1000
+endif
+
 ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
 TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
 endif
Signature · 1 line
2.1.0
#1 lore raw
Quoted 7 lines · Ray

Hi Arnout,

X1000 is the Intel microprocessor that ships with Intel Galileo Gen 1/2. As discussed previously, here is an RFC that prototypes changes to arch and toolchain-wrapper to omit the lock prefix for the X1000.

If you agree, I will send a formal patch with these.

Looks good, some remarks below.

Quoted 16 lines

Ray K

---
 arch/Config.in.x86                                            |  4 ++++
 toolchain/toolchain-wrapper.c                                 |  3 +++
 toolchain/toolchain-wrapper.mk                                |  4 ++++
 4 files changed, 11 insertions(+), 11 deletions(-)
 delete mode 100644 board/intel/galileo/patches/binutils/2.25/default-lock-prefix.patch
arch/Config.in.x86 +0 -0
index 43f6abc..a284e4f 100644

arch/Config.in.x86 config BR2_x86_i486 · line 37

Quoted 4 lines
arch/Config.in.x86 +1 -0
@@ -34,6 +34,9 @@ config BR2_x86_i486
 config BR2_x86_i586
 	bool "i586"
 	depends on !BR2_x86_64
+config BR2_x86_X1000

We (incorrectly) use lowercase everywhere for the architecture symbols.

arch/Config.in.x86 config BR2_x86_i486 · line 38

Quoted 1 line
arch/Config.in.x86 +1 -0
+	bool "X1000"

Same here.

arch/Config.in.x86 config BR2_x86_i486 · line 39

Quoted 1 line
arch/Config.in.x86 +1 -0
+	depends on !BR2_x86_64

Even though there are currently no help texts anywhere for the architecture
options, I really think it's worthwhile to add it. Especially for this one, since it is really a special case of i586 with an additional workaround.

arch/Config.in.x86 config BR2_ARCH · line 211

Quoted 11 lines
arch/Config.in.x86 +1 -0
 config BR2_x86_i686
 	bool "i686"
 	depends on !BR2_x86_64
@@ -202,6 +205,7 @@ config BR2_ARCH
 	default "i386"		if BR2_x86_i386
 	default "i486"		if BR2_x86_i486
 	default "i586"		if BR2_x86_i586
+	default "i586"		if BR2_x86_X1000
 	default "i586"		if BR2_x86_pentium_mmx
 	default "i586"		if BR2_x86_geode
 	default "i586"		if BR2_x86_c3

You should also add it to BR2_GCC_TARGET_ARCH.

toolchain/toolchain-wrapper.c static char *predef_args[] = { · line 66

Quoted 9 lines
toolchain/toolchain-wrapper.c +1 -0
index 632696c..ef53d36 100644
@@ -63,6 +63,9 @@ static char *predef_args[] = {
 #ifdef BR_64
 	"-m64",
 #endif
+#ifdef BR_X1000

Here, I would make it more explicit what is really done, like BR_OMIT_LOCK_PREFIX.

Regards,
Arnout

Quoted 21 lines
toolchain/toolchain-wrapper.c +2 -0
+	"-Wa,-momit-lock-prefix=yes", 
+#endif
 #ifdef BR_BINFMT_FLAT
 	"-Wl,-elf2flt",
 #endif
toolchain/toolchain-wrapper.mk +4 -0
index c78363a..893669c 100644
@@ -20,6 +20,10 @@ ifeq ($(BR2_CCACHE),y)
 TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE
 endif
 
+ifeq ($(BR2_x86_X1000),y)
+TOOLCHAIN_WRAPPER_ARGS += -DBR_X1000
+endif
+
 ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
 TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
 endif
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF