[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] bridge-utils conversion to flat binary



Hi Paul,

Paul Hartke wrote:
I am working on getting bridge-utils up and running in Microblaze uclinux
but somehow the compilation isn't working properly:

# brctl
BINFMT_FLAT: bad magic/rev (0x1020100, need 0x4)
BINFMT_FLAT: bad magic/rev (0x1020100, need 0x4)
 ELF   : not found

It's an ELF binary, elf2flt hasn't run on it yet.

I've used
http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux/wiki/index.php/OutOfTreeCompile
before but there is nothing specific in there about explicitly linking
against the uClinux libraries and converting to a flat binary.

I've just tweaked that Wiki page to add the line PATH=$(PATH):${ROOTDIR)/tools

to the out of tree Makefile. It's necessary to pick up the ucfront tool that is now part of the build process.

but, that's not the problem you are seeing...

user/bridge-utils/brctl/Makefile has Microblaze options in the CFLAGS var so
it knows about Microblaze uclinux.  I'm not sure where to look next...

The LDFLAGS build variable (with -W,elf2flt) isn't getting passed into the GNU autoconfigure Makefiles. Try the attached patch.

Regards,

John
Index: user/bridge-utils/makefile
===================================================================
--- user/bridge-utils/makefile	(revision 282)
+++ user/bridge-utils/makefile	(working copy)
@@ -4,7 +4,7 @@
 	$(MAKE) -f Makefile
 
 Makefile:
-	./configure --host=$(CROSS_COMPILE:-=) $(CONFOPTS)
+	CC="$(CC) $(CFLAGS) $(LDFLAGS)" ./configure --host=$(CROSS_COMPILE:-=) $(CONFOPTS)
 
 clean:
 	$(MAKE) -f Makefile clean