feat: add linux kernel initramfs and related tools

Signed-off-by: sisungo <[email protected]>
This commit is contained in:
2026-09-07 03:13:55 +00:00
parent 5c89842dc0
commit 47ade913e2
10 changed files with 230 additions and 14 deletions
+3
View File
@@ -145,6 +145,9 @@ def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
if "dev" in profiles:
_do_auto_pack(pc, "lib", "lib", _autopack_filter_dev)
_do_auto_pack(pc, "include", "include", _autopack_filter_dev)
if os.path.exists("share/gir-1.0"):
pc.makedirs("include/gir")
pc.add_dir("share/gir-1.0", "include/gir/gir-1.0")
def use_auto_pack(profiles: list[str]):
+4 -3
View File
@@ -1,5 +1,6 @@
import typing
import hashlib
import os
from lib import arch
@@ -46,11 +47,11 @@ def builddep(s: str):
_builddep += ["gnu-make", "gnu-sed", "awk", "grep"]
elif s == "shortcut/rust":
builddep("shortcut/c")
_builddep += ["cargo", "rustc"]
_builddep += ["cargo", "rust"]
elif s == "shortcut/cmake":
_builddep += ["cmake", "ninja"]
_builddep += ["cmake", "ninja", "pkgconf"]
elif s == "shortcut/meson":
_builddep += ["meson", "ninja"]
_builddep += ["meson", "ninja", "pkgconf"]
else:
_builddep += [s.replace("@target", f"@{arch.get_target()}")]
+8
View File
@@ -65,3 +65,11 @@ class PkgComposer:
def link_external(self, src: str, dst: str):
os.symlink(src, f"{self.workdir}/bundle/{dst}")
def add(self, src: str, dst: str | None = None):
if dst is None:
dst = src
if os.path.islink(src) or os.path.isfile(src):
self.addfile(src, dst)
else:
self.add_dir(src, dst, True)