1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

manibuilder/anita: Always provide reasonable --memory-size

It turned out that the `--memory-size` given at install time is
not persistent. All later anita runs use an arch-dependent default
(32M for i386, so this might explain why it was never stable).

Assuming most machines have >1GiB RAM per processor core available,
we can also increase the runtime size further (better to waste some
RAM than to wait very long because it starts swapping things out).
We choose 512MiB for 64-bit targets and 256MiB for 32-bit ones.

However, we don't need that much for the initial installation step
and it also decides the size of the swap partition. So we use a
smaller size initially that's just enough to get us through the
installation quickly enough (192MiB & 128MiB).

Change-Id: I255c41aeb92cda29ed23a236017472982e839530
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52484
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Nico Huber
2021-04-17 23:40:52 +02:00
parent 08dc3e55fe
commit f4196c6f94
3 changed files with 19 additions and 11 deletions

View File

@ -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