diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-14 19:48:33 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-14 19:50:04 +0900 |
| commit | 8b875f865ca465807083353ca228293bb19b92b3 (patch) | |
| tree | 65c11ac17f927a8b8ec128594793f1665af7b17a | |
| parent | 8905d653ba8ac5f2a70a6df654ebfa2a17206729 (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>
| -rw-r--r-- | cmd/earlyinit/main.go | 16 | ||||
| -rw-r--r-- | internal/rosa/images.go | 14 |
2 files changed, 25 insertions, 5 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. diff --git a/internal/rosa/images.go b/internal/rosa/images.go index e992d520..bfffaf48 100644 --- a/internal/rosa/images.go +++ b/internal/rosa/images.go @@ -32,11 +32,15 @@ func (t Toolchain) newImageSystem() (pkg.Artifact, string) { SquashfsTools, ), nil, nil, ` mksquashfs /mnt/system /work/system.img -`, pkg.Path(fhs.AbsRoot.Append("mnt"), false, - t.Load(Musl), - t.Load(Mksh), - t.Load(Toybox), - )), Unversioned +`, pkg.Path(fhs.AbsRoot.Append("mnt"), false, t.AppendPresets(nil, + Musl, + Mksh, + Toybox, + + Kmod, + Kernel, + Firmware, + )...)), Unversioned } func init() { artifactsM[ImageSystem] = Metadata{ |
