summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/manibuilder/Dockerfile.anita11
-rw-r--r--util/manibuilder/Makefile.anita12
-rw-r--r--util/manibuilder/anita-wrapper.sh7
3 files changed, 19 insertions, 11 deletions
diff --git a/util/manibuilder/Dockerfile.anita b/util/manibuilder/Dockerfile.anita
index dd6f4dd2d..f4b1309ce 100644
--- a/util/manibuilder/Dockerfile.anita
+++ b/util/manibuilder/Dockerfile.anita
@@ -3,7 +3,7 @@ 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 INSTALL_MEM=128M
ARG EXTRA_PKG=""
RUN \
@@ -20,11 +20,12 @@ RUN \
USER mani
RUN cd && mkdir .ccache && chown mani:mani .ccache && \
anita --sets kern-GENERIC,modules,base,etc,comp \
- --disk-size ${DISK_SIZE} --memory-size=${MEM_SIZE} \
+ --disk-size ${DISK_SIZE} --memory-size=${INSTALL_MEM} \
install ${INST_IMG} && \
rm -rf work-*/download
-RUN cd && anita --persist --run \
+ARG RUNTIME_MEM=128M
+RUN cd && anita --persist --memory-size=${RUNTIME_MEM} --run \
"echo 'dhcpcd' >init && \
echo 'export PKG_PATH=${PKG_PATH}' >>init && \
. ./init && \
@@ -35,7 +36,8 @@ RUN cd && anita --persist --run \
boot ${INST_IMG}
RUN cd && dd if=/dev/zero bs=1M count=64 of=cache.img && \
- anita --vmm-args '-hdb cache.img' --persist --run \
+ anita --vmm-args '-hdb cache.img' --persist \
+ --memory-size=${RUNTIME_MEM} --run \
"if [ \$(uname -m) = i386 -o \$(uname -m) = amd64 ]; then \
bdev=wd1d; \
else \
@@ -59,4 +61,5 @@ RUN cd && dd if=/dev/zero bs=1M count=64 of=cache.img && \
COPY anita-wrapper.sh /home/mani/mani-wrapper.sh
ENV INST_IMG ${INST_IMG}
+ENV MEM_SIZE ${RUNTIME_MEM}
ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]
diff --git a/util/manibuilder/Makefile.anita b/util/manibuilder/Makefile.anita
index e79519451..21cad8c6b 100644
--- a/util/manibuilder/Makefile.anita
+++ b/util/manibuilder/Makefile.anita
@@ -4,21 +4,25 @@ NETBSD_MIRROR = http://ftp.de.netbsd.org/
anita\:8.2-amd64-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/amd64/8.2/All
anita\:8.2-amd64-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-8.2/amd64/
anita\:8.2-amd64-build: QEMU_DISK_SIZE=2G
-anita\:8.2-amd64-build: QEMU_MEM_SIZE=256M
+anita\:8.2-amd64-build: QEMU_INSTALL_MEM=192M
+anita\:8.2-amd64-build: QEMU_RUNTIME_MEM=512M
anita\:7.1-amd64-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/amd64/7.1/All
anita\:7.1-amd64-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/amd64/
anita\:7.1-amd64-build: QEMU_DISK_SIZE=1G
-anita\:7.1-amd64-build: QEMU_MEM_SIZE=128M
+anita\:7.1-amd64-build: QEMU_INSTALL_MEM=192M
+anita\:7.1-amd64-build: QEMU_RUNTIME_MEM=512M
anita\:7.1-i386-build: PKGSRC_PATH=pub/pkgsrc/packages/NetBSD/i386/7.1/All
anita\:7.1-i386-build: NETBSD_IMAGE=pub/NetBSD/NetBSD-7.1/i386/
anita\:7.1-i386-build: QEMU_DISK_SIZE=1G
-anita\:7.1-i386-build: QEMU_MEM_SIZE=128M
+anita\:7.1-i386-build: QEMU_INSTALL_MEM=128M
+anita\:7.1-i386-build: QEMU_RUNTIME_MEM=256M
$(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 DISK_SIZE=$(QEMU_DISK_SIZE) \
- --build-arg MEM_SIZE=$(QEMU_MEM_SIZE)
+ --build-arg INSTALL_MEM=$(QEMU_INSTALL_MEM) \
+ --build-arg RUNTIME_MEM=$(QEMU_RUNTIME_MEM)
diff --git a/util/manibuilder/anita-wrapper.sh b/util/manibuilder/anita-wrapper.sh
index 617e17f83..3ff9ee17b 100644
--- a/util/manibuilder/anita-wrapper.sh
+++ b/util/manibuilder/anita-wrapper.sh
@@ -9,9 +9,10 @@ CCACHE=.ccache/anita-${IDENT}.img
[ -f ${CCACHE} ] || zcat cache.img.gz >${CCACHE}
if [ $# -eq 0 ]; then
- exec anita --vmm-args "-hdb ${CCACHE}" interact ${INST_IMG}
+ exec anita --vmm-args "-hdb ${CCACHE}" --memory-size=${MEM_SIZE} \
+ interact ${INST_IMG}
else
- exec anita --vmm-args "-hdb ${CCACHE}" --persist \
- --run ". ./init && manitest \"$*\"" \
+ exec anita --vmm-args "-hdb ${CCACHE}" --memory-size=${MEM_SIZE} \
+ --persist --run ". ./init && manitest \"$*\"" \
boot ${INST_IMG}
fi