Skip to contentSkip to conversation

Microblaze Autobuilder Fixes

PATCH New Spenser Gilliland 4 participants 11 messages Jan 8, 2014 – Jan 14, 2014

lore
Share & tools
lore
#0 lore raw

cover Microblaze Autobuilder Fixes

This is a selection of fixes for Microblaze autobuild issues.

Spenser Gilliland (4):
gdb: use consistent version on host and target for microblaze and arc
libnspr: add microblaze support
libsigsegv: fix for microblaze
pixman: do not build demos or tests

 package/gdb/Config.in.host                         |  2 -
 package/gdb/gdb.mk                                 |  4 ++
 ...-nios2.patch => libnspr-microblaze-nios2.patch} | 59 ++++++++++++++++++++--
 .../libsigsegv-0003-fix-microblaze-build.patch     | 16 ++++++
 .../pixman/pixman-disable-demos-and-tests.patch    | 14 +++++
 5 files changed, 90 insertions(+), 5 deletions(-)
 rename package/libnspr/{libnspr-nios2.patch => libnspr-microblaze-nios2.patch} (59%)
 create mode 100644 package/libsigsegv/libsigsegv-0003-fix-microblaze-build.patch
 create mode 100644 package/pixman/pixman-disable-demos-and-tests.patch
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/4 gdb: use consistent version on host and target for microblaze and arc

Currently, the version of gdb used on the host and the target are different for microblaze and arc. This is fixed by using a different method to specify the version.

This fixes autobuild failure

http://autobuild.buildroot.net/results/554/5547456a42cdd21892bba665a15d96cdbb5b1b26//build-end.log

---
 package/gdb/Config.in.host | 2 --
 package/gdb/gdb.mk         | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)
package/gdb/Config.in.host +0 -2
index de0e0be..f446384 100644
@@ -59,7 +59,5 @@ config BR2_GDB_VERSION
 	default "7.3.1"    if BR2_GDB_VERSION_7_3
 	default "7.4.1"    if BR2_GDB_VERSION_7_4
 	default "7.5.1"    if BR2_GDB_VERSION_7_5
-	default "f25a1952afd054205f9471e449c1f7ca5b271b7c" if BR2_arc
-	default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
 
 endif
package/gdb/gdb.mk +4 -0
index d06b61b..94d8302 100644
@@ -16,6 +16,10 @@ ifeq ($(BR2_bfin),y)
 GDB_VERSION = 6.6a
 else ifeq ($(BR2_avr32),y)
 GDB_VERSION = 6.7.1-avr32-2.1.5
+else ifeq ($(BR2_microblaze),y)
+GDB_VERSION = 0d0b89a88104785cee93d27074e15118bf14fac1
+else ifeq ($(BR2_arc),y)
+GDB_VERSION = f25a1952afd054205f9471e449c1f7ca5b271b7c
 else
 GDB_VERSION = 7.5.1
 endif
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 1/4 gdb: use consistent version on host and target for microblaze and arc

Dear Spenser Gilliland,

Quoted 8 lines · Spenser Gilliland

Currently, the version of gdb used on the host and the target are different for microblaze and arc. This is fixed by using a different method to specify the version.

This fixes autobuild failure

http://autobuild.buildroot.net/results/554/5547456a42cdd21892bba665a15d96cdbb5b1b26//build-end.log

Missing empty line before the Signed-off-by line. Also, some comment below.

Quoted 17 lines
package/gdb/Config.in.host +0 -2
index de0e0be..f446384 100644
@@ -59,7 +59,5 @@ config BR2_GDB_VERSION
 	default "7.3.1"    if BR2_GDB_VERSION_7_3
 	default "7.4.1"    if BR2_GDB_VERSION_7_4
 	default "7.5.1"    if BR2_GDB_VERSION_7_5
-	default "f25a1952afd054205f9471e449c1f7ca5b271b7c" if BR2_arc
-	default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze
 
 endif
package/gdb/gdb.mk +0 -0
index d06b61b..94d8302 100644

package/gdb/gdb.mk ifeq ($(BR2_bfin),y) · line 25

Quoted 10 lines
package/gdb/gdb.mk +4 -0
@@ -16,6 +16,10 @@ ifeq ($(BR2_bfin),y)
 GDB_VERSION = 6.6a
 else ifeq ($(BR2_avr32),y)
 GDB_VERSION = 6.7.1-avr32-2.1.5
+else ifeq ($(BR2_microblaze),y)
+GDB_VERSION = 0d0b89a88104785cee93d27074e15118bf14fac1
+else ifeq ($(BR2_arc),y)
+GDB_VERSION = f25a1952afd054205f9471e449c1f7ca5b271b7c
 else
 GDB_VERSION = 7.5.1
 endif

I am not entirely happy with this change, because it handles Microblaze/ARC in a different way than AVR32, while they are really the same case.

And also because the code you're touching in gdb.mk has the following comment on top of it:

# When no version is defined, it means that cross-gdb for the host has

# not been enabled, and we will only build gdbserver or gdb for the
# target. In this case, use the latest available version
# automatically.

However, this comment is no longer true: with your patch, for certain architectures (Microblaze/ARC), we are *never* setting BR2_GDB_VERSION, and therefore this piece of gdb.mk code is also used when cross-gdb is enabled.

Therefore maybe we should:

1/ Remove the version string for AVR32 in the definition of
BR2_GDB_VERSION, like you did for Microblaze and ARC

2/ Update the comment above the code you're changing in gdb.mk to
explain what's going on.

3/ Add a comment on top of BR2_GDB_VERSION that explains why we don't
define a version string for some of the gdb versions.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/4 libnspr: add microblaze support

In reply to Spenser Gilliland

fixes autobuild failures

http://autobuild.buildroot.net/results/493/4932900522e87da84a47fbf2d796c2fbb3f7e741/build-end.log

---
 ...-nios2.patch => libnspr-microblaze-nios2.patch} | 59 ++++++++++++++++++++--
 1 file changed, 56 insertions(+), 3 deletions(-)
 rename package/libnspr/{libnspr-nios2.patch => libnspr-microblaze-nios2.patch} (59%)
package/libnspr/libnspr-microblaze-nios2.patch renamed from package/libnspr/libnspr-nios2.patch +56 -3
similarity index 59%
rename from package/libnspr/libnspr-nios2.patch
rename to package/libnspr/libnspr-microblaze-nios2.patch
index cffb2ef..a82317b 100644
@@ -1,14 +1,65 @@
-Add Nios-II support
+Add Microblaze and Nios-II support
 
+Signed-off-by: Spenser Gilliland <[email protected]>
 Signed-off-by: Ezequiel Garcia <[email protected]>
 
 diff -Naur libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.cfg libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.cfg
 --- libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.cfg	2013-11-10 21:15:04.556139100 -0300
 +++ libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.cfg	2013-11-10 21:15:29.332138283 -0300
-@@ -914,6 +914,51 @@
+@@ -914,6 +914,101 @@
  #define PR_BYTES_PER_WORD_LOG2   2
  #define PR_BYTES_PER_DWORD_LOG2  3
  
++#elif defined(__microblaze__)
++
++#if defined(__BIG_ENDIAN__)
++#define IS_BIG_ENDIAN 1
++#undef  IS_LITTLE_ENDIAN
++#else
++#define IS_LITTLE_ENDIAN 1
++#undef  IS_BIG_ENDIAN
++#endif
++
++#define PR_BYTES_PER_BYTE   1
++#define PR_BYTES_PER_SHORT  2
++#define PR_BYTES_PER_INT    4
++#define PR_BYTES_PER_INT64  8
++#define PR_BYTES_PER_LONG   4
++#define PR_BYTES_PER_FLOAT  4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD   4
++#define PR_BYTES_PER_DWORD  8
++
++#define PR_BITS_PER_BYTE    8
++#define PR_BITS_PER_SHORT   16
++#define PR_BITS_PER_INT     32
++#define PR_BITS_PER_INT64   64
++#define PR_BITS_PER_LONG    32
++#define PR_BITS_PER_FLOAT   32
++#define PR_BITS_PER_DOUBLE  64
++#define PR_BITS_PER_WORD    32
++
++#define PR_BITS_PER_BYTE_LOG2   3
++#define PR_BITS_PER_SHORT_LOG2  4
++#define PR_BITS_PER_INT_LOG2    5
++#define PR_BITS_PER_INT64_LOG2  6
++#define PR_BITS_PER_LONG_LOG2   5
++#define PR_BITS_PER_FLOAT_LOG2  5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2   5
++
++#define PR_ALIGN_OF_SHORT   2
++#define PR_ALIGN_OF_INT     4
++#define PR_ALIGN_OF_LONG    4
++#define PR_ALIGN_OF_INT64   4
++#define PR_ALIGN_OF_FLOAT   4
++#define PR_ALIGN_OF_DOUBLE  4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD    4
++
++#define PR_BYTES_PER_WORD_LOG2   2
++#define PR_BYTES_PER_DWORD_LOG2  3
++
 +#elif defined(nios2)
 +
 +#define IS_LITTLE_ENDIAN 1
@@ -60,10 +111,12 @@ diff -Naur libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.cfg libnspr-4.
 diff -Naur libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.h libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.h
 --- libnspr-4.9.6-ori/mozilla/nsprpub/pr/include/md/_linux.h	2013-11-10 21:15:04.556139100 -0300
 +++ libnspr-4.9.6/mozilla/nsprpub/pr/include/md/_linux.h	2013-11-10 21:15:33.245138154 -0300
-@@ -55,6 +55,8 @@
+@@ -55,6 +55,10 @@
  #define _PR_SI_ARCHITECTURE "avr32"
  #elif defined(__m32r__)
  #define _PR_SI_ARCHITECTURE "m32r"
++#elif defined(__microblaze__)
++#define _PR_SI_ARCHITECTURE "microblaze"
 +#elif defined(nios2)
 +#define _PR_SI_ARCHITECTURE "nios2"
  #else
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH 2/4 libnspr: add microblaze support

package/libnspr/libnspr-microblaze-nios2.patch

Quoted 13 lines · Spenser Gilliland

fixes autobuild failures

http://autobuild.buildroot.net/results/493/4932900522e87da84a47fbf2d796c2fbb3f7e741/build-end.log

---
  ...-nios2.patch => libnspr-microblaze-nios2.patch} | 59 ++++++++++++++++++++--
  1 file changed, 56 insertions(+), 3 deletions(-)

rename package/libnspr/{libnspr-nios2.patch => libnspr-microblaze-nios2.patch} (59%)

package/libnspr/libnspr-microblaze-nios2.patch renamed from package/libnspr/libnspr-nios2.patch +0 -0
similarity index 59%
rename from package/libnspr/libnspr-nios2.patch
rename to package/libnspr/libnspr-microblaze-nios2.patch

If you're anyway renaming patches, please at a sequence number.

package/libnspr/libnspr-microblaze-nios2.patch line 5

Quoted 10 lines

index cffb2ef..a82317b 100644

package/libnspr/libnspr-microblaze-nios2.patch renamed from package/libnspr/libnspr-nios2.patch +2 -1
@@ -1,14 +1,65 @@
-Add Nios-II support
+Add Microblaze and Nios-II support
 
+Signed-off-by: Spenser Gilliland<[email protected]>
  Signed-off-by: Ezequiel Garcia<[email protected]>
 

Maybe it's better to add this as a separate patch rather than updating
the existing patch. That will make it slightly easier to track upstream if either of these is ever accepted there.

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/4 libnspr: add microblaze support

Dear Arnout Vandecappelle,

Quoted 3 lines · Arnout Vandecappelle

Maybe it's better to add this as a separate patch rather than updating
the existing patch. That will make it slightly easier to track upstream if either of these is ever accepted there.

Fully agreed. Microblaze and NIOS II support should be in separate patches.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 3/4 libsigsegv: fix for microblaze

In reply to Spenser Gilliland

Fixes autobuild failure

http://autobuild.buildroot.net/results/799/799ac378713d82f9632a2aa925223e21157b1042/build-end.log
http://autobuild.buildroot.net/results/ae6/ae6a10ae7cd8f2d2f3891ea9c6e867695ca1acfe/build-end.log
http://autobuild.buildroot.net/results/db4/db48622f6c3a998ecec84ec51f21b4a031ab0fb5/build-end.log

---
 .../libsigsegv-0003-fix-microblaze-build.patch           | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 package/libsigsegv/libsigsegv-0003-fix-microblaze-build.patch
package/libsigsegv/libsigsegv-0003-fix-microblaze-build.patch new file +16 -0
new file mode 100644
index 0000000..4d96a83
@@ -0,0 +1,16 @@
+Add microblaze support
+
+Signed-off-by: Spenser Gilliland <[email protected]>
+
+Index: libsigsegv-2.10/m4/stack-direction.m4
+===================================================================
+--- libsigsegv-2.10.orig/m4/stack-direction.m4	2014-01-08 10:15:43.149509801 -0600
++++ libsigsegv-2.10/m4/stack-direction.m4	2014-01-08 10:16:57.249511153 -0600
+@@ -32,6 +32,7 @@
+       m68* | \
+       m88k | \
+       mcore | \
++      microblaze | \
+       mips* | \
+       mmix | \
+       mn10200 | \
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH 3/4 libsigsegv: fix for microblaze

Dear Spenser Gilliland,

Quoted 6 lines · Spenser Gilliland

Fixes autobuild failure

http://autobuild.buildroot.net/results/799/799ac378713d82f9632a2aa925223e21157b1042/build-end.log
http://autobuild.buildroot.net/results/ae6/ae6a10ae7cd8f2d2f3891ea9c6e867695ca1acfe/build-end.log
http://autobuild.buildroot.net/results/db4/db48622f6c3a998ecec84ec51f21b4a031ab0fb5/build-end.log

Missing empty new line before Signed-off-by line.

Other than that, looks good. Can you push the patch upstream?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH 3/4 libsigsegv: fix for microblaze

In reply to Spenser Gilliland
#9 lore raw

PATCH 4/4 pixman: do not build demos or tests

In reply to Spenser Gilliland

Test code does not compile correctly on microblaze architecture. Disable both tests and demos from being built to reduce failures and decrease build time.

Fixes autobuild failures

http://autobuild.buildroot.net/results/a4b/a4b0ce0621701df55c146609388c3e529ea3411e/build-end.log
http://autobuild.buildroot.net/results/e2f/e2f6e4750d8b93320681abf09157917d131c8de0/build-end.log
http://autobuild.buildroot.net/results/878/878f0665c1b3e0c8895912c3a5a3078f937a9c75/build-end.log
http://autobuild.buildroot.net/results/018/01869b49eb1d305cec98d4d9ecf046427e88c2f3/build-end.log
http://autobuild.buildroot.net/results/0e8/0e8a2f5fc1425e153c112f87083e8a93f726e3df/build-end.log
http://autobuild.buildroot.net/results/980/980e03c5f8a7678f3343439dc37636855f637f9e/build-end.log
http://autobuild.buildroot.net/results/e1c/e1c86da68e012dfbff345436b0967d7774c9d9c5/build-end.log
http://autobuild.buildroot.net/results/63c/63c4cc230fb0c1b359f2ca15721e20deaa0eecc9/build-end.log
http://autobuild.buildroot.net/results/db7/db7785da51133d9874857731de6e7ff19e13527b/build-end.log
http://autobuild.buildroot.net/results/af6/af6a646e560b9a743d909966a1243b1ee8dcb15f/build-end.log
http://autobuild.buildroot.net/results/e36/e360e979fbafa5add49dba4ae3f6972220966e0d/build-end.log
http://autobuild.buildroot.net/results/79e/79e4e0c94b833c247457d4839a46ff92a524f0bb/build-end.log
http://autobuild.buildroot.net/results/b67/b671f57bbfe3609d59d30281c7ee931b5ebf3df1/build-end.log

---
 package/pixman/pixman-disable-demos-and-tests.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 package/pixman/pixman-disable-demos-and-tests.patch
package/pixman/pixman-disable-demos-and-tests.patch new file +14 -0
new file mode 100644
index 0000000..f55fc0d
@@ -0,0 +1,14 @@
+pixman: do not build demos or tests
+
+Signed-off-by: Spenser Gilliland <[email protected]>
+
+Index: pixman-0.30.0/Makefile.am
+===================================================================
+--- pixman-0.30.0.orig/Makefile.am	2014-01-08 10:14:23.773508352 -0600
++++ pixman-0.30.0/Makefile.am	2014-01-08 10:14:39.549508640 -0600
+@@ -1,4 +1,4 @@
+-SUBDIRS = pixman demos test
++SUBDIRS = pixman
+ 
+ pkgconfigdir=$(libdir)/pkgconfig
+ pkgconfig_DATA=pixman-1.pc
Signature · 1 line
1.8.3.2
#10 lore raw

PATCH 4/4 pixman: do not build demos or tests

Dear Spenser Gilliland,

Quoted 18 lines · Spenser Gilliland

Test code does not compile correctly on microblaze architecture. Disable both tests and demos from being built to reduce failures and decrease build time.

Fixes autobuild failures

http://autobuild.buildroot.net/results/a4b/a4b0ce0621701df55c146609388c3e529ea3411e/build-end.log
http://autobuild.buildroot.net/results/e2f/e2f6e4750d8b93320681abf09157917d131c8de0/build-end.log
http://autobuild.buildroot.net/results/878/878f0665c1b3e0c8895912c3a5a3078f937a9c75/build-end.log
http://autobuild.buildroot.net/results/018/01869b49eb1d305cec98d4d9ecf046427e88c2f3/build-end.log
http://autobuild.buildroot.net/results/0e8/0e8a2f5fc1425e153c112f87083e8a93f726e3df/build-end.log
http://autobuild.buildroot.net/results/980/980e03c5f8a7678f3343439dc37636855f637f9e/build-end.log
http://autobuild.buildroot.net/results/e1c/e1c86da68e012dfbff345436b0967d7774c9d9c5/build-end.log
http://autobuild.buildroot.net/results/63c/63c4cc230fb0c1b359f2ca15721e20deaa0eecc9/build-end.log
http://autobuild.buildroot.net/results/db7/db7785da51133d9874857731de6e7ff19e13527b/build-end.log
http://autobuild.buildroot.net/results/af6/af6a646e560b9a743d909966a1243b1ee8dcb15f/build-end.log
http://autobuild.buildroot.net/results/e36/e360e979fbafa5add49dba4ae3f6972220966e0d/build-end.log
http://autobuild.buildroot.net/results/79e/79e4e0c94b833c247457d4839a46ff92a524f0bb/build-end.log
http://autobuild.buildroot.net/results/b67/b671f57bbfe3609d59d30281c7ee931b5ebf3df1/build-end.log

Quoted 1 line

Missing empty new line before Signed-off-by. Also, some comment below.

Quoted 15 lines
---
 package/pixman/pixman-disable-demos-and-tests.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 package/pixman/pixman-disable-demos-and-tests.patch
package/pixman/pixman-disable-demos-and-tests.patch new file +4 -0
new file mode 100644
index 0000000..f55fc0d
@@ -0,0 +1,14 @@
+pixman: do not build demos or tests
+
+Signed-off-by: Spenser Gilliland <[email protected]>
+

package/pixman/pixman-disable-demos-and-tests.patch line 14

Quoted 10 lines
package/pixman/pixman-disable-demos-and-tests.patch new file +10 -0
+Index: pixman-0.30.0/Makefile.am
+===================================================================
+--- pixman-0.30.0.orig/Makefile.am	2014-01-08 10:14:23.773508352 -0600
++++ pixman-0.30.0/Makefile.am	2014-01-08 10:14:39.549508640 -0600
+@@ -1,4 +1,4 @@
+-SUBDIRS = pixman demos test
++SUBDIRS = pixman
+ 
+ pkgconfigdir=$(libdir)/pkgconfig
+ pkgconfig_DATA=pixman-1.pc

This sort of solution annoys me a bit, because it is not upstreamable, but requires AUTORECONF = YES, which we would have to keep forever for this package. Therefore, I'd very much prefer a solution that is upstreamable (like additional --enable-demos / --enable-tests options, or if not accepted upstream, we can get back to an ugly SED of the Makefile.in).

Note that there is already a patch for pixman that touches configure.ac, but that patch is a backport from upstream, and therefore at the next upgrade of pixman, we could remove the patch, and remove AUTORECONF = YES.

Also, if you add a new patch to pixman, please add sequence numbers to the patches while you're at it :-)

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com