[coreboot-gerrit] Change in coreboot[master]: util/docker: Unify local build targets

Patrick Georgi (Code Review) gerrit at coreboot.org
Fri Nov 16 10:43:58 CET 2018


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/29456 )

Change subject: util/docker: Unify local build targets
......................................................................

util/docker: Unify local build targets

Add a `docker-run-local` target that is used as a template for the
local build targets (`docker-build-coreboot`, `docker-abuild`, and
`docker-what-jenkins-does`).

Note this changes the user for `docker-what-jenkins-does` which has
(ccache) issues if it's not `root`. Will be fixed in a follow-up.

Change-Id: I9088fb9211726cddc37b17ddf70170c2c382679e
Signed-off-by: Nico Huber <nico.h at gmx.de>
Reviewed-on: https://review.coreboot.org/29456
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi at google.com>
---
M util/docker/Makefile
1 file changed, 12 insertions(+), 18 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Patrick Georgi: Looks good to me, approved



diff --git a/util/docker/Makefile b/util/docker/Makefile
index beb2a7e..32714fc 100644
--- a/util/docker/Makefile
+++ b/util/docker/Makefile
@@ -95,29 +95,23 @@
 		$(DOCKER) rmi $$($(DOCKER) images | grep -v "REPOSITORY" | tr -s ' ' | cut -f3 -d ' '); \
 	fi
 
-docker-build-coreboot: test-docker
+docker-run-local: test-docker
 	$(DOCKER) run -u root -it -v $(top):/home/coreboot/coreboot \
 		--user $(UID):$(GID) \
 		--rm coreboot/coreboot-sdk:$(COREBOOT_CONTAINER_VERSION) \
-		/bin/bash -c "cd /home/coreboot/coreboot && \
-		make clean && \
-		make $(BUILD_CMD); \
-		rm .xcompile"
+		/bin/bash -c "cd /home/coreboot/coreboot && $(DOCKER_RUN_LOCAL)"
 
-docker-abuild: test-docker
-	$(DOCKER) run -u root -it -v $(top):/home/coreboot/coreboot \
-		--user $(UID):$(GID) \
-		--rm coreboot/coreboot-sdk:$(COREBOOT_CONTAINER_VERSION) \
-		/bin/bash -c "cd /home/coreboot/coreboot && \
-		make clean && \
-		util/abuild/abuild $(ABUILD_ARGS); \
-		rm -f .xcompile"
+docker-build-coreboot: docker-run-local
+docker-build-coreboot: override DOCKER_RUN_LOCAL := \
+	make clean && make $(BUILD_CMD); rm -f .xcompile
 
-docker-what-jenkins-does: test-docker
-	$(DOCKER) run -u root -it -v $(top):/home/coreboot/coreboot \
-		--rm coreboot/coreboot-sdk:$(COREBOOT_CONTAINER_VERSION) \
-		/bin/bash -c "cd /home/coreboot/coreboot && \
-		make clean && make what-jenkins-does CPUS=$(CPUS)"
+docker-abuild: docker-run-local
+docker-abuild: override DOCKER_RUN_LOCAL := \
+	make clean && util/abuild/abuild $(ABUILD_ARGS); rm -f .xcompile
+
+docker-what-jenkins-does: docker-run-local
+docker-what-jenkins-does: override DOCKER_RUN_LOCAL := \
+	make clean && make what-jenkins-does CPUS=$(CPUS)
 
 docker-jenkins-server: test-docker
 	@if [ ! -d "$(COREBOOT_JENKINS_CACHE_DIR)" ]; then \

-- 
To view, visit https://review.coreboot.org/29456
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I9088fb9211726cddc37b17ddf70170c2c382679e
Gerrit-Change-Number: 29456
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur at aheymans.xyz>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181116/5b5f140b/attachment.html>


More information about the coreboot-gerrit mailing list