mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
build: Build SPDK for arm64 docker image
Enable `SPDK` build (with DPDK for `generic` arm64 platform) for `linux/arm64` image. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
@@ -121,12 +121,9 @@ RUN echo 'source $CARGO_HOME/env' >> "$HOME"/.bashrc \
|
|||||||
&& mkdir "$HOME"/.cargo \
|
&& mkdir "$HOME"/.cargo \
|
||||||
&& ln -s $CARGO_HOME/env "$HOME"/.cargo/env
|
&& ln -s $CARGO_HOME/env "$HOME"/.cargo/env
|
||||||
|
|
||||||
# install SPDK NVMe
|
# Allow pip to install packages system wide
|
||||||
# only for 'x86_64' platform images as 'docker buildx' can't build 'spdk'
|
|
||||||
# hadolint ignore=DL3003,SC2046
|
# hadolint ignore=DL3003,SC2046
|
||||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
RUN rm /usr/lib/python3.12/EXTERNALLY-MANAGED \
|
||||||
# Allow pip to install packages system wide
|
|
||||||
rm /usr/lib/python3.12/EXTERNALLY-MANAGED \
|
|
||||||
&& git clone https://github.com/spdk/spdk \
|
&& git clone https://github.com/spdk/spdk \
|
||||||
&& cd spdk \
|
&& cd spdk \
|
||||||
&& git checkout ef8bcce58f3f02b79c0619a297e4f17e81e62b24 \
|
&& git checkout ef8bcce58f3f02b79c0619a297e4f17e81e62b24 \
|
||||||
@@ -135,13 +132,19 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
|||||||
&& ./scripts/pkgdep.sh \
|
&& ./scripts/pkgdep.sh \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& ./configure --with-vfio-user \
|
&& ./configure --with-vfio-user \
|
||||||
&& make -j $(nproc) TARGET_ARCHITECTURE=skylake \
|
&& if [ "$TARGETARCH" = "amd64" ]; then \
|
||||||
|
make -j $(nproc) TARGET_ARCHITECTURE=skylake; \
|
||||||
|
elif [ "$TARGETARCH" = "arm64" ]; then \
|
||||||
|
make -j $(nproc) DPDKBUILD_FLAGS="-Dplatform=generic"; \
|
||||||
|
else \
|
||||||
|
echo "Unsupported architecture: ${TARGETARCH}" && exit 1; \
|
||||||
|
fi \
|
||||||
&& rm -rf /usr/local/bin/spdk-nvme \
|
&& rm -rf /usr/local/bin/spdk-nvme \
|
||||||
&& mkdir /usr/local/bin/spdk-nvme \
|
&& mkdir /usr/local/bin/spdk-nvme \
|
||||||
&& cp -f ./build/bin/nvmf_tgt /usr/local/bin/spdk-nvme \
|
&& cp -f ./build/bin/nvmf_tgt /usr/local/bin/spdk-nvme \
|
||||||
&& cp -f ./scripts/rpc.py /usr/local/bin/spdk-nvme \
|
&& cp -f ./scripts/rpc.py /usr/local/bin/spdk-nvme \
|
||||||
&& cp -rf ./python /usr/local/bin \
|
&& cp -rf ./python /usr/local/bin \
|
||||||
&& cd .. && rm -rf spdk; fi
|
&& cd .. && rm -rf spdk
|
||||||
|
|
||||||
# install ethr tool for performance tests
|
# install ethr tool for performance tests
|
||||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||||
|
|||||||
Reference in New Issue
Block a user