added more libs and fixed build script

This commit is contained in:
2026-02-24 17:54:09 -05:00
parent 415064480a
commit 5b2e5eac65
7 changed files with 396 additions and 406 deletions

View File

@@ -88,7 +88,6 @@ def process_root(src_root: Path, out_root: Path, minify: bool):
def install_bootloader(arch: str, release: bool):
boot_dir = BUILD_ROOT / "$" / ARCH_BOOT_DIR[arch]
boot_lua = boot_dir / "boot.lua"
eeprom = boot_dir / "eeprom"
for src in (boot_lua, eeprom):
@@ -96,9 +95,6 @@ def install_bootloader(arch: str, release: bool):
print(f" ! Bootloader file not found: {src}", file=sys.stderr)
sys.exit(1)
print(f" Installing: boot.lua -> Build/boot.lua")
shutil.copy2(boot_lua, BUILD_ROOT / "boot.lua")
eeprom_dst_name = "startup.lua" if release else "eeprom"
print(f" Installing: eeprom -> Build/{eeprom_dst_name}")
shutil.copy2(eeprom, BUILD_ROOT / eeprom_dst_name)
@@ -203,7 +199,7 @@ def _make_firstboot_kmod(users):
lines.append("do")
lines.append(" local ok, err = pcall(function()")
lines.append(" kernel.vfs.remove('/lib/modules/hyperion/50_firstboot_users.kmod')")
lines.append(" kernel.vfs.remove('/lib/modules/Hyperion/50_firstboot_users.kmod')")
lines.append(" end)")
lines.append(" if not ok then")
lines.append(" kernel.log('FIRSTBOOT: could not self-delete: ' .. tostring(err), 'WARN')")
@@ -215,7 +211,7 @@ def _make_firstboot_kmod(users):
def inject_makeusers(users, arch):
base = BUILD_ROOT / "$" if arch else BUILD_ROOT
kmod_path = base / "lib" / "modules" / "hyperion" / "50_firstboot_users.kmod"
kmod_path = base / "lib" / "modules" / "Hyperion" / "50_firstboot_users.kmod"
kmod_path.parent.mkdir(parents=True, exist_ok=True)
kmod_path.write_text(_make_firstboot_kmod(users), encoding="utf-8")
print(" Wrote first-boot user setup -> " + str(kmod_path.relative_to(BUILD_ROOT)))