forked from security/hakurei
internal/rosa: gen_init_cpio artifact
This works much better than hacking around the toybox cpio implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -43,6 +43,7 @@ const (
|
|||||||
GMP
|
GMP
|
||||||
GLib
|
GLib
|
||||||
Gawk
|
Gawk
|
||||||
|
GenInitCPIO
|
||||||
Gettext
|
Gettext
|
||||||
Git
|
Git
|
||||||
Go
|
Go
|
||||||
@@ -187,6 +188,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
|
|||||||
"gmp": GMP,
|
"gmp": GMP,
|
||||||
"glib": GLib,
|
"glib": GLib,
|
||||||
"gawk": Gawk,
|
"gawk": Gawk,
|
||||||
|
"gen_init_cpio": GenInitCPIO,
|
||||||
"gettext": Gettext,
|
"gettext": Gettext,
|
||||||
"git": Git,
|
"git": Git,
|
||||||
"go": Go,
|
"go": Go,
|
||||||
|
|||||||
@@ -123,3 +123,11 @@ cp -av "$3" "$4"
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
func init() { artifactsF[Kernel] = Toolchain.newKernel }
|
func init() { artifactsF[Kernel] = Toolchain.newKernel }
|
||||||
|
|
||||||
|
func (t Toolchain) newGenInitCPIO() pkg.Artifact {
|
||||||
|
return t.New("gen_init_cpio-"+kernelVersion, 0, nil, nil, nil, `
|
||||||
|
mkdir -p /work/system/bin/
|
||||||
|
cc -o /work/system/bin/gen_init_cpio /usr/src/linux/usr/gen_init_cpio.c
|
||||||
|
`, pkg.Path(AbsUsrSrc.Append("linux"), false, kernelSource))
|
||||||
|
}
|
||||||
|
func init() { artifactsF[GenInitCPIO] = Toolchain.newGenInitCPIO }
|
||||||
|
|||||||
Reference in New Issue
Block a user