stagex/packages/flashtools/Containerfile

32 lines
942 B
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-06-18 08:33:59 +00:00
ENV VERSION=d1e6f12568cb23387144a4b7a6535fe1bc1e79b1
ENV SRC_HASH=a68cdb4a2e312f96862119a6d829ac900b53d0cbc80caa5632efd43b5b7eed6c
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/osresearch/flashtools/archive/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-06-18 08:33:59 +00:00
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/binutils . /
COPY --from=stagex/gcc . /
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
RUN tar -xvf ${SRC_FILE}
2024-08-26 01:18:52 +00:00
WORKDIR /flashtools-${VERSION}
2024-06-18 08:33:59 +00:00
2024-08-08 07:47:42 +00:00
FROM fetch AS build
2024-06-18 08:33:59 +00:00
RUN --network=none make all
2024-08-08 07:50:50 +00:00
FROM build AS install
2024-06-18 08:33:59 +00:00
RUN <<-EOF
mkdir -p /rootfs/usr/bin/
install -D -m 0755 flashtool /rootfs/usr/bin/
install -D -m 0755 peek /rootfs/usr/bin/
install -D -m 0755 poke /rootfs/usr/bin/
install -D -m 0755 cbfs /rootfs/usr/bin/
install -D -m 0755 uefi /rootfs/usr/bin/
EOF
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
2024-06-18 08:33:59 +00:00
COPY --from=install /rootfs/./ /