@@ -11,16 +11,24 @@ git clone --depth 1 --branch $1 --recurse-submodules https://github.com/digitalb
11
11
12
12
cd temp;
13
13
14
+ # The shallow clone above doesn't fetch tags. Even if only building the firmware, the CMakeLists.txt
15
+ # fetches the bootloader version using `./scripts/get_version bootloader`, which requires a
16
+ # bootloader tag. The build scripts can be changed to only use the firmware tag that is needed,
17
+ # ignoring the others, but we fetch the tags here so that builds of previous releases continue to
18
+ # work.
19
+ git fetch --tags;
20
+
14
21
# Build the Docker image (this can take a while):
15
22
docker build --pull --force-rm --no-cache -t bitbox02-firmware .
16
23
17
- # Build the firmware. The inlined python package install can be
18
- # removed after v4.1.0, but is necessary for v4.1.0 as it is missing
19
- # in the Dockerfile of that release. The safe.directory config is so
20
- # that git commands work. even though the repo folder mounted in
21
- # Docker is owned by root, which can be different from the owner on
22
- # the host.
23
- docker run -it --rm --volume ` pwd` :/bb02 bitbox02-firmware bash -c " apt-get update && apt-get install -y python && git config --global --add safe.directory /bb02 && cd /bb02 && $2 "
24
+ # Build the firmware.
25
+ #
26
+ # For firmware versions v4.1.0 and older, you'll need to manually install `python` inside the Docker
27
+ # container, as it is missing in the Dockerfile of that release.
28
+ #
29
+ # The safe.directory config is so that git commands work. even though the repo folder mounted in
30
+ # Docker is owned by root, which can be different from the owner on the host.
31
+ docker run -it --rm --volume ` pwd` :/bb02 bitbox02-firmware bash -c " git config --global --add safe.directory /bb02 && cd /bb02 && $2 "
24
32
25
33
echo " firmware.bin created at:"
26
34
echo ` pwd` /build/bin/firmware.bin
0 commit comments