From 6c7242b167ca0ab06b262b96dd92626bdabbb91f Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 27 Oct 2025 15:54:52 +1100 Subject: [PATCH] feat: Add boot files --- blueprints/terminal.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/blueprints/terminal.py b/blueprints/terminal.py index 29dafd7..404a550 100644 --- a/blueprints/terminal.py +++ b/blueprints/terminal.py @@ -29,6 +29,19 @@ COMMANDS = { "exit": "Exit the terminal session", } +BOOT_FILES = [ + "amd-ucode.img", + "EFI", + "initramfs-linux-fallback.img", + "initramfs-linux.img", + "initramfs-linux-lts-fallback.img", + "initramfs-linux-lts.img", + "intel-ucode.img", + "loader", + "vmlinuz-linux", + "vmlinuz-linux-lts" +] + def get_nodes_in_directory(path: str) -> list[str]: """Simulate getting files in a directory for the terminal.""" @@ -63,6 +76,9 @@ def setup_path_session(): binaries = [] for cmd in COMMANDS.keys(): binaries.append({"name": cmd.split()[0], "type": 2, "content": "", "permissions": 1}) + boot_files = [] + for bin_file in BOOT_FILES: + boot_files.append({"name": bin_file, "type": 2, "content": "", "permissions": 1}) session["paths"] = [ {"name": "home", "type": 0, "children": [ @@ -71,7 +87,7 @@ def setup_path_session(): ], "permissions": 2} ], "permissions": 1}, {"name": "bin", "type": 0, "children": binaries, "permissions": 1}, - {"name": "boot", "type": 0, "children": [], "permissions": 1}, + {"name": "boot", "type": 0, "children": boot_files, "permissions": 1}, {"name": "dev", "type": 0, "children": [], "permissions": 1}, {"name": "etc", "type": 0, "children": [], "permissions": 1}, {"name": "lib", "type": 0, "children": [], "permissions": 1},