[U-Boot] Cross-compiling U-Boot on Mac OS X -- can't find crc32.c?

I'm trying to cross-compile U-Boot on a Mac OS X system, which is BSD-like. I have a toolchain already created - I've been able to compile the Linux kernel with no problems. I figured U-Boot would be easier, but instead it's doing a lot of weird stuff.
So when I run "make", I get this:
$ make ARCH=ppc for dir in tools examples api_examples ; do make -C $dir _depend ; done make[1]: Nothing to be done for `_depend'. make[1]: Circular hello_world.c <- hello_world.c dependency dropped. make[1]: Circular sched.c <- sched.c dependency dropped. make[1]: Circular stubs.c <- stubs.c dependency dropped. make[1]: Circular ppc_longjmp.S <- ppc_longjmp.S dependency dropped. make[1]: Circular ppc_setjmp.S <- ppc_setjmp.S dependency dropped. make[1]: Nothing to be done for `_depend'. make[1]: Nothing to be done for `_depend'. make -C tools all cc -Wall -pedantic -idirafter /Volumes/Goliath/Users/timur/dev/u-boot.git/include -idirafter /Volumes/Goliath/Users/timur/dev/u-boot.git/include2 -idirafter /Volumes/Goliath/Users/timur/dev/u-boot.git/include -I /Volumes/Goliath/Users/timur/dev/u-boot.git/libfdt -I /Volumes/Goliath/Users/timur/dev/u-boot.git/tools -DTEXT_BASE=0xFE000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o crc32.o crc32.c powerpc-apple-darwin9-gcc-4.0.1: crc32.c: No such file or directory powerpc-apple-darwin9-gcc-4.0.1: no input files make[1]: *** [crc32.o] Error 1 make: *** [tools] Error 2
crc32.c is in lib_generic/, but the current directory is tools/, so I'm not surprised it doesn't compile. Has anyone tried this before? What am I missing?

On 18:30 Fri 01 May , Timur Tabi wrote:
I'm trying to cross-compile U-Boot on a Mac OS X system, which is BSD-like. I have a toolchain already created - I've been able to compile the Linux kernel with no problems. I figured U-Boot would be easier, but instead it's doing a lot of weird stuff.
So when I run "make", I get this:
$ make ARCH=ppc for dir in tools examples api_examples ; do make -C $dir _depend ; done make[1]: Nothing to be done for `_depend'. make[1]: Circular hello_world.c <- hello_world.c dependency dropped. make[1]: Circular sched.c <- sched.c dependency dropped. make[1]: Circular stubs.c <- stubs.c dependency dropped. make[1]: Circular ppc_longjmp.S <- ppc_longjmp.S dependency dropped. make[1]: Circular ppc_setjmp.S <- ppc_setjmp.S dependency dropped. make[1]: Nothing to be done for `_depend'. make[1]: Nothing to be done for `_depend'. make -C tools all cc -Wall -pedantic -idirafter /Volumes/Goliath/Users/timur/dev/u-boot.git/include -idirafter /Volumes/Goliath/Users/timur/dev/u-boot.git/include2 -idirafter /Volumes/Goliath/Users/timur/dev/u-boot.git/include -I /Volumes/Goliath/Users/timur/dev/u-boot.git/libfdt -I /Volumes/Goliath/Users/timur/dev/u-boot.git/tools -DTEXT_BASE=0xFE000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -O -c -o crc32.o crc32.c powerpc-apple-darwin9-gcc-4.0.1: crc32.c: No such file or directory powerpc-apple-darwin9-gcc-4.0.1: no input files make[1]: *** [crc32.o] Error 1 make: *** [tools] Error 2
crc32.c is in lib_generic/, but the current directory is tools/, so
IIRC this is fix on the Mainline
I'm not surprised it doesn't compile. Has anyone tried this before? What am I missing?
to compile on Mac OS you will have to move to the laster Mainline , fix the lib_ftd endian.h and byteswap.h does not exist on MAC OS X IIRC and fix the _depend Makefile target I've start to fix it but never find time to finish (some patch are already mainline)
Best Regards, J.

On Fri, May 1, 2009 at 7:10 PM, Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com wrote:
to compile on Mac OS you will have to move to the laster Mainline ,
What is that?

On Monday 04 May 2009 09:27:11 Timur Tabi wrote:
On Fri, May 1, 2009 at 7:10 PM, Jean-Christophe wrote:
to compile on Mac OS you will have to move to the laster Mainline ,
What is that?
the latest git source tree, not the latest release -mike

On Mon, May 4, 2009 at 7:47 PM, Mike Frysinger vapier@gentoo.org wrote:
On Monday 04 May 2009 09:27:11 Timur Tabi wrote:
On Fri, May 1, 2009 at 7:10 PM, Jean-Christophe wrote:
to compile on Mac OS you will have to move to the laster Mainline ,
What is that?
the latest git source tree, not the latest release
That's what I've been using, and that's what's broken.

On Fri, May 1, 2009 at 7:10 PM, Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com wrote:
to compile on Mac OS you will have to move to the laster Mainline , fix the lib_ftd endian.h and byteswap.h does not exist on MAC OS X IIRC and fix the _depend Makefile target I've start to fix it but never find time to finish (some patch are already mainline)
Well, I tried to fix it, but I can't figure it out. I just don't understand why it's so broken. The errors I get are so confusing, and I can't figure out what the Makefile is doing when it fails. So I give up.
Fortunately, I found a version of mkimage that builds just fine as-is, and that's all I care about for now. If anyone else is interested, you can find it here:
http://packages.debian.org/sid/uboot-mkimage
Just download the tarball and run 'make'.
Wolfgang, I think you seriously need to revamp your build process. The kernel is orders of magnitude more complex than U-Boot, and yet I can build it just fine on OS X.

Dear Timur Tabi,
In message ed82fe3e0905191838xe08a783yc8ac56c7bf67507b@mail.gmail.com you wrote:
Wolfgang, I think you seriously need to revamp your build process.
Hm... Do I? It works fine for me...
The kernel is orders of magnitude more complex than U-Boot, and yet I can build it just fine on OS X.
It's you who has OS X, and who has a problem. Only when Ah itchez, Ah scratchez.
Best regards,
Wolfgang Denk

On Wed, May 20, 2009 at 12:31 AM, Wolfgang Denk wd@denx.de wrote:
It's you who has OS X, and who has a problem. Only when Ah itchez, Ah scratchez.
Just so I'm clear on this, you're saying that you're not really concerned about how well U-Boot works for other people?

Timur Tabi wrote:
On Wed, May 20, 2009 at 12:31 AM, Wolfgang Denk wd@denx.de wrote:
It's you who has OS X, and who has a problem. Only when Ah itchez, Ah scratchez.
Just so I'm clear on this, you're saying that you're not really concerned about how well U-Boot works for other people?
No, people that aren't running OS X cannot debug problems that happen when running on OS X.
You wrote:
Well, I tried to fix it, but I can't figure it out. I just don't understand why it's so broken. The errors I get are so confusing, and I can't figure out what the Makefile is doing when it fails. So I give up.
followed by:
Wolfgang, I think you seriously need to revamp your build process. The kernel is orders of magnitude more complex than U-Boot, and yet I can build it just fine on OS X.
That sounds like you want Wolfgang to fix a problem he doesn't have and cannot reproduce, since he isn't running OS X (to the best of my knowledge). http://xkcd.com/583/
gvb

Jerry Van Baren wrote:
That sounds like you want Wolfgang to fix a problem he doesn't have and cannot reproduce, since he isn't running OS X (to the best of my knowledge).
No, what I really want is the build process to be simpler so that other people can fix problems with it. I don't even understand how it works when it *does* work.
A functioning build process on OS X will allow me to do more work on U-Boot, adding more features and fixing more bugs, than I normally would be able to do. But I can't fix every problem myself.

On Wednesday 20 May 2009 10:52:48 Timur Tabi wrote:
Jerry Van Baren wrote:
That sounds like you want Wolfgang to fix a problem he doesn't have and cannot reproduce, since he isn't running OS X (to the best of my knowledge).
No, what I really want is the build process to be simpler so that other people can fix problems with it. I don't even understand how it works when it *does* work.
again, that is your itch to scratch. people who are doing significant amount of work in u-boot have no problem with it as it exists now.
A functioning build process on OS X will allow me to do more work on U-Boot, adding more features and fixing more bugs, than I normally would be able to do. But I can't fix every problem myself.
this is open source. if you are unwilling or unable to do the work, i imagine there are plenty of people out there willing to take your money and do it for you. -mike

Dear Timur Tabi,
In message ed82fe3e0905011630q3fbc2054h481eaba3ca09590f@mail.gmail.com you wrote:
I'm trying to cross-compile U-Boot on a Mac OS X system, which is BSD-like. I have a toolchain already created - I've been able to compile the Linux kernel with no problems. I figured U-Boot would be easier, but instead it's doing a lot of weird stuff.
...
What am I missing?
Is this "make" a GNU make? Which version?
Best regards,
Wolfgang Denk

On Sat, May 2, 2009 at 12:49 AM, Wolfgang Denk wd@denx.de wrote:
Is this "make" a GNU make? Which version?
GNU Make 3.81
I've searched the archives for this mailing list, and I see that this issue comes up every now and then, but never with any resolution. If I could just get mkimage compiled, that would be okay for now. But according to Jean-Chrisophe's email, it looks like this would be not be trivial to fix.
participants (5)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Jerry Van Baren
-
Mike Frysinger
-
Timur Tabi
-
Wolfgang Denk