summaryrefslogtreecommitdiffstats
path: root/util/manibuilder/Makefile.targets
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-12-22 02:08:57 +0100
committerAngel Pons <th3fanbus@gmail.com>2021-03-16 10:11:13 +0000
commit3732ff6b7be95193cd4e51e39e2a4396530f6016 (patch)
treebaf956a9b4021a28f0e4ff81299fc8c670f2e53e /util/manibuilder/Makefile.targets
parentdc7c99b99e7f74bd1fea1da5f42b941a782f0814 (diff)
downloadflashrom-3732ff6b7be95193cd4e51e39e2a4396530f6016.tar.gz
flashrom-3732ff6b7be95193cd4e51e39e2a4396530f6016.tar.bz2
flashrom-3732ff6b7be95193cd4e51e39e2a4396530f6016.zip
Add Manibuilder
Add a set of Dockerfiles for build testing. If you have an x86 machine and ~20GiB free disk space, run `make register` and `make -jxx` in util/manibuilder and go eat some pizza. The former runs a privileged docker container to set binfmt_misc up for qemu (read the code, don't trust it). Regarding the build targets, this is the original state of Manibuilder as it was used to build-test `flashrom-1.0`. Some fixes to the frame- work were applied, but fixups for the targets will be done in separate patches to maintain their original state for reference. Change-Id: I60863a5c7d70dde71486fccb66cb59b30ba4d982 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/23005 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util/manibuilder/Makefile.targets')
-rw-r--r--util/manibuilder/Makefile.targets85
1 files changed, 85 insertions, 0 deletions
diff --git a/util/manibuilder/Makefile.targets b/util/manibuilder/Makefile.targets
new file mode 100644
index 000000000..b1aee29bb
--- /dev/null
+++ b/util/manibuilder/Makefile.targets
@@ -0,0 +1,85 @@
+ANITA_TAGS := anita\:amd64 anita\:i386
+
+MULTIARCH_TAGS := \
+ centos\:7.3-aarch64-clean centos\:7.3-amd64-clean \
+ centos\:7.2-amd64-clean \
+ $(foreach a,x86_64 ppc64le aarch64, \
+ $(foreach v,25 24, \
+ fedora\:$(v)-$(a))) \
+ $(foreach a,ppc64el arm64 armhf mips mipsel amd64 i386, \
+ $(foreach v,sid buster stretch, \
+ debian-debootstrap\:$(a)-$(v))) \
+ $(foreach a,ppc64el arm64 armhf amd64 i386, \
+ $(foreach v,bionic xenial, \
+ ubuntu-debootstrap\:$(a)-$(v))) \
+ ubuntu-debootstrap\:powerpc-xenial \
+ $(foreach a,aarch64 armhf amd64 i386, \
+ $(foreach v,v3.8 v3.7 v3.6, \
+ alpine\:$(a)-$(v))) \
+
+OTHER_TAGS := djgpp\:6.1.0
+
+ALL_TAGS := $(ANITA_TAGS) $(MULTIARCH_TAGS) $(OTHER_TAGS)
+
+arch_filter = $(sort \
+ $(foreach arch,$(1), \
+ $(filter-out $(subst $(arch),,$(MULTIARCH_TAGS)),$(MULTIARCH_TAGS))))
+
+machine_map = \
+ $(if $(filter i386 i686 x86,$(1)),i386 x86, \
+ $(if $(filter x86_64,$(1)),amd64 i386 x86, \
+ $(if $(filter armv7l armv6l,$(1)),armhf, \
+ $(if $(filter aarch64,$(1)),aarch64 arm64, \
+ $(if $(filter ppc64le,$(1)),ppc64le ppc64el, \
+ $(if $(filter ppc,$(1)),powerpc, \
+ $(if $(filter mips,$(1)),mips mipsel, \
+ $(1))))))))
+
+NATIVE_TAGS := $(call arch_filter,$(call machine_map,$(shell uname -m)))
+
+# rather arbitrary selection of images that seem to work (focus on amd64)
+DEFAULT_TAGS := \
+ anita\:amd64 \
+ djgpp\:6.1.0 \
+ fedora\:25-x86_64 \
+ fedora\:25-ppc64le \
+ fedora\:25-aarch64 \
+ fedora\:24-x86_64 \
+ centos\:7.3-aarch64-clean \
+ centos\:7.3-amd64-clean \
+ centos\:7.2-amd64-clean \
+ debian-debootstrap\:ppc64el-stretch \
+ debian-debootstrap\:armhf-stretch \
+ debian-debootstrap\:mips-stretch \
+ debian-debootstrap\:mipsel-stretch \
+ debian-debootstrap\:amd64-stretch \
+ debian-debootstrap\:i386-stretch \
+ debian-debootstrap\:amd64-sid \
+ ubuntu-debootstrap\:arm64-xenial \
+ ubuntu-debootstrap\:amd64-xenial \
+ ubuntu-debootstrap\:powerpc-xenial \
+ ubuntu-debootstrap\:amd64-bionic \
+ alpine\:amd64-v3.7 \
+ alpine\:amd64-v3.8 \
+
+# also run all native tests by default
+DEFAULT_TAGS += $(filter-out $(DEFAULT_TAGS),$(NATIVE_TAGS))
+
+default: $(DEFAULT_TAGS)
+
+native: $(NATIVE_TAGS)
+
+all: $(ALL_TAGS)
+
+show-default:
+ @printf "%s\n" $(DEFAULT_TAGS)
+
+show-native:
+ @printf "%s\n" $(NATIVE_TAGS)
+
+show-all:
+ @printf "%s\n" $(ALL_TAGS)
+
+.PHONY: default native all
+.PHONY: show-default show-native show-all
+.PHONY: $(ALL_TAGS)