aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/images.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/images.go')
-rw-r--r--internal/rosa/images.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/rosa/images.go b/internal/rosa/images.go
new file mode 100644
index 00000000..40398df2
--- /dev/null
+++ b/internal/rosa/images.go
@@ -0,0 +1,16 @@
+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 }