diff --git a/packages/flashtools/Containerfile b/packages/flashtools/Containerfile new file mode 100644 index 0000000..66d103c --- /dev/null +++ b/packages/flashtools/Containerfile @@ -0,0 +1,31 @@ +FROM scratch as base +ENV VERSION=d1e6f12568cb23387144a4b7a6535fe1bc1e79b1 +ENV SRC_HASH=a68cdb4a2e312f96862119a6d829ac900b53d0cbc80caa5632efd43b5b7eed6c +ENV SRC_FILE=${VERSION}.tar.gz +ENV SRC_SITE=https://github.com/osresearch/flashtools/archive/${SRC_FILE} + +FROM base as fetch +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} +WORKDIR flashtools-${VERSION} + +FROM fetch as build +RUN --network=none make all + +from build as install +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 + +FROM stagex/filesystem as package +COPY --from=install /rootfs/./ / diff --git a/src/packages.mk b/src/packages.mk index b7cc207..f3ba140 100644 --- a/src/packages.mk +++ b/src/packages.mk @@ -201,8 +201,14 @@ out/bzip2/index.json: \ ca-certificates: out/ca-certificates/index.json out/ca-certificates/index.json: \ packages/ca-certificates/Containerfile \ + out/binutils/index.json \ out/busybox/index.json \ - out/filesystem/index.json + out/filesystem/index.json \ + out/gcc/index.json \ + out/make/index.json \ + out/musl/index.json \ + out/openssl/index.json \ + out/perl/index.json $(call build,ca-certificates) .PHONY: clang @@ -270,6 +276,7 @@ out/curl/index.json: \ packages/curl/Containerfile \ out/binutils/index.json \ out/busybox/index.json \ + out/ca-certificates/index.json \ out/filesystem/index.json \ out/gcc/index.json \ out/make/index.json \ @@ -432,6 +439,16 @@ out/findutils/index.json: \ out/musl/index.json $(call build,findutils) +.PHONY: flashtools +flashtools: out/flashtools/index.json +out/flashtools/index.json: \ + packages/flashtools/Containerfile \ + out/busybox/index.json \ + out/filesystem/index.json \ + out/gcc/index.json \ + out/musl/index.json + $(call build,flashtools) + .PHONY: flex flex: out/flex/index.json out/flex/index.json: \ @@ -610,17 +627,24 @@ out/grpcurl/index.json: \ grub: out/grub/index.json out/grub/index.json: \ packages/grub/Containerfile \ + out/autoconf/index.json \ + out/automake/index.json \ out/binutils/index.json \ out/bison/index.json \ out/busybox/index.json \ out/filesystem/index.json \ out/flex/index.json \ + out/gawk/index.json \ out/gcc/index.json \ + out/gettext/index.json \ out/linux-headers/index.json \ out/m4/index.json \ out/make/index.json \ out/musl/index.json \ - out/python/index.json + out/perl/index.json \ + out/pkgconf/index.json \ + out/python/index.json \ + out/xz/index.json $(call build,grub) .PHONY: gzip