# Possible to set a different architecture during build?

**URL:** <https://forums.balena.io/t/possible-to-set-a-different-architecture-during-build/2556>\
**Category:** Product support\
**Tags:** raspberrypi3, arch\
**Created:** [February 13, 2018, 5:22pm UTC](https://forums.balena.io/t/possible-to-set-a-different-architecture-during-build/2556 "2018-02-13T17:22:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nckswt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/nckswt/32/368_2.png) [@nckswt](https://forums.balena.io/u/nckswt)\
**Post date:** [February 13, 2018, 5:22pm UTC](https://forums.balena.io/t/possible-to-set-a-different-architecture-during-build/2556/1 "2018-02-13T17:22:47Z")

</div>

I’m trying to use a third-party service to manage some package installations, but it fail to build on the [packet.net](http://packet.net) ARM v8 servers because of an architecture conflict. Was wondering if I could trick the command into thinking the build server was ARM v7 instead of ARM v8.

Here’s the details: I’m using `platformio` as a low-level build tool, and it’s trying to install packages like `tool-bossac`, but [the only binaries available](http://dl.platformio.org/packages/manifest.json) are for `linux_armv6l`, `linux_armv7l`, and `linux_aarch64`. I’ll be deploying these to a Raspberry Pi (so, `linux_armv7l`), but the build server is `linux_armv8l`, so the binaries aren’t found.

The compatibility search essentially relies on `uname`, so I should be able to trick it by adding `RUN setarch armv7l INSTALL_CMD` to my `Dockerfile`, but the only available architectures I’ve seen from `setarch --list` are `uname26`, `linux32`, `linux64` and `armv8l`.

Is there a way I can trick my `Dockerfile` to thinking it’s `armv7l` so I can grab these binaries?

---

<div class="post-metadata">

**Author:** ![mccollam](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mccollam/32/88_2.png) [@mccollam](https://forums.balena.io/u/mccollam)\
**Post date:** [February 16, 2018, 7:24pm UTC](https://forums.balena.io/t/possible-to-set-a-different-architecture-during-build/2556/4 "2018-02-16T19:24:15Z")

</div>

I’m a bit unclear what is getting the binaries here – is it platformio that is downloading them directly? Or are you pulling them in from a repository (through e.g. `apt`) in your Dockerfile?

If it’s platformio, I’d expect that there’s an environment variable that it should use to determine the architecture to use, overriding the detected one on the system.

Alternately, could you explicitly install the ARM v7 binaries in your Dockerfile and just call those directly?

---

<div class="post-metadata">

**Author:** ![nckswt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/nckswt/32/368_2.png) [@nckswt](https://forums.balena.io/u/nckswt)\
**Post date:** [February 19, 2018, 3:54pm UTC](https://forums.balena.io/t/possible-to-set-a-different-architecture-during-build/2556/11 "2018-02-19T15:54:08Z")

</div>

It’s via platformio - using their package management system, which I don’t think can be configured via environment variables. I might just have to install the packages manually and create aliases for platformio. Thanks for the suggestion!

---

<div class="post-metadata">

**Author:** ![shaunmulligan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/shaunmulligan/32/34_2.png) [@shaunmulligan](https://forums.balena.io/u/shaunmulligan)\
**Post date:** [February 20, 2019, 4:43pm UTC](https://forums.balena.io/t/possible-to-set-a-different-architecture-during-build/2556/12 "2019-02-20T16:43:25Z")

</div>

Hey @nckswt, just dropping into this thread to update you that the balena Native ARM builders now correctly identify their architecture as `armv7l` when building for the RPI3([release announcement](https://forums.balena.io/t/weekly-product-releases-20-02-2019/5369)), so you should now be able to build your project with out issue now.
