aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-14 19:48:33 +0900
committerOphestra <cat@gensokyo.uk>2026-03-14 19:50:04 +0900
commit8b875f865ca465807083353ca228293bb19b92b3 (patch)
tree65c11ac17f927a8b8ec128594793f1665af7b17a /cmd
parent8905d653ba8ac5f2a70a6df654ebfa2a17206729 (diff)
cmd/earlyinit: remount root and set firmware path
The default search paths cannot be configured, configuring them here is most sound for now. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/earlyinit/main.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmd/earlyinit/main.go b/cmd/earlyinit/main.go
index 40883302..8bf7230a 100644
--- a/cmd/earlyinit/main.go
+++ b/cmd/earlyinit/main.go
@@ -94,6 +94,22 @@ func main() {
"",
))
+ // after top level has been set up
+ mustSyscall("remount root", Mount(
+ "",
+ "/",
+ "",
+ MS_REMOUNT|MS_BIND|
+ MS_RDONLY|MS_NODEV|MS_NOSUID|MS_NOEXEC,
+ "",
+ ))
+
+ must(os.WriteFile(
+ "/sys/module/firmware_class/parameters/path",
+ []byte("/system/lib/firmware"),
+ 0,
+ ))
+
}
// mustSyscall calls [log.Fatalln] if err is non-nil.