Unable to compile firmware with microblaze

I am running Ubuntu 10.10 2.6.35-22-generic with x86_64. I tried the
prebuilt binary as per instructions here:
http://gnuradio.org/redmine/wiki/gnuradio/USRP2UserFAQ

Specifically, I did the following:

================
$ wget http://gnuradio.org/tools/mb-gcc-4.1.1.gr2.i386.tar.gz

Once you’ve downloaded the tarball,

$ sudo bash

cd /opt

tar xzvf

Then add /opt/microblaze/bin to PATH ( export
PATH=$PATH:/opt/microblaze/bin )

However, when I run configure.gnu in the firmware directory, I get the
following error in config.log:

configure:3134: error: in
`/home/rahul/vmimo/code/gnuradio/usrp2/firmware’:
configure:3137: error: C compiler cannot create executables

When I also explicitly run:

mb-gcc with our without explicit path qualifier of /opt/microblaze/bin/,
I get the following error:

$ /opt/microblaze/bin% ./mb-gcc
zsh: no such file or directory: ./mb-gcc

This despite the file existing:

$ /opt/microblaze/bin% ls -l mb-gcc
-rwxr-xr-x 1 500 500 192961 2008-10-13 19:47 mb-gcc*

Any ideas?

Thanks,
Arun

I am also trying to build the microblaze compiler from scratch but I am
unable to get the patch from svn.

$ svn export
http://gnuradio.org/svn/gnuradio/trunk/dtools/microblaze/mb-gcc-4.1.1-gr-1.patch

svn: OPTIONS of
http://gnuradio.org/svn/gnuradio/trunk/dtools/microblaze/mb-gcc-4.1.1-gr-1.patch’:
200 OK (http://gnuradio.org)

Where can I get this patch?

Arun

On Tue, Oct 26, 2010 at 10:04:10PM -0400, Arun Pillai wrote:

Arun
Arun,

The microblaze compiler has been quite an annoyance.

Although I haven’t tried it yet, you may want to try the mb_gnu.git
project at http://git.xilinx.com

But see also below…

Once you’ve downloaded the tarball,
following error in config.log:
zsh: no such file or directory: ./mb-gcc

This despite the file existing:

$ /opt/microblaze/bin% ls -l mb-gcc
-rwxr-xr-x 1 500 500 192961 2008-10-13 19:47 mb-gcc*

Any ideas?

If you run

$ ldd /opt/microblaze/bin/mb-gcc

Are all of the shared libraries found?

It’s a 32-bit app. Depending on your OS and machine, you may need to
install 32-bit versions of the required libraries.

Eric

Eric,

The output of ldd is below:

$ ldd /opt/microblaze/bin/mb-gcc
not a dynamic executable

Arun

On Tue, Oct 26, 2010 at 10:48:23PM -0400, Arun Pillai wrote:

Eric,

The output of ldd is below:

$ ldd /opt/microblaze/bin/mb-gcc
not a dynamic executable

What does

$ file /opt/microblaze/bin/mb-gcc

Give?

I get:

$ file /opt/microblaze/bin/mb-gcc
/opt/microblaze/bin/mb-gcc: ELF 32-bit LSB executable, Intel 80386,
version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.9, not stripped

If that doesn’t work, please try building the one from git.xilinx.com.
With luck, it might even build out of the box. (Why Xilinx hasn’t
gotten the microblaze stuff accepted into the gcc main line is beyond
me…)

Eric

I get exactly what you get.

$ file /opt/microblaze/bin/mb-gcc
/opt/microblaze/bin/mb-gcc: ELF 32-bit LSB executable, Intel 80386,
version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.9, not stripped

Arun

On Tue, Oct 26, 2010 at 11:50:34PM -0400, Arun Pillai wrote:

I get exactly what you get.

$ file /opt/microblaze/bin/mb-gcc
/opt/microblaze/bin/mb-gcc: ELF 32-bit LSB executable, Intel 80386,
version 1 (SYSV), dynamically linked (uses shared libs), for
GNU/Linux 2.6.9, not stripped

Arun

I think you’re missing an i386 compatibility library.
Sorry, I’m not sure what it’s called under Ubuntu.

Eric