forked from ROMEO/obsw
Every compile step now works with docker! See README
This commit is contained in:
parent
6f6a331152
commit
c6c9fd6926
44
README.md
44
README.md
@ -6,6 +6,7 @@ IRS wireguard VPN can cause network issues with docker.
|
|||||||
##### Install Docker
|
##### Install Docker
|
||||||
https://www.docker.com/get-started/
|
https://www.docker.com/get-started/
|
||||||
|
|
||||||
|
|
||||||
## FSBL
|
## FSBL
|
||||||
|
|
||||||
##### Clone the repository and build the docker image:
|
##### Clone the repository and build the docker image:
|
||||||
@ -16,18 +17,20 @@ git clone https://github.com/Xilinx/embeddedsw/
|
|||||||
docker build -t compile_fsbl .
|
docker build -t compile_fsbl .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
##### To build the FSBL, run the following command in the `docker/compile-fsbl` directory:
|
##### To build the FSBL, run the following command in the `docker/compile-fsbl` directory:
|
||||||
```sh
|
```sh
|
||||||
docker run -v ./embeddedsw:/project compile_fsbl /bin/bash -c "cd lib/sw_apps/zynq_fsbl/src && make BOARD=zed SHELL=/bin/bash"
|
docker run -v ./embeddedsw:/fsbl compile_fsbl /bin/bash -c "cd lib/sw_apps/zynq_fsbl/src && make BOARD=zed SHELL=/bin/bash"
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
```sh
|
||||||
cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf .
|
cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf .
|
||||||
```
|
```
|
||||||
|
|
||||||
## mission_rust (not yet working)
|
|
||||||
|
## mission_rust
|
||||||
|
|
||||||
|
##### Build the docker image:
|
||||||
```sh
|
```sh
|
||||||
cd docker/compile_mission/
|
cd docker/compile_mission/
|
||||||
docker build -t compile_mission .
|
docker build -t compile_mission .
|
||||||
@ -37,7 +40,17 @@ docker build -t compile_mission .
|
|||||||
```sh
|
```sh
|
||||||
docker run -v $(pwd)/../../mission_rust:/mission_rust compile_mission /bin/bash -c "cargo build -Z build-std"
|
docker run -v $(pwd)/../../mission_rust:/mission_rust compile_mission /bin/bash -c "cargo build -Z build-std"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## obsw
|
## obsw
|
||||||
|
|
||||||
|
##### Clone the submodules (FreeRTOS and lwIP):
|
||||||
|
```sh
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Build the docker image:
|
||||||
```sh
|
```sh
|
||||||
cd docker/compile_obsw/
|
cd docker/compile_obsw/
|
||||||
docker build -t compile_obsw .
|
docker build -t compile_obsw .
|
||||||
@ -45,31 +58,12 @@ docker build -t compile_obsw .
|
|||||||
|
|
||||||
##### To build the obsw, run the following command in the `docker/compile_obsw` directory:
|
##### To build the obsw, run the following command in the `docker/compile_obsw` directory:
|
||||||
```sh
|
```sh
|
||||||
docker run -v $(pwd)/../../:/obsw compile_obsw /bin/bash -c "mkdir -p build_cli && cd build_cli && cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain . && make -j 8"
|
docker run -v $(pwd)/../..:/obsw compile_obsw /bin/bash -c "mkdir -p build_cli && cd build_cli && cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain .. && make -j 8"
|
||||||
```
|
```
|
||||||
|
|
||||||
# Non-Docker suff
|
The romeo-obsw binary can now be found in the `build_cli` directory.
|
||||||
|
|
||||||
|
|
||||||
Requirements [TBC]:
|
|
||||||
- cmake
|
|
||||||
- arm-none-eabi-gcc
|
|
||||||
- doxygen
|
|
||||||
- graphviz
|
|
||||||
|
|
||||||
Configure doxygen:
|
|
||||||
- export DOT_PATH=/usr/local/bin
|
|
||||||
|
|
||||||
|
|
||||||
In .../obsw/
|
|
||||||
```sh
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
mkdir build_cli
|
|
||||||
cd build_cli
|
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain ..
|
|
||||||
make -j 4 // or as much threads as your CPU has
|
|
||||||
```
|
|
||||||
|
|
||||||
# Debugging on zedboard
|
# Debugging on zedboard
|
||||||
|
|
||||||
|
@ -11,5 +11,5 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Remove the package lists to reduce the image size
|
# Remove the package lists to reduce the image size
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /project/
|
WORKDIR /fsbl/
|
||||||
|
|
||||||
|
@ -6,10 +6,24 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
make \
|
make \
|
||||||
cmake \
|
cmake \
|
||||||
|
gcc \
|
||||||
|
curl \
|
||||||
gcc-arm-none-eabi \
|
gcc-arm-none-eabi \
|
||||||
|
doxygen \
|
||||||
|
graphviz \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
# Remove the package lists to reduce the image size
|
# Remove the package lists to reduce the image size
|
||||||
|
|
||||||
|
# Install Rustup and select the nightly toolchain
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly && \
|
||||||
|
. $HOME/.cargo/env
|
||||||
|
|
||||||
|
# Add the Rust toolchain binaries to PATH
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
|
# Install the nightly Rust toolchain, the rust-src component, and set the override
|
||||||
|
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
WORKDIR /obsw/
|
WORKDIR /obsw/
|
||||||
|
|
||||||
|
# ENV DOT_PATH=/usr/local/bin # Works without this in debian @paul
|
Loading…
x
Reference in New Issue
Block a user