From 5d7dbc7313434f41e75772a0c0d344945cee0776 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sun, 14 Mar 2021 13:07:20 +0100 Subject: manibuilder/anita: Make disk and memory sizes configurable Change-Id: I95e428a19b4c2042430d3147845397adb1c37e9b Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/flashrom/+/51479 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- util/manibuilder/Dockerfile.anita | 5 ++++- util/manibuilder/Makefile | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/manibuilder/Dockerfile.anita b/util/manibuilder/Dockerfile.anita index c31f541a..5fba6cc8 100644 --- a/util/manibuilder/Dockerfile.anita +++ b/util/manibuilder/Dockerfile.anita @@ -2,6 +2,8 @@ FROM debian:stable ARG PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.1/All ARG INST_IMG=http://ftp.de.netbsd.org/pub/NetBSD/NetBSD-7.1/amd64/ +ARG DISK_SIZE=1G +ARG MEM_SIZE=128M ARG EXTRA_PKG="" RUN \ @@ -18,7 +20,8 @@ RUN \ USER mani RUN cd && mkdir .ccache && chown mani:mani .ccache && \ anita --sets kern-GENERIC,modules,base,etc,comp \ - --disk-size 1024M --memory-size=128M install ${INST_IMG} && \ + --disk-size ${DISK_SIZE} --memory-size=${MEM_SIZE} \ + install ${INST_IMG} && \ rm -rf work-*/download RUN cd && anita --persist --run \ diff --git a/util/manibuilder/Makefile b/util/manibuilder/Makefile index 6baa4df8..839fcbf8 100644 --- a/util/manibuilder/Makefile +++ b/util/manibuilder/Makefile @@ -21,10 +21,15 @@ anita\:amd64-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/amd64/ anita\:i386-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/i386/7.1/All anita\:i386-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/i386/ +$(addsuffix -build,$(ANITA_TAGS)): QEMU_DISK_SIZE=1G +$(addsuffix -build,$(ANITA_TAGS)): QEMU_MEM_SIZE=128M + $(addsuffix -build,$(ANITA_TAGS)): %-build: Dockerfile.anita anita-wrapper.sh $(QUIET_SETUP)docker build . -f $< -t mani/$* \ --build-arg PKG_PATH=$(PKGSRC_MIRROR)$(PKGSRC_PATH) \ - --build-arg INST_IMG=$(NETBSD_MIRROR)$(NETBSD_IMAGE) + --build-arg INST_IMG=$(NETBSD_MIRROR)$(NETBSD_IMAGE) \ + --build-arg DISK_SIZE=$(QEMU_DISK_SIZE) \ + --build-arg MEM_SIZE=$(QEMU_MEM_SIZE) define build_template Dockerfile.$(call ident,$(1)): Dockerfile.$(call stem,$(1)) mani-wrapper.sh -- cgit v1.2.3