diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-28 23:04:58 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-28 23:04:58 +0900 |
| commit | b4e82e68a737380ecbfed15f2e0cd207c94b5ef1 (patch) | |
| tree | 0ff25da90cc7c6baf7dfd9117f5cde4ae6975733 | |
| parent | d041fee791b3b9a506665a75bd34c3d7f22c8753 (diff) | |
internal/rosa/images: initramfs via gen_init_cpio
This is much cleaner than hacking around the cpio tool.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/rosa/images.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/rosa/images.go b/internal/rosa/images.go index 40398df2..b477309d 100644 --- a/internal/rosa/images.go +++ b/internal/rosa/images.go @@ -6,11 +6,14 @@ func (t Toolchain) newImageInitramfs() pkg.Artifact { return t.New("initramfs", TNoToolchain, []pkg.Artifact{ t.Load(Zstd), t.Load(Hakurei), + t.Load(GenInitCPIO), }, 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 -`) +gen_init_cpio -t 4294967295 -c /usr/src/initramfs | zstd > /work/initramfs.zst +`, pkg.Path(AbsUsrSrc.Append("initramfs"), false, pkg.NewFile("initramfs", []byte(` +dir /dev 0755 0 0 +nod /dev/null 0666 0 0 c 1 3 +nod /dev/console 0600 0 0 c 5 1 +file /init /system/libexec/hakurei/earlyinit 0555 0 0 +`)))) } func init() { artifactsF[ImageInitramfs] = Toolchain.newImageInitramfs } |
