Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:trixie
FROM debian:trixie@sha256:d07d1b51c39f51188e60be9b64e6bf769fa94e187f092bc32b91305cfa34ba5a

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -10,9 +10,6 @@ ENV LINUX_OUT=/artifacts/linux
# Add arm64 architecture for cross-compilation
RUN dpkg --add-architecture arm64 && apt-get update

# Upgrade base system
RUN apt-get upgrade -y

# Prerequisites
RUN apt-get install -y \
git \
Expand Down Expand Up @@ -51,7 +48,9 @@ RUN apt-get install -y \
libostree-dev \
fakemachine

RUN go install -v github.com/go-debos/debos/cmd/debos@latest
# ponytail: pinned to v1.1.7 — upstream is transitioning subvolume creation support
# (go-debos/debos#736/62cb992). Re-pin once the transition settles.
RUN go install -v github.com/go-debos/debos/cmd/debos@v1.1.7

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're currently transitioning the build scripts to use upstream support for subvolume creation, currently available at go-debos/debos@62cb992 (but that will likely change some time soon)


RUN install -m 755 ~/go/bin/debos /usr/local/bin

Expand All @@ -69,5 +68,11 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* ~/.cargo ~/go
WORKDIR /flipperone-linux-build-scripts
RUN git clone --depth=1 https://github.com/flipperdevices/flipperone-linux-build-scripts .

# Entry point
ENTRYPOINT ./build-uboot.sh && ./build-kernel-mainline.sh && ./build-kernel-bsp.sh && ./build-images.sh
# Entry point — exec-form ENTRYPOINT with entrypoint.sh replaces the old
# shell-form `ENTRYPOINT ./build-*.sh && ./build-*.sh && ...` inline chain.
# COPY is required because Docker build context is the repo root; the script
# gets injected into the WORKDIR alongside the cloned sources.
COPY entrypoint.sh /flipperone-linux-build-scripts/entrypoint.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the copying step required?

RUN chmod +x /flipperone-linux-build-scripts/entrypoint.sh
ENTRYPOINT ["/bin/bash", "/flipperone-linux-build-scripts/entrypoint.sh"]
CMD ["all"]
42 changes: 42 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
set -e

# Determine build target (default: all)
BUILD_TARGET="${BUILD_TARGET:-all}"

cd /flipperone-linux-build-scripts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant, and also wrong for most systems unless running inside a Docker container build with today's Dockerfile


case "${BUILD_TARGET}" in
all)
./build-uboot.sh
./build-kernel-mainline.sh
./build-kernel-bsp.sh
./build-ospack.sh
./build-rootfs-img.sh
./build-images.sh
./build-dtbo.sh

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't add untested changes. This script doesn't work this way, and it's not used in the normal build process.

;;
uboot)
./build-uboot.sh
;;
kernel-mainline)
./build-kernel-mainline.sh
;;
kernel-bsp)
./build-kernel-bsp.sh
;;
ospack)
./build-ospack.sh
;;
rootfs-img)
./build-rootfs-img.sh
;;
images)
./build-images.sh
;;
Comment on lines +34 to +36

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add targets for ospack and rootfs-img please

*)
echo "Unknown BUILD_TARGET: ${BUILD_TARGET}"
echo "Valid targets: all, uboot, kernel-mainline, kernel-bsp, ospack, rootfs-img, images"
exit 1
;;
esac