From 8b875f865ca465807083353ca228293bb19b92b3 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 14 Mar 2026 19:48:33 +0900 Subject: 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 --- cmd/earlyinit/main.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cmd/earlyinit') 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. -- cgit v1.3.1