aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/kernel
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-28 03:05:09 +0900
committerOphestra <cat@gensokyo.uk>2026-10-28 04:12:42 +0900
commit53e9dd6aa933c1a5b43da83a88d5e07bf27285bf (patch)
tree75d23f52901368c2e9764df631d37b8eb7484723 /internal/rosa/package/kernel
parent7e3ba55cdc4d4a7c19deb65879e8abbb12a8e458 (diff)
internal/rosa: do not hard code prefix
This allows the prefix to be changed, at runtime if needed. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package/kernel')
-rw-r--r--internal/rosa/package/kernel/depmod2
-rw-r--r--internal/rosa/package/kernel/package.az29
2 files changed, 12 insertions, 19 deletions
diff --git a/internal/rosa/package/kernel/depmod b/internal/rosa/package/kernel/depmod
index d4a7663c..ec0ef6f9 100644
--- a/internal/rosa/package/kernel/depmod
+++ b/internal/rosa/package/kernel/depmod
@@ -1,2 +1,2 @@
#!/bin/sh
-exec /system/sbin/depmod -m /lib/modules "$@"
+exec depmod -m /lib/modules "$@"
diff --git a/internal/rosa/package/kernel/package.az b/internal/rosa/package/kernel/package.az
index aafb71db..10aeb63f 100644
--- a/internal/rosa/package/kernel/package.az
+++ b/internal/rosa/package/kernel/package.az
@@ -60,14 +60,14 @@ package kernel-headers {
}+"'",
"LLVM=1",
`HOSTLDFLAGS="${LDFLAGS:-''}"`,
- "INSTALL_HDR_PATH=/work/system",
+ "INSTALL_HDR_PATH=/work"+prefix,
"headers_install",
];
check = nil;
install = `
cat \
/usr/src/version.h > \
- /work/system/include/linux/version.h
+ /work`+prefix+`/include/linux/version.h
`;
};
@@ -98,23 +98,21 @@ package kernel {
riscv64 = "riscv64.config";
};
- ".installkernel": "installkernel";
- ".depmod": "depmod";
+ "/sbin/installkernel": "installkernel";
+ // kernel is not aware of kmod moduledir
+ "/sbin/depmod": "depmod";
- "/system/oldconfig": "oldconfig";
+ prefix+"/oldconfig": "oldconfig";
};
env = [
- "PATH=/system/sbin",
+ "PATH="+prefix+"/sbin",
];
early = `
install -Dm0400 \
/usr/src/.config \
/tmp/kbuild/.config
-install -Dm0500 \
- /usr/src/.installkernel \
- /sbin/installkernel
`;
exclusive = true;
@@ -154,11 +152,6 @@ if [ -n "${ROSA_MAKE_TARGET+x}" ]; then
exit 0
fi
-# kernel is not aware of kmod moduledir
-install -Dm0500 \
- /usr/src/.depmod \
- /sbin/depmod
-
make \
` + jobsFlagE + ` \
` + loadFlagE + ` \
@@ -168,10 +161,10 @@ make \
` + _kernelArch + ` \
INSTALL_PATH=/work \
install \
- INSTALL_MOD_PATH=/work/system \
+ INSTALL_MOD_PATH=/work`+prefix+` \
DEPMOD=/sbin/depmod \
modules_install
-rm -v "/work/system/lib/modules/$(make -f /usr/src/kernel/Makefile kernelversion)/build"
+rm -v "/work`+prefix+`/lib/modules/$(make -f /usr/src/kernel/Makefile kernelversion)/build"
`;
};
@@ -210,8 +203,8 @@ package gen_init_cpio {
exec = generic {
chdir = false;
build = `
-mkdir -p /work/system/bin/
-cc -o /work/system/bin/gen_init_cpio usr/gen_init_cpio.c
+mkdir -p /work`+prefix+`/bin/
+cc -o /work`+prefix+`/bin/gen_init_cpio usr/gen_init_cpio.c
`;
};
}