[coreboot-gerrit] Patch set updated for coreboot: 0c83439 autoport: Allow binary prerequisites to be placed in the autoport directory.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Sat May 30 00:07:16 CEST 2015


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10370

-gerrit

commit 0c834391685e8f54cd8cd3d22dd4a8b93dc26ba7
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Fri May 29 20:49:09 2015 +0200

    autoport: Allow binary prerequisites to be placed in the autoport directory.
    
    This allow an easy creation of standalone "autoport pack".
    
    Change-Id: Ibe9e38aa3b4bbd7260104e1c2a11630790ff4d2f
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 util/autoport/log_maker.go | 22 ++++++++++++++++++++--
 util/autoport/readme.md    |  7 ++++++-
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/util/autoport/log_maker.go b/util/autoport/log_maker.go
index b991ea7..e2440b4 100644
--- a/util/autoport/log_maker.go
+++ b/util/autoport/log_maker.go
@@ -9,7 +9,7 @@ import (
 	"strings"
 )
 
-func RunAndSave(output string, name string, arg ...string) {
+func TryRunAndSave(output string, name string, arg []string) error {
 	cmd := exec.Command(name, arg...)
 
 	f, err := os.Create(output)
@@ -22,9 +22,27 @@ func RunAndSave(output string, name string, arg ...string) {
 
 	err = cmd.Start()
 	if err != nil {
-		log.Fatal(err)
+		return err
 	}
 	cmd.Wait()
+	return nil
+}
+
+func RunAndSave(output string, name string, arg ...string) {
+	err := TryRunAndSave(output, name, arg)
+	if err == nil {
+		return
+	}
+	idx := strings.LastIndex(name, "/")
+	relname := name
+	if idx >= 0 {
+		relname = name[idx+1:]
+	}
+	relname = "./" + relname
+	err = TryRunAndSave(output, relname, arg)
+	if err != nil {
+		log.Fatal(err)
+	}
 }
 
 func MakeLogs(outDir string) {
diff --git a/util/autoport/readme.md b/util/autoport/readme.md
index 2f525a9..8c139a3 100644
--- a/util/autoport/readme.md
+++ b/util/autoport/readme.md
@@ -30,7 +30,12 @@ This will allow autoport to detect as much as possible
 		make
 		cd ../autoport
 		go build
-		./autoport --input_log=logs --make_logs --coreboot_dir=../..
+		sudo ./autoport --input_log=logs --make_logs --coreboot_dir=../..
+
+	Note: in case you have problems getting gcc and golang to target machine
+	you can just compile on another machine and transfer binaries
+	`autoport`, `inteltool` and `ectool`. You'll still need other prerequisites
+	but you may place them in the same directory as autoport.
 
 * Look for output unknown PCI devices. E.g.
 



More information about the coreboot-gerrit mailing list