OpenWRT Tool Chain on Windows for Omega
I am wanting to build some c/c++ libs for use on the Omega
I normally run on Windows 10 and have been looking for how I could set up a cross compiling tool chain under Windows 10.
So far, as far as I can see this actually isn't possible and can only be done under Linux (e.g. Debian etc.)
If anyone know how this can be set up under windows I would be most greatful for any information, links etc.
If it is not possible, I will have to set up a Debian VM under VirtualBox to do it - I have found instructions on how to set up and use the tool chain under Debian
You are better off making a VM really. There are so many barriers to entry to develop Linux on Windows you'd be frustrated half the time. Have a look at this guide to see how to set up a build environment for OpenWRT on a VM
@TNT Thanks for the reply.
Much appreciated. In the past I have had experience with trying to develop for Linux on Windows and am aware that it can be fraught with problems - was just hoping in vain that maybe someone had cracked it for OpenWRT :-)
I will go down the VM route. Thanks for the link you sent - I had already found that - but it is much appreciated that you spent the time to reply to my post.
We've tried to set up a compile environment under Windows with cygwin at one point, but it didn't work out because the system is case-insensitive. As a result, many scripts don't work under such a build environment. It's also the same problem under OSX if the filesystem is formatted in the case-insensitive mode.
@Boken-Lin Thanks for your reply - that was pretty well what I thought - I have hit similar issues in the past.
Currently in process of setting up a Debian5 VM to enable me to do what I want.
@Kit-Bishop If you set up docker on windows, you could try to use:
Just get into the container and run 'make'. If it compiles the toolchain, it should work for your needs. However, I've yet to build the image completely from this Dockerfile. For me, due to firewall issues, I can only build the toolchain and the images fail when it tries to download needed tarballs :(
Details on the ENV variables you'll need to set are in the poorly formatted README file in that repo.
@Theodore-Borromeo Thanks for the link. Much appreciated. Will follow it up
This may be slightly off topic, but I am hoping someone can help me out.
In relation to various posts above, I have done the following:
- Created a VM running Debian 5 based largely on information from http://wiki.openwrt.org/doc/howto/buildvm - this all went well
- Proceeded with trying to set up the OpenWrt build system as in http://wiki.openwrt.org/doc/howto/buildroot.exigence this largely went OK up to a point
However, did have some issues I am unclear about:
a. When executing the listed command:
./scripts/feeds install -a
I get the message:
Build dependency: Please install Git (git-core) >= 1.6.5
Yet when I do:
sudo apt-get upgrade git-core
it tells me it is up to date
When executing the command:
I get the same message regarding git-core dependency.
Does any one know what I should do. Thanks in advance :-)
@Kit-Bishop Debian 5 is from 2009, so it is extremely old. See if moving to Debian 6 would solve this issue. I typically use Ubuntu, which is usually much more up to date.
@Boken-Lin Thanks. Will give Debian 6 a try. I was going by the instructions in: http://wiki.openwrt.org/doc/howto/buildvm
Where it says:
To set up the development system, download Debian (here 5.0).
But Ive just noticed that page is actually quite old: dated: 2011/12/30
So if you login to docker from the command line and do:
docker pull borromeotlhs/onion-omega:v0
You should receive a container that is ready to have:
ran in it :) I'll be trying to build once more on my 2008 macbook pro :P
I saw this tutorial the other day : https://giovanni.wordpress.com/2011/01/23/how-to-cross-compile-a-c-program-for-openwrt/
It should not be too hard to setup a cross compile environment on Linux
@Fred-Blais Thanks for the link. Always useful to have something that explains things simply and clearly :-) Should be useful once I have the cross compile environment set up.
Seems to be progressing with my make call :) Currently at San Diego Intl Airport before my vacation to Maui to finish this up! I can't wait to 'docker commit' this thing and push it once and if it completes. . .
@Theodore-Borromeo i know that feeling all too well...
@Boken-Lin Above, you suggested that I try to: See if moving to Debian 6 would solve this issue
On going to the Debian site to get a newer version, I noticed that the current stable version of Debian is 8.2.0
Do you think it would be safe to go straight to Debian 8.2.0 for setting up the OpenWRT tool chain?
Well, it seems that my compile went through. Apparently, you NEED internet while openwrt builds :( After reconnecting every 45 minutes at LAX, it seems to have finished! :)
https://hub.docker.com/r/borromeotlhs/onion-omega/tags/ @ tag: 'v1' should be the completely compiled toolchain :P
in a Dockerfile. . . Good luck!
Finally had time to get back to this :-)
Have now set up a more lightweight and up to date system on a VM - kubuntu 14.04
Have managed to proceed further following instructions in: https://github.com/OnionIoT/OpenWRT-Packages/wiki/Setting-Up-the-Cross-Compile-Environment
Got as far as Step 6a: make
This initially failed, but I tracked the problem down to not having texinfo
Resolved by using apt-get install texinfo
Perhaps this should be mentioned in the above referenced link?