From 09df9d686857570352b98fbbfba70ccceec69659 Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Mon, 13 Nov 2023 20:24:47 -0800 Subject: [PATCH] add linux-headers --- packages/linux-headers/Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/linux-headers/Dockerfile diff --git a/packages/linux-headers/Dockerfile b/packages/linux-headers/Dockerfile new file mode 100644 index 0000000..93fb6f8 --- /dev/null +++ b/packages/linux-headers/Dockerfile @@ -0,0 +1,20 @@ +FROM ocirep/musl:latest as musl +FROM ocirep/bootstrap:latest as build + +ENV SRC_SITE https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/ +ENV SRC_VERSION 6.6 +ENV SRC_HASH d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0 + +RUN wget ${SRC_SITE}/linux-${SRC_VERSION}.tar.xz +RUN echo "${SRC_HASH} linux-${SRC_VERSION}.tar.xz" | sha256sum -c +RUN tar -xf linux-${SRC_VERSION}.tar.xz +WORKDIR linux-${SRC_VERSION} +RUN set -ex; \ + make headers; \ + mkdir -p /rootfs/usr; \ + cp -a usr/include /rootfs/usr/; \ + find /rootfs/usr/include/ ! -iname "*.h" -type f -exec rm -v {} \+; \ + rm -rf /rootfs/usr/include/drm; + +FROM scratch +COPY --from=build /rootfs /