1
0
forked from rosa/hakurei

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>
This commit is contained in:
2026-03-14 19:48:33 +09:00
parent 8905d653ba
commit 8b875f865c
2 changed files with 25 additions and 5 deletions

View File

@@ -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.