From 4b8a0a0d18a68c07aa5834975f4ee882912fa565 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Mon, 24 Jan 2022 21:25:25 -0800 Subject: [PATCH] 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. --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index cc18854..b1b88c8 100644 --- a/main.go +++ b/main.go @@ -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 {