*: Switch to python
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
version = "7.0.9"
|
||||
revision = 2
|
||||
description = "Linux kernel"
|
||||
license = "GPL-2.0-only"
|
||||
source = tarball(
|
||||
url=f"https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-{version}.tar.xz",
|
||||
sha256="ac07acdf76cf4621cc5187a2670270a1a699533c8a6b225e4878c416ad83f1c4",
|
||||
)
|
||||
host_deps = ["binutils", "gcc"]
|
||||
deps = [profile["libc"]]
|
||||
|
||||
linux_archs = {"aarch64": "arm64"}
|
||||
linux_subarchs = {"x86_64": "x86"}
|
||||
|
||||
|
||||
def _make(self, *extra):
|
||||
arch = linux_archs.get(self.profile["arch"], self.profile["arch"])
|
||||
subarch = linux_subarchs.get(self.profile["arch"])
|
||||
subarch_arg = (f"SUBARCH={subarch}",) if subarch else ()
|
||||
return (
|
||||
"make",
|
||||
f"ARCH={arch}",
|
||||
*subarch_arg,
|
||||
f"CROSS_COMPILE={self.triple}-",
|
||||
f"-j{self.jobs}",
|
||||
*extra,
|
||||
)
|
||||
|
||||
|
||||
def configure(self):
|
||||
self.run("cp", "-rp", f"{self.source_dir}/.", self.build_dir)
|
||||
self.run(
|
||||
"cp", self.files / f"config.{self.profile['arch']}", self.build_dir / ".config"
|
||||
)
|
||||
self.run(*_make(self, "olddefconfig"))
|
||||
|
||||
|
||||
def build(self):
|
||||
self.run(*_make(self))
|
||||
|
||||
|
||||
def install(self):
|
||||
self.run(
|
||||
"install",
|
||||
"-Dm644",
|
||||
self.build_dir / "arch/x86/boot/bzImage",
|
||||
self.dest_dir / f"boot/vmlinuz-{self.version}",
|
||||
)
|
||||
Reference in New Issue
Block a user