Files
hakurei/internal/rosa/package/kernel/package.az
Ophestra fc7a339ed2 internal/rosa/package/kernel: 6.12.90 to 6.12.91
This unfortunately updates headers linux/mii.h and linux/virtio_net.h.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-27 15:47:53 +09:00

165 lines
3.1 KiB
Go

package kernel-source {
description = "unpatched Linux kernel source tree";
website = "https://kernel.org";
exclude = true;
version# = "6.12.91";
output = remoteTar {
url = "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/"+
"snapshot/linux-"+version+".tar.gz";
checksum = "wWnY9XJV1gSX2CMfHrrhvyx1tqKJQoeyfS68pJMudE_VdwWkFE6ZkEZ--DNJdkvG";
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 = "Oy3soh5GNJr4JU7lk85J49LgNw-44SGpNB6NVlPp_mFUaXxvIGt1KLPnlpU3JYcB";
arm64 = "GKHHQepUpwQjsSiq47-HV1G_aRR12oasaO5dV2bjc3D-4UzE9-Mb92ptplQQhSEc";
riscv64 = "YwNZiSwm6EnTyCmKe-RMLhFHD7VuJoVjD6XnqywaB3e-Vk0rEWxsAxoNkCvxbXz9";
};
inputs = [ rsync ];
}
package kernel {
description = "the generic Rosa OS linux kernel";
website = "https://kernel.org";
anitya = 375621;
source = kernel-source;
patches = [
"f54a91f5337cd918eb86cf600320d25b6cfd8209.patch",
"6ce6fbfddc5b127e4f57c3b5bfdcf40239a4fc2f.patch",
];
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
`;
};
}