diff mbox

[4/6] tests/docker/Makefile: Add a rule for Debian user images

Message ID 20161028163339.31096-5-alex.bennee@linaro.org
State New
Headers show

Commit Message

Alex Bennée Oct. 28, 2016, 4:33 p.m. UTC
This allows you to create Debian images powered by a qemu linux-user
binary. Later patches will list these in the help file but for now:

  make docker-image-debian-stable-arm64

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/docker/Makefile.include | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

-- 
2.10.1
diff mbox

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index d91e28b..bb9e078 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -64,6 +64,22 @@  $(foreach i,$(DOCKER_IMAGES), \
 	) \
 )
 
+# Additional Debian qemu-user images
+#
+# These images are built using the generic debian-bootstrap image and a qemu-user binary
+#
+docker-image-debian-%: DEB_TYPE = $(shell echo '$@' | sed -e 's/docker-image-debian-\([^@]*\)-\(.*\)/\1/')
+docker-image-debian-%: DEB_ARCH = $(shell echo '$@' | sed -e 's/docker-image-debian-\([^@]*\)-\(.*\)/\2/')
+docker-image-debian-%: QEMU_ARCH = $(subst arm64,aarch64,$(subst armhf,arm,$(DEB_ARCH)))
+docker-image-debian-%: QEMU_EXEC=$(BUILD_DIR)/$(QEMU_ARCH)-linux-user/qemu-$(QEMU_ARCH)
+docker-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
+	$(call quiet-command,\
+		DEB_ARCH=$(DEB_ARCH) DEB_TYPE=$(DEB_TYPE) \
+		$(SRC_PATH)/tests/docker/docker.py build qemu:debian-$* $< \
+		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
+		--include-executable=$(QEMU_EXEC),\
+		"BUILD USER","$*")
+
 docker:
 	@echo 'Build QEMU and run tests inside Docker containers'
 	@echo