[XEN PATCH v1 1/3] automation: add linux 6.6.56 artifact

victorm.lira@amd.com posted 3 patches 1 month, 1 week ago
There is a newer version of this series
[XEN PATCH v1 1/3] automation: add linux 6.6.56 artifact
Posted by victorm.lira@amd.com 1 month, 1 week ago
From: Victor Lira <victorm.lira@amd.com>

Add dockerfile for building container image that holds linux 6.6.56
bzImage for x86_64, using the same build process as the current 6.1.19
image

Signed-off-by: Victor Lira <victorm.lira@amd.com>
---
Cc: Doug Goldstein <cardoe@cardoe.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org
---
 .../tests-artifacts/kernel/6.6.56.dockerfile  | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 automation/tests-artifacts/kernel/6.6.56.dockerfile

diff --git a/automation/tests-artifacts/kernel/6.6.56.dockerfile b/automation/tests-artifacts/kernel/6.6.56.dockerfile
new file mode 100644
index 0000000000..5b6f2fe527
--- /dev/null
+++ b/automation/tests-artifacts/kernel/6.6.56.dockerfile
@@ -0,0 +1,54 @@
+# syntax=docker/dockerfile:1
+FROM --platform=linux/amd64 debian:bookworm
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="xen-devel@lists.xenproject.org"
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV LINUX_VERSION=6.6.56
+ENV USER root
+
+RUN mkdir /build
+WORKDIR /build
+
+# build depends
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        build-essential \
+        libssl-dev \
+        bc \
+        curl \
+        flex \
+        bison \
+        libelf-dev \
+        && \
+    apt-get autoremove -y && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* && \
+    \
+    # Build the kernel
+    curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-"$LINUX_VERSION".tar.xz && \
+    tar xvJf linux-"$LINUX_VERSION".tar.xz && \
+    cd linux-"$LINUX_VERSION" && \
+    make defconfig && \
+    make xen.config && \
+    scripts/config --enable BRIDGE && \
+    scripts/config --enable IGC && \
+    scripts/config --enable TUN && \
+    cp .config .config.orig && \
+    cat .config.orig | grep XEN | grep =m |sed 's/=m/=y/g' >> .config && \
+    make -j$(nproc) bzImage && \
+    cp arch/x86/boot/bzImage / && \
+    cd /build && \
+    rm -rf linux-"$LINUX_VERSION"* && \
+    \
+    # Clean up
+    apt-get --yes purge \
+        build-essential \
+        libssl-dev \
+        bc \
+        curl \
+        flex \
+        bison \
+        libelf-dev \
+        && \
+    apt-get autoremove -y
--
2.25.1