summaryrefslogtreecommitdiffstats
path: root/util/manibuilder/Dockerfile.anita
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2021-03-14 22:15:56 +0100
committerNico Huber <nico.h@gmx.de>2021-04-22 15:16:47 +0000
commit08dc3e55fe8a42cb776f5107ad15287b4cce01c9 (patch)
tree055d27681205577aa915db8fe1bedb7906141b3e /util/manibuilder/Dockerfile.anita
parent928b478d75030eed7e1cf8e1cdfb7722dfe28900 (diff)
downloadflashrom-08dc3e55fe8a42cb776f5107ad15287b4cce01c9.tar.gz
flashrom-08dc3e55fe8a42cb776f5107ad15287b4cce01c9.tar.bz2
flashrom-08dc3e55fe8a42cb776f5107ad15287b4cce01c9.zip
manibuilder/anita: Fix ccache image for non-x86
There is no disk label `a` on non-x86 (at least not on Sparc64). Instead, we use the whole disk which is `d` on x86 and `c` else- where. `newfs` and `fsck` needs a little help in this scenario. Change-Id: Ib298d9cbf5d49ff38a898f4ce3ad54bb6af98d86 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/52482 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util/manibuilder/Dockerfile.anita')
-rw-r--r--util/manibuilder/Dockerfile.anita14
1 files changed, 9 insertions, 5 deletions
diff --git a/util/manibuilder/Dockerfile.anita b/util/manibuilder/Dockerfile.anita
index 5fba6cc8f..dd6f4dd2d 100644
--- a/util/manibuilder/Dockerfile.anita
+++ b/util/manibuilder/Dockerfile.anita
@@ -36,15 +36,19 @@ RUN cd && anita --persist --run \
RUN cd && dd if=/dev/zero bs=1M count=64 of=cache.img && \
anita --vmm-args '-hdb cache.img' --persist --run \
-"echo fdisk -0 -s 169/63/131009 -f -u wd1 && \
- newfs wd1a && \
+"if [ \$(uname -m) = i386 -o \$(uname -m) = amd64 ]; then \
+ bdev=wd1d; \
+ else \
+ bdev=wd1c; \
+ fi; \
+ newfs -I \${bdev} && \
mkdir .ccache && \
- mount /dev/wd1a .ccache && \
+ mount /dev/\${bdev} .ccache && \
ccache -M 60M && \
umount .ccache && \
echo 'manitest() {' >>init && \
- echo ' fsck -y /dev/wd1a' >>init && \
- echo ' mount /dev/wd1a ~/.ccache' >>init && \
+ echo ' fsck -y -t ffs /dev/'\${bdev} >>init && \
+ echo ' mount /dev/'\${bdev}' ~/.ccache' >>init && \
echo ' (cd ~/flashrom && eval \" \$*\")' >>init && \
echo ' ret=\$?' >>init && \
echo ' umount ~/.ccache' >>init && \