Based on repositories on 29 Dec. 2022.
mkdir docker-build
cd docker-build# get the right branch of llvm-mos
wget https://github.com/mrk-its/llvm-mos/archive/refs/heads/lldb-mos.zip
unzip llvm-mos-lldb-mos.zip
mv llvm-mos-lldb-mos llvm-mos # -> llvm-mos/
# get the right branch of llvm-mos-sdk
git clone https://github.com:mrk-its/llvm-mos-sdk.git
cd rust-mos
git checkout rust-mos # -> llvm-mos-sdk/
cd ..
# get rust-mos; this *must* be through git clone due to submodules
git clone https://github.com/mrk-its/rust-mos # -> rust-mos/You should now have three new directories: llvm-mos, llvm-mos-sdk, and rust-mos.
-
In
Dockerfile-llvmyou may tweek what is build. Importantly we include theAArch64target, and have further omittedlldbfromLLVM_ENABLE_PROJECTS(you may want to add it, but so far untested) -
The
config.tomlfile must contain[target.XXX]that you want to build. Here it's[target.aarch64-unknown-linux-gnu]. It also specifies where llvm-mos is installed which will be in/usr/local.
In the docker-build/ directory do:
-
docker build -t llvm-mos -f $HOME/docker/Dockerfile-llvm .This is a slow process that requires plenty of disk space and memory. -
docker build -t rust-mos -f $HOME/docker/Dockerfile-rust .The Dockerfile also contains architectural information and is currently set toaarch64linux. -
Verify that you have the
rust-mosimage withdocker image ls.