diff --git a/Src/Hyperion-bash/bin/hfetch b/Src/Hyperion-bash/bin/hfetch index 392282f..a640241 100644 --- a/Src/Hyperion-bash/bin/hfetch +++ b/Src/Hyperion-bash/bin/hfetch @@ -33,7 +33,6 @@ local host_str = syscall.getHost() or "Unknown" local cc_ver = host_str:match("ComputerCraft ([%d%.]+)") or host_str local info = { - -- {label, value} label=nil means print value as-is (userhost / separator) {nil, userhost}, {nil, string.rep("-", #userhost)}, {"OS", syscall.version() or "Unknown"}, @@ -42,7 +41,7 @@ local info = { {"Uptime", formatUptime(syscall.getUptime() or 0)}, {"Tasks", tostring(#(syscall.getTasks() or {}))}, {"Shell", syscall.getEnviron("SHELL") or "Unknown"}, - {"Terminal", "TTY1"}, + {"Terminal", "tty1"}, {"UID", tostring(syscall.getuid())}, {"Packages", "n/a (spm)"}, } @@ -71,15 +70,12 @@ local lines = math.max(#logo, #info) for i = 1, lines do local logo_str = logo[i] or string.rep(" ", 36) - -- print logo segment in cyan c(C_LOGO) printInline(logo_str) - -- print separator pipe c(C_LABEL) printInline("| ") - -- print info segment local row = info[i] if row then if row[1] == nil and i == 1 then diff --git a/Src/Hyperion-bash/bin/hysh b/Src/Hyperion-bash/bin/hysh index a1a8912..a1bc15a 100644 --- a/Src/Hyperion-bash/bin/hysh +++ b/Src/Hyperion-bash/bin/hysh @@ -1,6 +1,6 @@ --:Minify:-- -syscall.open("/dev/tty/TTY1","r") --stdin (Device 0) -syscall.open("/dev/tty/TTY1","w") --stdout (Device 1) +syscall.open("/dev/tty/tty1","r") --stdin (Device 0) +syscall.open("/dev/tty/tty1","w") --stdout (Device 1) syscall.open("/dev/null","w") --stderr (device 2) local success, errorMsg = xpcall(function() @@ -957,8 +957,8 @@ local function runCommand(command) end local proc = syscall.spawn(function(...) - syscall.open("/dev/tty/TTY1","r") - syscall.open("/dev/tty/TTY1","w") + syscall.open("/dev/tty/tty1","r") + syscall.open("/dev/tty/tty1","w") syscall.open("/dev/null","w") local ok2, msg = pcall(program, ...) if not ok2 then printError(progName, msg) end diff --git a/Src/Hyperion-bash/bin/hyshex b/Src/Hyperion-bash/bin/hyshex index 0ff03ce..b69309a 100644 --- a/Src/Hyperion-bash/bin/hyshex +++ b/Src/Hyperion-bash/bin/hyshex @@ -1,6 +1,6 @@ --:Minify:-- -syscall.open("/dev/tty/TTY1","r") -syscall.open("/dev/tty/TTY1","w") +syscall.open("/dev/tty/tty1","r") +syscall.open("/dev/tty/tty1","w") syscall.open("/dev/null","r") syscall.devctl(1,"clear") syscall.devctl(1,"sfgc",1) @@ -57,8 +57,8 @@ while true do printInline("> ") end proc = syscall.spawn(function(...) - syscall.open("/dev/tty/TTY1","r") - syscall.open("/dev/tty/TTY1","w") + syscall.open("/dev/tty/tty1","r") + syscall.open("/dev/tty/tty1","w") syscall.open("/dev/null","w") program(...) end, path, nil, {table.unpack(split, 2)}) diff --git a/Src/Hyperion-bash/bin/login b/Src/Hyperion-bash/bin/login index ce0756f..a81c82e 100644 --- a/Src/Hyperion-bash/bin/login +++ b/Src/Hyperion-bash/bin/login @@ -1,6 +1,6 @@ --:Minify:-- -syscall.open("/dev/tty/TTY1", "r") --stdin (fd 0) -syscall.open("/dev/tty/TTY1", "w") --stdout (fd 1) +syscall.open("/dev/tty/tty1", "r") --stdin (fd 0) +syscall.open("/dev/tty/tty1", "w") --stdout (fd 1) syscall.open("/dev/null", "w") --stderr (fd 2) diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/01_stdlib.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/01_stdlib.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/01_stdlib.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/01_stdlib.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/10_vfs.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/10_vfs.kmod similarity index 99% rename from Src/Hyperion-kernel/lib/modules/Hyperion/10_vfs.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/10_vfs.kmod index 6024265..60d90ba 100644 --- a/Src/Hyperion-kernel/lib/modules/Hyperion/10_vfs.kmod +++ b/Src/Hyperion-kernel/lib/modules/hyperion/10_vfs.kmod @@ -141,6 +141,7 @@ local function normalizePath(path) table.remove(stack) end else + comp = comp:lower() if not comp:match(SAFE_COMPONENT_PATTERN) then error("EINVAL: illegal characters in path component: " .. comp, 2) end diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/11_require.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/11_require.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/11_require.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/11_require.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/12_devfs.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/12_devfs.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/12_devfs.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/12_devfs.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/12_tmpfs.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/12_tmpfs.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/12_tmpfs.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/12_tmpfs.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/13_loopdev.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/13_loopdev.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/13_loopdev.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/13_loopdev.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/14_keventd.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/14_keventd.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/14_keventd.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/14_keventd.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/19_fstab.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/19_fstab.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/19_fstab.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/19_fstab.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/20_signals.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/20_signals.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/20_signals.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/20_signals.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/20_socket.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/20_socket.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/20_socket.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/20_socket.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/26_tty.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/26_tty.kmod similarity index 99% rename from Src/Hyperion-kernel/lib/modules/Hyperion/26_tty.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/26_tty.kmod index ba120a2..0edd9ec 100644 --- a/Src/Hyperion-kernel/lib/modules/Hyperion/26_tty.kmod +++ b/Src/Hyperion-kernel/lib/modules/hyperion/26_tty.kmod @@ -385,11 +385,11 @@ kernel.processes.cctmond = function() end end -newtty(apis.term, "TTY1", fifo.pop) +newtty(apis.term, "tty1", fifo.pop) for i,v in ipairs({peripheral.find("monitor")}) do v.setTextScale(.5) v.write("Initializing...") - newtty(v,"TTY"..tostring(i+1),function () end) + newtty(v,"tty"..tostring(i+1),function () end) end \ No newline at end of file diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/30_userspace.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/30_userspace.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/30_userspace.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/30_userspace.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/40_auth.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/40_auth.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/40_auth.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/40_auth.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/45_hypervisor.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/45_hypervisor.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/45_hypervisor.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/45_hypervisor.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/47_dbg.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/47_dbg.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/47_dbg.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/47_dbg.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/50_gpio.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/50_gpio.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/50_gpio.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/50_gpio.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/70_stdlibadv.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/70_stdlibadv.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/70_stdlibadv.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/70_stdlibadv.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/90_init.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/90_init.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/90_init.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/90_init.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/91_login.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/91_login.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/91_login.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/91_login.kmod diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/92_permissions.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/92_permissions.kmod similarity index 98% rename from Src/Hyperion-kernel/lib/modules/Hyperion/92_permissions.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/92_permissions.kmod index 85274c8..cb84c38 100644 --- a/Src/Hyperion-kernel/lib/modules/Hyperion/92_permissions.kmod +++ b/Src/Hyperion-kernel/lib/modules/hyperion/92_permissions.kmod @@ -193,10 +193,10 @@ mergeMeta("/lib/sys", { }) mergeMeta("/lib/modules", { - {"Hyperion", REG, 0, 0, RWX_RX_RX}, + {"hyperion", REG, 0, 0, RWX_RX_RX}, }) -mergeMeta("/lib/modules/Hyperion", { +mergeMeta("/lib/modules/hyperion", { {"01_stdlib.kmod", REG, 0, 0, RW_R_R}, {"10_vfs.kmod", REG, 0, 0, RW_R_R}, {"11_require.kmod", REG, 0, 0, RW_R_R}, diff --git a/Src/Hyperion-kernel/lib/modules/Hyperion/99_final.kmod b/Src/Hyperion-kernel/lib/modules/hyperion/99_final.kmod similarity index 100% rename from Src/Hyperion-kernel/lib/modules/Hyperion/99_final.kmod rename to Src/Hyperion-kernel/lib/modules/hyperion/99_final.kmod diff --git a/build.py b/build.py index d8fceeb..f6e3b23 100644 --- a/build.py +++ b/build.py @@ -203,7 +203,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 +215,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)))