From a90858c0e5371795c7f42319ee54e94f6a699280 Mon Sep 17 00:00:00 2001 From: vejmarie Date: Sun, 29 Apr 2018 20:56:33 +0200 Subject: [PATCH 1/3] Fix u-root parallel build --- modules/u-root | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/u-root b/modules/u-root index d9d9a695..24d09dcf 100644 --- a/modules/u-root +++ b/modules/u-root @@ -10,11 +10,7 @@ UROOT_CMDS ?= export GOPATH=$(build)/go u-root_src_cmds := $(foreach cmd,$(UROOT_CMDS),github.com/u-root/u-root/cmds/$(cmd)) - -$(GOPATH): - $(call do,GO GET,$(u-root_url),\ - go get $(u-root_url) \ - ) +u-root_build := $(shell go get $(u-root_url)) # # If the board directory has its own go commands, copy them @@ -28,7 +24,7 @@ $(u-root_uinit): boards/$(BOARD)/uinit.go $(call install,$<,$@) endif -$(u-root_output): $(GOPATH) $(u-root_uinit) +$(u-root_output): $(u-root_build) $(u-root_uinit) $(call do,U-ROOT,$@,\ $(GOPATH)/bin/u-root \ -build=bb \ From 4c8e97eda15f6ba89cba7f60231ac8f300f3fe35 Mon Sep 17 00:00:00 2001 From: vejmarie Date: Mon, 30 Apr 2018 14:48:24 +0200 Subject: [PATCH 2/3] Enhance parallel build --- modules/u-root | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/u-root b/modules/u-root index 24d09dcf..bcbdb41c 100644 --- a/modules/u-root +++ b/modules/u-root @@ -10,8 +10,11 @@ UROOT_CMDS ?= export GOPATH=$(build)/go u-root_src_cmds := $(foreach cmd,$(UROOT_CMDS),github.com/u-root/u-root/cmds/$(cmd)) -u-root_build := $(shell go get $(u-root_url)) +u-root_build := $(GOPATH)/bin/u-root + +$(GOPATH)/bin/u-root: + go get github.com/u-root/u-root/... # # If the board directory has its own go commands, copy them # into the u-root tree so that they will be bundled into the go initrd @@ -20,7 +23,7 @@ u-root_build := $(shell go get $(u-root_url)) # ifeq "y" "$(shell [ -r 'boards/$(BOARD)/uinit.go' ] && echo y)" u-root_uinit := $(GOPATH)/src/github.com/u-root/u-root/cmds/uinit/uinit.go -$(u-root_uinit): boards/$(BOARD)/uinit.go +$(u-root_uinit): $(u-root_build) boards/$(BOARD)/uinit.go $(call install,$<,$@) endif From 6104c5bdd4ee65cbd6d2670e81e1cbabf6e8d292 Mon Sep 17 00:00:00 2001 From: vejmarie Date: Mon, 30 Apr 2018 16:14:18 +0200 Subject: [PATCH 3/3] Fix uinit setup --- modules/u-root | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/u-root b/modules/u-root index bcbdb41c..283e0be8 100644 --- a/modules/u-root +++ b/modules/u-root @@ -24,7 +24,7 @@ $(GOPATH)/bin/u-root: ifeq "y" "$(shell [ -r 'boards/$(BOARD)/uinit.go' ] && echo y)" u-root_uinit := $(GOPATH)/src/github.com/u-root/u-root/cmds/uinit/uinit.go $(u-root_uinit): $(u-root_build) boards/$(BOARD)/uinit.go - $(call install,$<,$@) + $(call install,boards/$(BOARD)/uinit.go,$@) endif $(u-root_output): $(u-root_build) $(u-root_uinit)