forked from ROMEO/obsw
compiling mission_rust seems to work now! See README
This commit is contained in:
parent
30b8dd2abe
commit
42430e9d69
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@
|
||||
/build*
|
||||
.vscode
|
||||
__pycache__/*
|
||||
**/__pycache__/*
|
||||
**/__pycache__/*
|
||||
*.elf
|
39
README.md
39
README.md
@ -1,5 +1,12 @@
|
||||
# FSBL
|
||||
## Build with Docker
|
||||
|
||||
# Build with Docker
|
||||
|
||||
##### Install Docker
|
||||
https://www.docker.com/get-started/
|
||||
|
||||
### FSBL
|
||||
|
||||
##### Clone the repository and build the docker image:
|
||||
|
||||
```sh
|
||||
cd docker/compile_fsbl/
|
||||
@ -9,7 +16,7 @@ docker build -t compile_fsbl .
|
||||
docker build might fail because of firewall settings or the IRS wireguard VPN.
|
||||
|
||||
|
||||
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
|
||||
docker run -v ./embeddedsw:/project compile_fsbl /bin/bash -c "cd lib/sw_apps/zynq_fsbl/src && make BOARD=zed SHELL=/bin/bash"
|
||||
```
|
||||
@ -19,7 +26,20 @@ If you want, copy the FSBL.elf to the docker/compile_fsbl directory for easier a
|
||||
cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf .
|
||||
```
|
||||
|
||||
# Building
|
||||
### mission_rust
|
||||
```sh
|
||||
cd docker/compile_mission/
|
||||
docker build -t compile_mission .
|
||||
```
|
||||
|
||||
##### 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"
|
||||
```
|
||||
|
||||
|
||||
# Non-Docker suff
|
||||
|
||||
|
||||
Requirements [TBC]:
|
||||
- cmake
|
||||
@ -30,15 +50,6 @@ Requirements [TBC]:
|
||||
Configure doxygen:
|
||||
- export DOT_PATH=/usr/local/bin
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
In .../obsw/
|
||||
```sh
|
||||
@ -47,7 +58,7 @@ git submodule update
|
||||
mkdir build_cli
|
||||
cd build_cli
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain ..
|
||||
make -j 4
|
||||
make -j 4 // or as much threads as your CPU has
|
||||
```
|
||||
|
||||
|
||||
|
26
docker/compile_mission/Dockerfile
Normal file
26
docker/compile_mission/Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
# Use Debian 12.5 as the base image
|
||||
FROM debian:12.5
|
||||
|
||||
# Set environment variables to avoid any interactive dialogue
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install dependencies required for Rust and rustup
|
||||
RUN apt-get update && apt-get install -y curl gcc cmake && \
|
||||
# Clean up the apt cache to reduce image size
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# Your project's specific setup steps here
|
||||
# For example, setting the working directory and copying your project files into the container
|
||||
WORKDIR /mission_rust/
|
||||
|
Loading…
x
Reference in New Issue
Block a user