OpenWrt Forum Archive

Topic: OpenWRT compile on OS X an grub

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi there,

Im trying to compile OpenWRT for my Alix2d13 (x86) an OS X (Leopard 10.5.6), everything runs fine, but grub is not builded and thus the resulting image is not bootable ... If I do the same on my linux-box, everything including grub works like expected. So is there a work around to force the installation of grub during a build under OS X.

Thanks in advance,

Thorsten

(Last edited by thorstenk on 19 Jun 2009, 12:38)

grub fails to compile when built on OS X, so it is disabled. If you figure out how to resolve this issue we will be happy to correct it.

thorstenk:

On your Mac, did you switch to case sensitive and journaled for the filesystem? There are lots of things that won't compile right for OpenWRT if you don't switch.

Then, you should make sure you install all the necessary prerequisites for a successful compile. You can use Fink or Ports for almost all of the dependencies.

Finally, you should really download the latest Xcode development tools from the Apple developer site (they are free), and make sure you switch the default GCC from the ancient 4.0.1 to the new version you just downloaded by changing the symbolic links. On my system I see:

marca56:~ marca56$ gcc -ver
i686-apple-darwin9-gcc-4.2.1: no input files
marca56:~ marca56$                             

I'm successfully building OpenWRT images on OS X 10.5.7 on a MacBook Pro 1.83GHz system.

marc.

Okay, thanks a lot!
So the complete building process is working perfectly, no errors or something else. But grub is not builted. Does this behaviour change if I use a newer versoin of the Xcode tools?

So marca56 have you a succesfull built of grub under os x?

Thorsten

Hi,

it looks like there is no chance to build grub under os X. However to get a working build for an x86 system you need a bootloader/ mbr in the image, so is there any other method to become a bootable image under os X, another bootloder which compiles under os X or an other trick which makes the whole thing booting?

Thorsten

Thorstenk:

I haven't checked because I build for brcm63xx, but if you select the x86 target, there should be several entries in the make menuconfig directory under Boot Loaders --->

marc.

There is just grub and lilo.
The problem is, that lilo is that I am not able to build lilo, it asks for as86 and ld86 which are (correct me if I am wrong) only usable under linux.
This means we can not build a bootable image for x86 platforms under os X!? Or are there any other possible solutions for this?

Thorsten

The discussion might have continued from here.