internal/rosa: basic system image
All checks were successful
Test / Create distribution (push) Successful in 1m2s
Test / Sandbox (push) Successful in 2m46s
Test / ShareFS (push) Successful in 3m42s
Test / Hakurei (push) Successful in 3m48s
Test / Sandbox (race detector) (push) Successful in 5m0s
Test / Hakurei (race detector) (push) Successful in 6m7s
Test / Flake checks (push) Successful in 1m23s
All checks were successful
Test / Create distribution (push) Successful in 1m2s
Test / Sandbox (push) Successful in 2m46s
Test / ShareFS (push) Successful in 3m42s
Test / Hakurei (push) Successful in 3m48s
Test / Sandbox (race detector) (push) Successful in 5m0s
Test / Hakurei (race detector) (push) Successful in 6m7s
Test / Flake checks (push) Successful in 1m23s
This is a simple image for debugging and is not yet set up for dm-verity. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -22,6 +22,8 @@ const (
|
|||||||
|
|
||||||
// EarlyInit is the Rosa OS initramfs init program.
|
// EarlyInit is the Rosa OS initramfs init program.
|
||||||
EarlyInit
|
EarlyInit
|
||||||
|
// ImageSystem is the Rosa OS /system image.
|
||||||
|
ImageSystem
|
||||||
// ImageInitramfs is the Rosa OS initramfs archive.
|
// ImageInitramfs is the Rosa OS initramfs archive.
|
||||||
ImageInitramfs
|
ImageInitramfs
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package rosa
|
package rosa
|
||||||
|
|
||||||
import "hakurei.app/internal/pkg"
|
import (
|
||||||
|
"hakurei.app/container/fhs"
|
||||||
|
"hakurei.app/internal/pkg"
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
artifactsM[EarlyInit] = Metadata{
|
artifactsM[EarlyInit] = Metadata{
|
||||||
@@ -24,12 +27,32 @@ echo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t Toolchain) newImageSystem() (pkg.Artifact, string) {
|
||||||
|
return t.New("system.img", TNoToolchain, t.AppendPresets(nil,
|
||||||
|
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
|
||||||
|
}
|
||||||
|
func init() {
|
||||||
|
artifactsM[ImageSystem] = Metadata{
|
||||||
|
Name: "system-image",
|
||||||
|
Description: "Rosa OS system image",
|
||||||
|
|
||||||
|
f: Toolchain.newImageSystem,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (t Toolchain) newImageInitramfs() (pkg.Artifact, string) {
|
func (t Toolchain) newImageInitramfs() (pkg.Artifact, string) {
|
||||||
return t.New("initramfs", TNoToolchain, []pkg.Artifact{
|
return t.New("initramfs", TNoToolchain, t.AppendPresets(nil,
|
||||||
t.Load(Zstd),
|
Zstd,
|
||||||
t.Load(EarlyInit),
|
EarlyInit,
|
||||||
t.Load(GenInitCPIO),
|
GenInitCPIO,
|
||||||
}, nil, nil, `
|
), nil, nil, `
|
||||||
gen_init_cpio -t 4294967295 -c /usr/src/initramfs | zstd > /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(`
|
`, pkg.Path(AbsUsrSrc.Append("initramfs"), false, pkg.NewFile("initramfs", []byte(`
|
||||||
dir /dev 0755 0 0
|
dir /dev 0755 0 0
|
||||||
|
|||||||
Reference in New Issue
Block a user