Piotr Król has uploaded this change for review.

View Change

util/docker: add support for crossgcc building params

In some cases user may want to build just one toolchain not all. This
patch introduce COREBOOT_CROSSGCC_PARAM, which by default is set to
all_without_gdb so previous behavior was not changed. User can pass
different parameter eg. COREBOOT_CROSSGCC_PARAM=build-x64 to build just
x64 SDK.

Change-Id: I858ba09644b5b86a4b0e828e4f342aee5083be93
Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
---
M util/docker/Makefile
M util/docker/coreboot-sdk/Dockerfile
2 files changed, 5 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/22276/1
diff --git a/util/docker/Makefile b/util/docker/Makefile
index ef43d37..f70ee89 100644
--- a/util/docker/Makefile
+++ b/util/docker/Makefile
@@ -34,6 +34,9 @@
# Commit id to build from
export DOCKER_COMMIT?=$(shell git log -n 1 --pretty=%h)

+# SDK architecture
+export COREBOOT_CROSSGCC_PARAM?=all_without_gdb
+
test-docker:
$(if $(DOCKER),,\
$(warning Docker command not found. Please install docker) \
@@ -50,6 +53,7 @@
cat coreboot-sdk/Dockerfile | \
sed "s/{{DOCKER_COMMIT}}/$(DOCKER_COMMIT)/" | \
sed "s/{{SDK_VERSION}}/$(COREBOOT_CONTAINER_VERSION)/" | \
+ sed "s/{{CROSSGCC_PARAM}}/$(COREBOOT_CROSSGCC_PARAM)/" | \
$(DOCKER) build -t coreboot/coreboot-sdk:$(COREBOOT_CONTAINER_VERSION) -

upload-coreboot-sdk: test-docker-login
diff --git a/util/docker/coreboot-sdk/Dockerfile b/util/docker/coreboot-sdk/Dockerfile
index 4ea4896..505bef2 100644
--- a/util/docker/coreboot-sdk/Dockerfile
+++ b/util/docker/coreboot-sdk/Dockerfile
@@ -75,7 +75,7 @@
git clone https://review.coreboot.org/coreboot && \
cd coreboot/util/crossgcc && \
git checkout {{DOCKER_COMMIT}} && \
- make all_without_gdb \
+ make {{CROSSGCC_PARAM}} \
BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc && \
cd /root && \
rm -rf coreboot

To view, visit change 22276. To unsubscribe, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I858ba09644b5b86a4b0e828e4f342aee5083be93
Gerrit-Change-Number: 22276
Gerrit-PatchSet: 1
Gerrit-Owner: Piotr Król <piotr.krol@3mdeb.com>