internal/rosa: initramfs artifact
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 4m0s
Test / ShareFS (push) Successful in 3m59s
Test / Hpkg (push) Successful in 4m30s
Test / Sandbox (race detector) (push) Successful in 5m7s
Test / Hakurei (race detector) (push) Successful in 5m57s
Test / Flake checks (push) Successful in 1m57s

This constructs a single-program initramfs and populates /dev/null so the runtime does not throw if the kernel fails to set up console.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-02-25 16:28:57 +09:00
parent 2aeac7f582
commit 37d368a7f9
2 changed files with 33 additions and 7 deletions

View File

@@ -10,7 +10,17 @@ import (
type PArtifact int
const (
ACL PArtifact = iota
// ImageInitramfs is the Rosa OS initramfs archive.
ImageInitramfs PArtifact = iota
// Kernel is the generic Rosa OS Linux kernel.
Kernel
// KernelHeaders is an installation of kernel headers for [Kernel].
KernelHeaders
// KernelSource is a writable kernel source tree installed to [AbsUsrSrc].
KernelSource
ACL
ArgpStandalone
Attr
Autoconf
@@ -42,9 +52,6 @@ const (
Hakurei
HakureiDist
IniConfig
Kernel
KernelHeaders
KernelSource
Kmod
LibXau
Libcap
@@ -148,6 +155,12 @@ func (t Toolchain) Load(p PArtifact) pkg.Artifact {
// ResolveName returns a [PArtifact] by name.
func ResolveName(name string) (p PArtifact, ok bool) {
p, ok = map[string]PArtifact{
"initramfs-image": ImageInitramfs,
"kernel": Kernel,
"kernel-headers": KernelHeaders,
"kernel-source": KernelSource,
"acl": ACL,
"argp-standalone": ArgpStandalone,
"attr": Attr,
@@ -180,9 +193,6 @@ func ResolveName(name string) (p PArtifact, ok bool) {
"hakurei": Hakurei,
"hakurei-dist": HakureiDist,
"iniconfig": IniConfig,
"kernel": Kernel,
"kernel-headers": KernelHeaders,
"kernel-source": KernelSource,
"kmod": Kmod,
"libXau": LibXau,
"libcap": Libcap,