forked from ROMEO/obsw
compiling fsbl with docker works now! See README
This commit is contained in:
parent
102e30a2b5
commit
30b8dd2abe
52
Dockerfile
52
Dockerfile
@ -1,52 +0,0 @@
|
|||||||
FROM debian:bookworm-slim
|
|
||||||
|
|
||||||
# Install required packages
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
gcc \
|
|
||||||
g++ \
|
|
||||||
git \
|
|
||||||
curl \
|
|
||||||
wget \
|
|
||||||
make \
|
|
||||||
openocd \
|
|
||||||
gdb-multiarch \
|
|
||||||
gcc-arm-none-eabi \
|
|
||||||
fish \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
|
|
||||||
# Install Rust toolchain
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
||||||
RUN rustup target add armv7-unknown-linux-gnueabihf
|
|
||||||
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
|
||||||
RUN rustup override set nightly
|
|
||||||
|
|
||||||
# # Clone FSBL code from the Xilinx repository
|
|
||||||
# RUN git clone https://github.com/Xilinx/embeddedsw.git
|
|
||||||
# # Build the FSBL
|
|
||||||
# RUN cd embeddedsw/lib/sw_apps/zynq_fsbl/src/ && make BOARD=zed CFLAGS=-DFSBL_DEBUG_INFO
|
|
||||||
|
|
||||||
|
|
||||||
# RUN cd mission_rust
|
|
||||||
# RUN cargo update
|
|
||||||
# RUN cargo build -Z build-std
|
|
||||||
|
|
||||||
# Set a working directory
|
|
||||||
# WORKDIR /workspace/mission_rust
|
|
||||||
# Assuming the Rust project is copied into the container
|
|
||||||
WORKDIR /workspace/
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build commands can be added here if needed
|
|
||||||
# For example, to build the FSBL project:
|
|
||||||
# RUN cd embeddedsw/lib/sw_apps/zynq_fsbl/src/ && make BOARD=zed CFLAGS=-DFSBL_DEBUG_INFO
|
|
||||||
|
|
||||||
# RUN mkdir build_cli
|
|
||||||
# RUN cd build_cli
|
|
||||||
# RUN cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain ..
|
|
||||||
|
|
||||||
# Set the entrypoint to a shell
|
|
||||||
ENTRYPOINT ["/usr/bin/fish"]
|
|
20
README.md
20
README.md
@ -1,10 +1,22 @@
|
|||||||
# FSBL
|
# FSBL
|
||||||
|
## Build with Docker
|
||||||
|
|
||||||
FSBL code is at https://github.com/Xilinx/embeddedsw/
|
|
||||||
|
|
||||||
there:
|
|
||||||
```sh
|
```sh
|
||||||
cd lib/sw_apps/zynq_fsbl/src/ && make BOARD=zed CFLAGS=-DFSBL_DEBUG_INFO
|
cd docker/compile_fsbl/
|
||||||
|
git clone https://github.com/Xilinx/embeddedsw/
|
||||||
|
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:
|
||||||
|
```sh
|
||||||
|
docker run -v ./embeddedsw:/project 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:
|
||||||
|
```sh
|
||||||
|
cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf .
|
||||||
```
|
```
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
|
15
docker/compile_fsbl/Dockerfile
Normal file
15
docker/compile_fsbl/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM debian:12.5
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
make \
|
||||||
|
cmake \
|
||||||
|
gcc-arm-none-eabi \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
# Remove the package lists to reduce the image size
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /project/
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user