1993af9312
Test / Sandbox (push) Successful in 7m12s
Test / Create distribution (push) Successful in 1m1s
Test / ShareFS (push) Successful in 6m8s
Test / Hakurei (push) Successful in 8m38s
Test / Sandbox (race detector) (push) Successful in 9m28s
Test / Hakurei (race detector) (push) Successful in 10m43s
Test / Flake checks (push) Successful in 1m19s
Finally jumping from 6.12 to 6.18, and the patches can be dropped. Signed-off-by: Ophestra <cat@gensokyo.uk>
161 lines
3.0 KiB
Go
161 lines
3.0 KiB
Go
package kernel-source {
|
|
description = "unpatched Linux kernel source tree";
|
|
website = "https://kernel.org";
|
|
exclude = true;
|
|
|
|
version# = "6.18.37";
|
|
output = remoteTar {
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/"+
|
|
"snapshot/linux-"+version+".tar.gz";
|
|
checksum = "ndD7_0aU1EP5PubcCX_p8j1OLlszTVx1NoCHPdbhy2yvRcecHcULQQdZNDw-_YOc";
|
|
compress = gzip;
|
|
};
|
|
}
|
|
|
|
package kernel-headers {
|
|
description = "an installation of kernel headers";
|
|
website = "https://kernel.org";
|
|
|
|
source = kernel-source;
|
|
|
|
files = {
|
|
// updated manually for API changes
|
|
"version.h";
|
|
};
|
|
toyboxEarly = true;
|
|
|
|
exec = make {
|
|
skipConfigure = true;
|
|
make = [
|
|
"-f /usr/src/kernel-headers/Makefile",
|
|
"O=/tmp/kbuild",
|
|
"LLVM=1",
|
|
`HOSTLDFLAGS="${LDFLAGS:-''}"`,
|
|
"INSTALL_HDR_PATH=/work/system",
|
|
"headers_install",
|
|
];
|
|
skipCheck = true;
|
|
install = `
|
|
cat \
|
|
/usr/src/version.h > \
|
|
/work/system/include/linux/version.h
|
|
`;
|
|
};
|
|
|
|
checksum = arch {
|
|
default = "";
|
|
|
|
amd64 = "UscduTw49AOk4CL6gLS6yORPFiHO79h1kFZKXKDaUI9j0x5CySi7P2Ywf29gYBsM";
|
|
arm64 = "FM5-YFUbkOiux1KMxU29pecCoq6kPUfSL_4JlfqRHe4ZxIiT1AELGt7liD6df3-K";
|
|
riscv64 = "Z1jR7S3nnGYOJtOR3sOMznfmkD_TirHP7-f3tVcgkVzWzHvMXS7ElHLT1NExqcqa";
|
|
};
|
|
inputs = [ rsync ];
|
|
}
|
|
|
|
package kernel {
|
|
description = "the generic Rosa OS linux kernel";
|
|
website = "https://kernel.org";
|
|
anitya = 389470;
|
|
|
|
source = kernel-source;
|
|
files = {
|
|
".config": arch {
|
|
amd64 = "kernel_amd64.config";
|
|
arm64 = "kernel_arm64.config";
|
|
riscv64 = "kernel_riscv64.config";
|
|
};
|
|
|
|
".installkernel": "installkernel";
|
|
".depmod": "depmod";
|
|
};
|
|
|
|
env = [
|
|
"PATH=/system/sbin",
|
|
];
|
|
|
|
early = `
|
|
install -Dm0400 \
|
|
/usr/src/.config \
|
|
/tmp/kbuild/.config
|
|
install -Dm0500 \
|
|
/usr/src/.installkernel \
|
|
/sbin/installkernel
|
|
`;
|
|
|
|
exclusive = true;
|
|
|
|
exec = make {
|
|
omitDefaults = true;
|
|
skipConfigure = true;
|
|
|
|
// Build, install, and boot kernel before running kselftest on it.
|
|
skipCheck = true;
|
|
|
|
make = [
|
|
"-f /usr/src/kernel/Makefile",
|
|
"O=/tmp/kbuild",
|
|
|
|
"LLVM=1",
|
|
"KBUILD_BUILD_VERSION='1-Rosa'",
|
|
"KBUILD_BUILD_TIMESTAMP='2106-02-07 06:28:15 UTC'",
|
|
"KBUILD_BUILD_USER=kbuild",
|
|
"KBUILD_BUILD_HOST=localhost",
|
|
"all",
|
|
];
|
|
|
|
install = `
|
|
# kernel is not aware of kmod moduledir
|
|
install -Dm0500 \
|
|
/usr/src/.depmod \
|
|
/sbin/depmod
|
|
|
|
make \
|
|
` + jobsFlagE + ` \
|
|
-f /usr/src/kernel/Makefile \
|
|
O=/tmp/kbuild \
|
|
LLVM=1 \
|
|
INSTALL_PATH=/work \
|
|
install \
|
|
INSTALL_MOD_PATH=/work/system \
|
|
DEPMOD=/sbin/depmod \
|
|
modules_install
|
|
rm -v "/work/system/lib/modules/$(make -f /usr/src/kernel/Makefile kernelversion)/build"
|
|
`;
|
|
};
|
|
|
|
inputs = [
|
|
flex,
|
|
bison,
|
|
m4,
|
|
tar,
|
|
perl,
|
|
bc,
|
|
sed,
|
|
gawk,
|
|
coreutils,
|
|
diffutils,
|
|
python,
|
|
|
|
xz,
|
|
gzip,
|
|
kmod,
|
|
elfutils,
|
|
util-linux,
|
|
kernel-headers,
|
|
];
|
|
}
|
|
|
|
package gen_init_cpio {
|
|
description = "a program in the kernel source tree for creating initramfs archive";
|
|
source = kernel-source;
|
|
|
|
enterSource = true;
|
|
exec = generic {
|
|
inPlace = true;
|
|
build = `
|
|
mkdir -p /work/system/bin/
|
|
cc -o /work/system/bin/gen_init_cpio usr/gen_init_cpio.c
|
|
`;
|
|
};
|
|
}
|