Skip to content

Commit

Permalink
Merge pull request #86 from wyattearp/fix-update-pipx-docker
Browse files Browse the repository at this point in the history
Fix: update for pip and docker
  • Loading branch information
DangerousPrototypes authored Sep 10, 2024
2 parents c496cf4 + 6e53e13 commit 2c25f65
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "BusPirate v5+ Build Environment",
"dockerComposeFile": "../docker-compose.yml",
"service": "dev",
"workspaceFolder": "/project"
}
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
dev:
image: buspirate/buspirate_v5
image: wyatt3arp/buspirate_v5plus
build: ./docker
network_mode: host
privileged: true
Expand All @@ -9,5 +9,5 @@ services:
user: "${UID}:${GID}"
volumes:
- .:/project
- /dev/bus/usb:/dev/bus/usba
- /dev/bus/usb:/dev/bus/usb
working_dir: '/project'
24 changes: 18 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:latest AS bp5_builder_base
FROM debian:latest AS bp5plus_builder_base

RUN rm /bin/sh && ln -s /bin/bash /bin/sh

Expand All @@ -9,6 +9,7 @@ RUN apt-get update \
curl \
python3 \
python3-pip \
cmake \
build-essential \
git \
libnewlib-arm-none-eabi \
Expand All @@ -17,17 +18,28 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN python3 -m pip install cmake \
&& git clone https://github.com/raspberrypi/pico-sdk.git /opt/pico-sdk \
&& git -C /opt/pico-sdk submodule update --init
# Note: this does some builds of the picotool SDK to make the CMake files work
# If the version of the tool updates, this needs to as well
# https://github.com/raspberrypi/pico-sdk/pull/1820#issuecomment-2291371915
# https://github.com/raspberrypi/pico-sdk/pull/1820#issuecomment-2291611448
RUN git clone https://github.com/raspberrypi/pico-sdk.git /opt/pico-sdk \
&& git -C /opt/pico-sdk submodule update --init --recursive \
&& cd /opt/pico-sdk \
&& git checkout 2.0.0 \
&& mkdir -p build \
&& cd build \
&& cmake ../ \
&& make picotoolBuild \
&& cmake --install .

RUN curl -Lo gcc-arm-none-eabi.tar.bz2 "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2" \
&& mkdir /opt/gcc-arm-none-eabi \
&& tar xf gcc-arm-none-eabi.tar.bz2 --strip-components=1 -C /opt/gcc-arm-none-eabi \
&& rm -rf gcc-arm-none-eabi.tar.bz2

ENV PATH=$PATH:/opt/gcc-arm-none-eabi/bin
ENV PICO_SDK_PATH=/opt/pico-sdk
ENV PATH=$PATH:/opt/gcc-arm-none-eabi/bin/
ENV picotool_DIR=/opt/pico-sdk/build/_deps/picotool/
ENV PICO_SDK_PATH=/opt/pico-sdk/

COPY entrypoint.sh /.

Expand Down
Empty file modified docker/entrypoint.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ To run a build, perform the following actions on linux:
git clone git@github.com:DangerousPrototypes/BusPirate5-firmware.git
cd BusPirate5-firmware
# build the environment
docker compose build
# OPTIONAL: build the environment, or you can just let it pull
# docker compose build
# run a build
UID=$(id -u) GID=$(id -g) docker compose run dev build-clean
Expand Down

0 comments on commit 2c25f65

Please sign in to comment.