forked from rosa/hakurei
Typo fix of rkisp1_ext_param_buffer_version caused world rebuild. Signed-off-by: Ophestra <cat@gensokyo.uk>
165 lines
3.0 KiB
Go
165 lines
3.0 KiB
Go
package kernel-source {
|
|
description = "unpatched Linux kernel source tree";
|
|
website = "https://kernel.org";
|
|
exclude = true;
|
|
|
|
version# = "6.18.44";
|
|
output = remoteTar {
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/"+
|
|
"snapshot/linux-"+version+".tar.gz";
|
|
checksum = "yNPGMl3A-EgU6LgD37PAcXIa9iUtP-AmoJuQozfGRSq6Eg1Eq4fdbpKy3iWewU9_";
|
|
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 {
|
|
defaults = false;
|
|
configure = nil;
|
|
make = [
|
|
"-f /usr/src/kernel-headers/Makefile",
|
|
"O=/tmp/kbuild",
|
|
"LLVM=1",
|
|
`HOSTLDFLAGS="${LDFLAGS:-''}"`,
|
|
"INSTALL_HDR_PATH=/work/system",
|
|
"headers_install",
|
|
];
|
|
check = nil;
|
|
install = `
|
|
cat \
|
|
/usr/src/version.h > \
|
|
/work/system/include/linux/version.h
|
|
`;
|
|
};
|
|
|
|
checksum = arch {
|
|
default = "";
|
|
|
|
amd64 = "vN5Ts9yAlHTntcQcNGJSisY5guYsYfvGnQqI1NzTBzvhBMPD432WB3B0KFGYQntA";
|
|
arm64 = "FQtpqCA0tlz17RJP8a5t9YEM_6F9kGPqQ9Z60gFrkVP3v8_P-Vnf5S7wLlxyRlOe";
|
|
riscv64 = "U5yQ9TI5_7diyrCcm2Iqh3XCMl0P60oQGeDMWxt3OQ91zFWPQ5FCH-eoYG9tSTMT";
|
|
};
|
|
inputs = [ rsync ];
|
|
}
|
|
|
|
package kernel {
|
|
description = "the generic Rosa OS linux kernel";
|
|
website = "https://kernel.org";
|
|
anitya = 389470;
|
|
|
|
source = kernel-source;
|
|
files = {
|
|
".config": arch {
|
|
amd64 = "amd64.config";
|
|
arm64 = "arm64.config";
|
|
riscv64 = "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 {
|
|
defaults = false;
|
|
|
|
configure = nil;
|
|
|
|
// Build, install, and boot kernel before running kselftest on it.
|
|
check = nil;
|
|
|
|
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 + ` \
|
|
` + loadFlagE + ` \
|
|
-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,
|
|
awk,
|
|
coreutils,
|
|
diffutils,
|
|
bash,
|
|
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 {
|
|
chdir = false;
|
|
build = `
|
|
mkdir -p /work/system/bin/
|
|
cc -o /work/system/bin/gen_init_cpio usr/gen_init_cpio.c
|
|
`;
|
|
};
|
|
}
|