copyUbootFiles: don't continue if deviceinfo_ubootboardname is unset (MR 18)

If this isn't set in the deviceinfo file, then the device probably
doesn't support the post-processing-with-uboot-files stuff that c07eafd0
set out to address.
This commit is contained in:
Clayton Craft
2022-01-24 21:25:25 -08:00
parent 338c89504f
commit 71492d2931

View File

@@ -598,6 +598,10 @@ func Copy(srcFile, dstFile string) error {
}
func copyUbootFiles(path string, devinfo deviceinfo.DeviceInfo) error {
if devinfo.UbootBoardname == "" {
return nil
}
srcDir := filepath.Join("/usr/share/u-boot", devinfo.UbootBoardname)
entries, err := ioutil.ReadDir(srcDir)
if err != nil {