Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
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>
---
M util/manibuilder/Dockerfile.anita
1 file changed, 9 insertions(+), 5 deletions(-)

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: 3
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged