Cross compiling for AR71xx


Kumar Gala
 

On Feb 10, 2021, at 5:07 AM, Piotr Barszczewski <piotr@1am.pl> wrote:

Hello,

I am wondering that since among others Zephyr supports Intel x86 (32- and 64-bit) would it be theoretically possible to cross compile it to AR71xx architecture, quite popular as OpenWRT host? I’ve done that with other C/C++ projects and even golang library with ENV CGO_ENABLED=1 and CC= pointing to my mips-openwrt-linux-musl-gcc toolchain.
I would want to try it out but the amount of potential problems to overcome is quite significant so wanted I to ask if anyone has tried that before or knows where one could find more information about such an experiment?
The reason for that is that it could potentially unify my development stack consisting of nRF528xx chips for BLE running on Zephyr <-> gateway devices (this is where Zephyr on AR71xx comes in) <-> desktop apps which again can be written in Zephyr.
While technically possible there isn’t a port of Zephyr in the upstream code base for MIPS. There are some PRs for this but they haven’t gotten to a mergeable state.

In addition, as Zephyr is a RTOS it requires porting to the hardware you’re interested in running it on.

I suggest search for MIPS in the GitHub PR and issues for more details.

- k


Piotr Barszczewski <piotr@...>
 

Hello,

I am wondering that since among others Zephyr supports Intel x86 (32- and 64-bit) would it be theoretically possible to cross compile it to AR71xx architecture, quite popular as OpenWRT host? I’ve done that with other C/C++ projects and even golang library with ENV CGO_ENABLED=1 and CC= pointing to my mips-openwrt-linux-musl-gcc toolchain.
I would want to try it out but the amount of potential problems to overcome is quite significant so wanted I to ask if anyone has tried that before or knows where one could find more information about such an experiment?
The reason for that is that it could potentially unify my development stack consisting of nRF528xx chips for BLE running on Zephyr <-> gateway devices (this is where Zephyr on AR71xx comes in) <-> desktop apps which again can be written in Zephyr. 

Best regards,
PB