1
0
Fork 0

Auto-generate rootfs image name

master
dump_stack() 4 years ago
parent fdb08ecf62
commit f81a4e38a1

@ -27,6 +27,12 @@ func (km KernelMask) DockerName() string {
return fmt.Sprintf("out_of_tree_%s_%s", distro, release)
}
func (km KernelMask) ImageName() string {
distro := strings.ToLower(km.DistroType.String())
release := strings.Replace(km.DistroRelease, ".", "", -1)
return fmt.Sprintf("%s_%s.img", distro, release)
}
type ArtifactType int
const (

@ -247,7 +247,11 @@ func genInitrdPath(files []os.FileInfo, kname string) string {
}
func genRootfsImage(km config.KernelMask) string {
return "does not implemented yet, you need to set it byself"
usr, err := user.Current()
if err != nil {
return fmt.Sprintln(err)
}
return usr.HomeDir + "/.out-of-tree/images/" + km.ImageName()
}
func genKernels(km config.KernelMask, newkcfg *config.KernelConfig) (

Loading…
Cancel
Save