aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/kernel.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/internal/rosa/kernel.go b/internal/rosa/kernel.go
index 7f924904..a61b85eb 100644
--- a/internal/rosa/kernel.go
+++ b/internal/rosa/kernel.go
@@ -8,6 +8,7 @@ import (
// newKernel is a helper for interacting with Kbuild.
func (t Toolchain) newKernel(
+ patches [][2]string,
script string,
extra ...pkg.Artifact,
) pkg.Artifact {
@@ -20,18 +21,20 @@ func (t Toolchain) newKernel(
}, extra), nil, nil, `
export LLVM=1
export HOSTLDFLAGS="${LDFLAGS}"
-chmod -R +w /usr/src/linux && cd /usr/src/linux
-`+script, pkg.Path(AbsUsrSrc.Append("linux"), true, pkg.NewHTTPGetTar(
- nil,
- "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/"+
- "snapshot/linux-"+version+".tar.gz",
- mustDecode(checksum),
- pkg.TarGzip,
+cd /usr/src/linux
+`+script, pkg.Path(AbsUsrSrc.Append("linux"), true, t.NewPatchedSource(
+ "kernel", pkg.NewHTTPGetTar(
+ nil,
+ "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/"+
+ "snapshot/linux-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ ), false, patches...,
)))
}
func (t Toolchain) newKernelHeaders() pkg.Artifact {
- return t.newKernel(`
+ return t.newKernel(nil, `
make "-j$(nproc)" \
INSTALL_HDR_PATH=/work/system \
headers_install