diff --git a/BUILD_WITH_DOCKER.md b/BUILD_WITH_DOCKER.md index f447fc2..79387fa 100644 --- a/BUILD_WITH_DOCKER.md +++ b/BUILD_WITH_DOCKER.md @@ -1,7 +1,7 @@ -## Prerequisits for build with Docker -##### Info +## Prerequisites for building with Docker +##### Please Note IRS wireguard VPN can cause network issues with docker. ##### Install Docker @@ -9,6 +9,11 @@ If you are using macOS or Windows, please use this tutorial: - https://www.docker.com/get-started/ On Linux simply use your package manager to install ```docker``` and prepare everything using these commands, to avoid permission denied errors: +On Arch Linux this would look like +```sh +sudo apt-get install docker # Ubuntu +sudo packman -Syy docker # Arch +``` ```sh sudo systemctl start docker @@ -16,9 +21,9 @@ sudo groupadd docker sudo usermod -aG docker $USER sudo reboot ``` +Congratulations, you installed docker. Please proceed. - -## FSBL +## First Stage Boot Loader (FSBL) FSBL is the First Stage Boot Loader and prepares the CPU and FPGA configuration for booting up the Second Stage Bootloader and finally the flight software. @@ -27,7 +32,7 @@ FSBL is the First Stage Boot Loader and prepares the CPU and FPGA configuration ```sh cd docker/compile_fsbl/ git clone https://github.com/Xilinx/embeddedsw/ -docker build -t compile_fsbl . +docker build -t compile_fsbl . # Legacy builder is deprecated and will be removed in future release. TODO ``` ##### To build the FSBL, run the following command in the `docker/compile-fsbl` directory: @@ -35,14 +40,23 @@ docker build -t compile_fsbl . docker run -v ./embeddedsw:/fsbl compile_fsbl /bin/bash -c "cd lib/sw_apps/zynq_fsbl/src && make BOARD=zed SHELL=/bin/bash" ``` +## Requirements [TBC]: +```sh +sudo apt-get install cdoxygen graphviz make arm-none-eabi-gcc # Ubuntu +sudo packman -Syy cmake adoxygen graphviz rm-none-eabi-gcc # Arch +``` +1. `doxygen` - tool to generate documentation for C++, C, ... +2. `graphviz` - graph visualisation +3. `cmake` - cross-platform build system +4. `arm-none-eabi-gcc` - precompiled GNU toolchain for certain ARM processors including GCC and GNU Debugger (GDB) -If you want, copy the fsbl.elf to the docker/compile_fsbl directory for easier access: +If you want, copy the `fsbl.elf` to the `docker/compile_fsbl` directory for easier access: ```sh cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf . ``` ## Steps -1. Configure doxygen: +1. Configure `doxygen`: ## mission_rust @@ -50,6 +64,23 @@ cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf . ```sh export DOT_PATH=/usr/local/bin ``` +2. Satisfy Rust requirements +```sh +cd ../mission_rust +cargo update +rustup toolchain install nightly +rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu +rustup override set nightly +cargo build -Z build-std +cd docker/compile_mission/ +docker build -t compile_mission . +``` + +3. Configure the ROMEO OBSW repository in `.../obsw/` +##### To build the mission_rust, run the following command in the `docker/compile_mission` directory: +```sh +docker run -v $(pwd)/../../mission_rust:/mission_rust compile_mission /bin/bash -c "cargo build -Z build-std" +``` ## obsw