diff --git a/Dockerfile b/Dockerfile index 6a7fc27..290334f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,10 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* ARG KERNEL_BRANCH=6.1 +ARG KERNEL_VERSION=6.1.170 RUN git clone --depth 1 -c advice.detachedHead=false \ - --branch "v${KERNEL_BRANCH}" https://github.com/torvalds/linux.git . + --branch "v${KERNEL_VERSION}" https://github.com/gregkh/linux.git . COPY patches/${KERNEL_BRANCH}/*.patch ./ diff --git a/Makefile b/Makefile index bc8a8e8..317f46a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ SHELL := /bin/bash ARCH ?= $(shell uname -m) KERNEL_BRANCH ?= 6.1 +KERNEL_VERSION ?= 6.1.170 MAKEFILE_DIR := $(realpath $(shell dirname $(firstword $(MAKEFILE_LIST)))) # normalize machine to docker platform @@ -19,6 +20,7 @@ linux.git: docker build . \ --platform $(PLATFORM) \ --build-arg KERNEL_BRANCH=$(KERNEL_BRANCH) \ + --build-arg KERNEL_VERSION=$(KERNEL_VERSION) \ --target linux.git \ --output type=image,name=$(IMAGE_TAG) @@ -27,6 +29,7 @@ vmlinux: docker build . \ --platform $(PLATFORM) \ --build-arg KERNEL_BRANCH=$(KERNEL_BRANCH) \ + --build-arg KERNEL_VERSION=$(KERNEL_VERSION) \ --target vmlinux-out \ --output type=local,dest=vmlinux diff --git a/docker-bake.hcl b/docker-bake.hcl index 1196e43..037fc67 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -2,6 +2,10 @@ variable "KERNEL_BRANCH" { default = "6.1" } +variable "KERNEL_VERSION" { + default = "6.1.170" +} + target "default" { platforms = [ "linux/amd64", @@ -9,13 +13,15 @@ target "default" { ] target = "vmlinux-out" args = { - KERNEL_BRANCH = KERNEL_BRANCH + KERNEL_BRANCH = KERNEL_BRANCH + KERNEL_VERSION = KERNEL_VERSION } } target "linux61" { inherits = ["default"] args = { - KERNEL_BRANCH = "6.1" + KERNEL_BRANCH = "6.1" + KERNEL_VERSION = "6.1.170" } }