More stuff, didn't test

This commit is contained in:
Marvin Friedrich
2026-05-19 18:12:11 +02:00
parent b71906f402
commit 312750c61b
32 changed files with 978 additions and 170 deletions
+1
View File
@@ -0,0 +1 @@
# TODO
+44
View File
@@ -0,0 +1,44 @@
version = "7.0.9"
revision = 1
metadata = meta(
description = "Linux kernel",
license = "GPL-2.0-only",
)
source = tarball_source(
url = f"https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-{version}.tar.xz",
sha256 = "ac07acdf76cf4621cc5187a2670270a1a699533c8a6b225e4878c416ad83f1c4",
strip_components = 1,
)
host_deps = ["binutils", "gcc"]
def _make_args(ctx, *args):
# Translate arch name
if options.target_arch == "aarch64":
linux_arch = "arm64"
else:
linux_arch = options.target_arch
result = [
"make",
"-C", ctx.source_dir,
"O=" + ctx.build_dir,
"ARCH=" + linux_arch,
"CROSS_COMPILE=" + options.target_triple + "-",
"-j" + str(ctx.jobs),
]
result.extend(args)
return result
def configure(ctx):
ctx.run(_make_args(ctx, "defconfig"))
def build(ctx):
ctx.run(_make_args(ctx, "bzImage"))
def install(ctx, pkg):
ctx.install(
ctx.build_dir + "/arch/x86/boot/bzImage",
pkg.destdir + "/boot/vmlinuz-" + version,
)