C tool chain no longer works
-
I downloaded the recommended tool chain for cross compiling from https://s3-us-west-2.amazonaws.com/onion-cdn/community/openwrt/OpenWrt-Toolchain-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2 and built an executable on Linux Mint. I then transferred the file to my Omega2+ . When I run it I get the message:
./hello: line 1: syntax error: unexpected word (expecting ")")
Running file on the executable produces:
hello: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld-uClibc.so.0, not stripped
For reference running file on file produces:
/usr/bin/file: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld-musl-mipsel-sf.so.1, corrupted section header size
It seems that Onion has changed the bit order (MSB to LSB) and interpreter used, so a new tool chain is needed.
-
When you find a new toolchain that works, please post a link to the tools.
-
@Rob-Baruch Looks like the issue as described by @Alan-Backlund is because the Omega2 needs a toolchain for the MT7688 rather than AR71XX
As per https://community.onion.io/topic/1134/guide-to-cross-compilation-for-omega2/6 I am working on making a toolchain available for the MT7688 and will posted it when done
-
Kit,
Thanks! I look forward to your post!
Best,
Rob
-
I uploaded the toolchain from my custom build of LEDE here: https://dl.dropboxusercontent.com/u/11811685/lede-toolchain-ramips-mt7688_gcc-5.4.0_musl-1.1.15.Linux-x86_64.tar.bz2
-
@WereCatf Thanks for that
I have found what I believe to be the LEDE repository (https://github.com/Juiceman/apm82181-lede) and have cloned it and am in the process of building an image and the toolchain myself.
I note that the toolchain you listed in your message uses musl whereas the toolchain I previously had for the AR71XX for the original Omega uses uClibc
Do you know which should be used for the Omega2 (still don't have mine yet so can't check yet :-() Do you know if it matters?
-
@Kit-Bishop It is musl.
-
@Kit-Bishop said in C tool chain no longer works:
I have found what I believe to be the LEDE repository (https://github.com/Juiceman/apm82181-lede) and have cloned it and am in the process of building an image and the toolchain myself.
Why do you think his repo has anything to do with Omega2+? Why don't you just use the official LEDE-repo?
-
@WereCatf Two things:
-
Re: It is musl - thanks
-
Re: Why do you think his repo has anything to do with Omega2+? Why don't you just use the official LEDE-repo? - I was having trouble finding the repository for LEDE (got confused by the LEDE site referring to Source Code - Git Repositories - my bad!) Think I have found what is needed now at https://lede-project.org/docs/guide-developer/quickstart-build-images and am now using https://git.lede-project.org/source.git - hopefully this is the right one - correct me if I'm still wrong!
-
-
@Kit-Bishop said in C tool chain no longer works:
- Re: Why do you think his repo has anything to do with Omega2+? Why don't you just use the official LEDE-repo? - I was having trouble finding the repository for LEDE (got confused by the LEDE site referring to Source Code - Git Repositories - my bad!) Think I have found what is needed now at https://lede-project.org/docs/guide-developer/quickstart-build-images and am now using https://git.lede-project.org/source.git - hopefully this is the right one - correct me if I'm still wrong!
No, that's correct. I prefer to use their github-repo ( https://github.com/lede-project/source ) instead, but that's just because I'm so used to github. If you want to add a profile for Omega2+ to LEDE take a look at the two latest commits in my own fork of LEDE at https://github.com/WereCatf/source.git
-
@WereCatf Cool - thanks
Will let you know how things go
-
@Kit-Bishop All in progress now - but takes quite a time to do the
make
One thing I was wondering about and would value your input on.
Do you thing it is worth adding the line:src-git onion https://github.com/OnionIoT/OpenWRT-Packages.git
to the file
feeds.conf.default
?
-
@Kit-Bishop If you're only building the toolchain, then you don't need that feed. If you want to build a custom image and want to include something from there, then by all means. Many of the packages fail to build for me, however, due to git permission-errors.
-
@WereCatf Understood - but it may well be useful to also build Omega specific packages for the Omega2 so I will include the OnionoIoT to feeds
-
I just tried WereCatf's toolchain and (after upgrading my libstdc++.so.6) it works!
Many thanks