build-vm, tar2fs: get ARCH from command line argument

tar2fs does not run in hasher and without qemu. This causes build
problems for an architecture other than the host.
This commit is contained in:
Anton Midyukov 2020-01-22 00:45:42 +07:00
parent 8117194b02
commit fc67e5a8c2
2 changed files with 6 additions and 2 deletions

View File

@ -35,7 +35,11 @@ EFIPART=
BOOTLOADER="$5"
ARCH="$(arch)" # NB: sudo => no GLOBAL_ will do either; mind qemu-*
if [ -n "$6" ]; then
ARCH="$6"
else
ARCH="$(arch)"
fi
case "$ARCH" in
e2k)

View File

@ -45,7 +45,7 @@ tar2fs: check-sudo prepare-tarball-qemu
fi; \
if ! sudo $$TOPDIR/bin/tar2fs \
"$(VM_TARBALL)" "$(VM_RAWDISK)" "$(VM_SIZE)" "$(VM_FSTYPE)" \
"$(VM_BOOTLOADER)"; then \
"$(VM_BOOTLOADER)" "$(ARCH)"; then \
echo "** error: sudo tar2fs failed, see build log" >&2; \
exit 1; \
fi