aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-09 16:40:55 +0900
committerOphestra <cat@gensokyo.uk>2026-03-09 16:40:55 +0900
commitbaf2def9cc201ee4ae5bab2d31e35c7904d090f9 (patch)
tree79411012a1ee20ebc01a61c9998631bc638177f9 /internal
parent242e042cb9ed73f7951f72fd19717d5937a33182 (diff)
internal/rosa/kmod: prefix moduledir
This change also works around the kernel build system being unaware of this option. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/kernel.go15
-rw-r--r--internal/rosa/kmod.go1
2 files changed, 14 insertions, 2 deletions
diff --git a/internal/rosa/kernel.go b/internal/rosa/kernel.go
index a7da81d1..c285fd89 100644
--- a/internal/rosa/kernel.go
+++ b/internal/rosa/kernel.go
@@ -83,6 +83,11 @@ echo "Installing linux $1..."
cp -av "$2" "$4"
cp -av "$3" "$4"
`))),
+ pkg.Path(AbsUsrSrc.Append(
+ ".depmod",
+ ), false, pkg.NewFile("depmod", []byte(`#!/bin/sh
+exec /system/sbin/depmod -m /lib/modules "$@"
+`))),
},
Patches: [][2]string{
@@ -1210,6 +1215,11 @@ cgit 1.2.3-korg
"all",
},
Install: `
+# kernel is not aware of kmod moduledir
+install -Dm0500 \
+ /usr/src/.depmod \
+ /sbin/depmod
+
make \
"-j$(nproc)" \
-f /usr/src/kernel/Makefile \
@@ -1217,9 +1227,10 @@ make \
LLVM=1 \
INSTALL_PATH=/work \
install \
- INSTALL_MOD_PATH=/work \
+ INSTALL_MOD_PATH=/work/system \
+ DEPMOD=/sbin/depmod \
modules_install
-rm -v /work/lib/modules/` + kernelVersion + `/build
+rm -v /work/system/lib/modules/` + kernelVersion + `/build
`,
},
Flex,
diff --git a/internal/rosa/kmod.go b/internal/rosa/kmod.go
index 22ff399c..0b416210 100644
--- a/internal/rosa/kmod.go
+++ b/internal/rosa/kmod.go
@@ -14,6 +14,7 @@ func (t Toolchain) newKmod() (pkg.Artifact, string) {
pkg.TarGzip,
), nil, &MesonHelper{
Setup: [][2]string{
+ {"Dmoduledir", "/system/lib/modules"},
{"Dsysconfdir", "/system/etc"},
{"Dbashcompletiondir", "no"},
{"Dfishcompletiondir", "no"},