cmd/mkinitfs: add -no-bootdeploy option to disable boot-deploy
This commit is contained in:
@@ -33,8 +33,12 @@ func main() {
|
|||||||
defer func() { os.Exit(retCode) }()
|
defer func() { os.Exit(retCode) }()
|
||||||
|
|
||||||
outDir := flag.String("d", "/boot", "Directory to output initfs(-extra) and other boot files")
|
outDir := flag.String("d", "/boot", "Directory to output initfs(-extra) and other boot files")
|
||||||
|
|
||||||
var showVersion bool
|
var showVersion bool
|
||||||
flag.BoolVar(&showVersion, "version", false, "Print version and quit.")
|
flag.BoolVar(&showVersion, "version", false, "Print version and quit.")
|
||||||
|
|
||||||
|
var disableBootDeploy bool
|
||||||
|
flag.BoolVar(&disableBootDeploy, "no-bootdeploy", false, "Disable running 'boot-deploy' after generating archives.")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if showVersion {
|
if showVersion {
|
||||||
@@ -114,13 +118,14 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Final processing of initramfs / kernel is done by boot-deploy
|
// Final processing of initramfs / kernel is done by boot-deploy
|
||||||
if err := bootDeploy(workDir, *outDir, devinfo.UbootBoardname); err != nil {
|
if !disableBootDeploy {
|
||||||
log.Println(err)
|
if err := bootDeploy(workDir, *outDir, devinfo.UbootBoardname); err != nil {
|
||||||
log.Println("bootDeploy failed")
|
log.Println(err)
|
||||||
retCode = 1
|
log.Println("bootDeploy failed")
|
||||||
return
|
retCode = 1
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func bootDeploy(workDir, outDir, ubootBoardname string) error {
|
func bootDeploy(workDir, outDir, ubootBoardname string) error {
|
||||||
|
Reference in New Issue
Block a user