Nico Huber has uploaded this change for review.

View Change

manibuilder/anita: Fix ccache image for non-x86

There is no disk label `a` on non-x86 (at least not on Spark64).
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>
---
M util/manibuilder/Dockerfile.anita
1 file changed, 9 insertions(+), 5 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/82/52482/1
diff --git a/util/manibuilder/Dockerfile.anita b/util/manibuilder/Dockerfile.anita
index 5fba6cc..dd6f4dd 100644
--- a/util/manibuilder/Dockerfile.anita
+++ b/util/manibuilder/Dockerfile.anita
@@ -36,15 +36,19 @@

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 && \

To view, visit change 52482. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib298d9cbf5d49ff38a898f4ce3ad54bb6af98d86
Gerrit-Change-Number: 52482
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: newchange