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>
17 lines
457 B
Go
17 lines
457 B
Go
package rosa
|
|
|
|
import "hakurei.app/internal/pkg"
|
|
|
|
func (t Toolchain) newImageInitramfs() pkg.Artifact {
|
|
return t.New("initramfs", TNoToolchain, []pkg.Artifact{
|
|
t.Load(Zstd),
|
|
t.Load(Hakurei),
|
|
}, nil, nil, `
|
|
cd "$(mktemp -d)"
|
|
cp /system/libexec/hakurei/earlyinit init
|
|
((find . | cpio -R 0:0 -o) && (cd / && echo dev/null | cpio -R 0:0 -o)) | \
|
|
zstd -19 > /work/initramfs.zst
|
|
`)
|
|
}
|
|
func init() { artifactsF[ImageInitramfs] = Toolchain.newImageInitramfs }
|