Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./

Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)

Expand All @@ -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

Expand Down
10 changes: 8 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@ variable "KERNEL_BRANCH" {
default = "6.1"
}

variable "KERNEL_VERSION" {
default = "6.1.170"
}

target "default" {
platforms = [
"linux/amd64",
"linux/arm64"
]
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"
}
}
Loading