Added Dockerfile for building pico-hsm and updated README.md with instructions.

This commit is contained in:
Reiner Rottmann
2022-09-23 20:36:05 +02:00
parent 6affe64ec5
commit 61d7b6da38
2 changed files with 78 additions and 0 deletions

54
Dockerfile Normal file
View File

@@ -0,0 +1,54 @@
FROM debian:bullseye
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
git \
cmake \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
python3 \
python3-pip
RUN useradd -m builduser
USER builduser
WORKDIR /home/builduser
VOLUME /home/builduser/release
ARG VERSION_PICO_SDK 1.4.0
RUN mkdir -p /home/builduser/Devel/pico
RUN cd /home/builduser/Devel/pico \
&& git clone https://github.com/raspberrypi/pico-sdk.git \
&& cd pico-sdk \
&& git checkout $VERSION_PICO_SDK \
&& git submodule update --init --recursive
RUN pip install cryptography
ARG VERSION_MAJOR 2
ARG VERSION_MINOR 6
RUN cd /home/builduser \
&& git clone https://github.com/polhenarejos/pico-hsm.git \
&& cd pico-hsm \
&& git checkout v${VERSION_MAJOR}.${VERSION_MINOR} \
&& git submodule update --init --recursive \
&& mkdir build_release
ENV PICO_SDK_PATH /home/builduser/Devel/pico/pico-sdk
ARG USB_VID 0xfeff
ARG USB_PID 0xfcfd
ARG PICO_BOARD waveshare_rp2040_zero
RUN cd /home/builduser/pico-hsm \
&& cd build_release \
&& cmake .. -DPICO_BOARD=$PICO_BOARD -DUSB_VID=${USB_VID} -DUSB_PID=${USB_PID} \
&& make -kj20