Building Anduril with Docker

13 posts / 0 new
Last post
SammysHP
SammysHP's picture
Offline
Last seen: 4 hours 33 min ago
Joined: 06/25/2019 - 14:35
Posts: 1711
Location: Germany
Building Anduril with Docker

Building your own version of Anduril, the simple way.

https://github.com/SammysHP/anduril-buildenv-docker

No tools to install (except Docker), reliable build. Step by step guide:

  1. Install Docker. This might help: https://docs.docker.com/engine/install/
  2. Download the latest release’s anduril-bilder_v*.tar.xz from here: https://github.com/SammysHP/anduril-buildenv-docker/releases
  3. Open a terminal and import the image:
    docker load < anduril-builder_v*.tar.xz
  4. Get the source code of Anduril, if you don’t have it yet. You can either download an archive or use Breezy:
    brz branch lp:~toykeeper/flashlight-firmware/anduril2
  5. Then compile Anduril, adjust the path as necessary:
    docker run --rm -v /tmp/flashlight-firmware:/src anduril-builder

See the README in the repository for more information.

TODO: Test with more platforms, use a container registry.

Edited by: SammysHP on 08/21/2022 - 14:40
Haukkeli
Offline
Last seen: 19 hours 19 sec ago
Joined: 06/24/2021 - 05:27
Posts: 510
Location: Suomi

Interesting

thefreeman
thefreeman's picture
Offline
Last seen: 47 min 2 sec ago
Joined: 01/06/2020 - 09:56
Posts: 1724
Location: France

Trying this but it says that : 

C:\Users\Charles>docker run --rm -v /652/anduril2:/src anduril-builder
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed:
unable to start container process: exec: "./build-all.sh": stat ./build-all.sh: no such file or directory: unknown.
SammysHP
SammysHP's picture
Offline
Last seen: 4 hours 33 min ago
Joined: 06/25/2019 - 14:35
Posts: 1711
Location: Germany

That sounds like a problem with Windows. Does your build-all.sh script in the anduril directory have executable permission (when inside the container)?

docker run --rm -v /652/anduril2:/src --entrypoint "" anduril-builder stat build-all.sh
thefreeman
thefreeman's picture
Offline
Last seen: 47 min 2 sec ago
Joined: 01/06/2020 - 09:56
Posts: 1724
Location: France

stat: can’t stat ‘build-all.sh’: No such file or directory

SammysHP
SammysHP's picture
Offline
Last seen: 4 hours 33 min ago
Joined: 06/25/2019 - 14:35
Posts: 1711
Location: Germany

Is /652/anduril2 the absolute path to the flashlight-firmware directory (which contains alexvh, bin, DrJones, dthoang, …)? I don’t know how files are accessed in Windows/WSL.

thefreeman
thefreeman's picture
Offline
Last seen: 47 min 2 sec ago
Joined: 01/06/2020 - 09:56
Posts: 1724
Location: France

It’s not, it’s the relative path to C:\Users\Charles
Now that I put the absolute path it works, thanks for pointing it out.

OK so this is fairly simple way to build Anduril on non Linux systems, with the exception of downloading the source code because the download link on Launchpad still doesn’t work (probably won’t ever at this point), I haven’t tried to install breezy but it looks overly complicated.

Edit : 3 builds failed : noctigon-k9.3-219, noctigon-k9.3-nofet and noctigon-k9.3, but maybe that’s unrelated.
Edit2 : yes they fail on Linux too.

SammysHP
SammysHP's picture
Offline
Last seen: 4 hours 33 min ago
Joined: 06/25/2019 - 14:35
Posts: 1711
Location: Germany

thefreeman wrote:
It’s not, it’s the relative path to C:\Users\Charles
Now that I put the absolute path it works, thanks for pointing it out.
Great!

thefreeman wrote:
OK so this is fairly simple way to build Anduril on non Linux systems, with the exception of downloading the source code because the download link on Launchpad still doesn’t work (probably won’t ever at this point), I haven’t tried to install breezy but it looks overly complicated.
The older Bazaar might be easier to use on Windows.

I have a mirror on GitHub: https://github.com/SammysHP/flashlight-firmware
There you can download the source as an archive, for example the anduril2 branch: https://github.com/SammysHP/flashlight-firmware/archive/refs/heads/andur...

thefreeman wrote:
Edit : 3 builds failed : noctigon-k9.3-219, noctigon-k9.3-nofet and noctigon-k9.3, but maybe that’s unrelated.
Indeed, these errors are unrelated. ToyKeeper has disabled the build for these targets as they don’t work.
flightless22
flightless22's picture
Offline
Last seen: 5 days 9 hours ago
Joined: 11/19/2018 - 12:07
Posts: 768
Location: California

That’s great. I’ll try this on raspbian when I get the chance.

SammysHP
SammysHP's picture
Offline
Last seen: 4 hours 33 min ago
Joined: 06/25/2019 - 14:35
Posts: 1711
Location: Germany

flightless22 wrote:
That’s great. I’ll try this on raspbian when I get the chance.

The provided image is x86_64 only. But you can try building an image for ARM yourself as described in the README.
thefreeman
thefreeman's picture
Offline
Last seen: 47 min 2 sec ago
Joined: 01/06/2020 - 09:56
Posts: 1724
Location: France

SammysHP wrote:
The older Bazaar might be easier to use on Windows.

I have a mirror on GitHub: https://github.com/SammysHP/flashlight-firmware
There you can download the source as an archive, for example the anduril2 branch: https://github.com/SammysHP/flashlight-firmware/archive/refs/heads/andur...

Last time I tried Bazaar explorer it gave some errors (or crashes), still the case.

Your mirror is with your modifications though ? And Gchart is on launchpad too so same problem.

Edit :

There is a typo in the first post there :

Quote:
docker load < anduril-bilder_v*.tar.xz
SammysHP
SammysHP's picture
Offline
Last seen: 4 hours 33 min ago
Joined: 06/25/2019 - 14:35
Posts: 1711
Location: Germany

thefreeman wrote:
Your mirror is with your modifications though ? And Gchart is on launchpad too so same problem.
My modifications are in separate branches (see here for details). The anduril2 branch is a direct mirror of the upstream branch.

thefreeman wrote:
There is a typo in the first post there
Thanks, fixed!
thefreeman
thefreeman's picture
Offline
Last seen: 47 min 2 sec ago
Joined: 01/06/2020 - 09:56
Posts: 1724
Location: France

Ah, that’s great then