Commit 2df0257f authored by Andrei Vagin's avatar Andrei Vagin Committed by Pavel Emelyanov

Dockerfile: don't fail if a binfmt-misc rule already exists

Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent b95bc0d1
all: armv7hf aarch64 ppc64le all: armv7hf aarch64 ppc64le
.FORCE:
qemu-user-static: qemu-user-static:
./extract-deb-pkg qemu-user-static ./extract-deb-pkg qemu-user-static
binfmt_misc: binfmt_misc: .FORCE
echo ':armv7hf:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register; ./binfmt_misc
echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-aarch64-static:' > /proc/sys/fs/binfmt_misc/register
echo ':ppc64le:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\x00:/usr/bin/qemu-ppc64le-static:' > /proc/sys/fs/binfmt_misc/register
armv7hf: qemu-user-static armv7hf: qemu-user-static binfmt_misc
docker build -t criu-armv7hf -f Dockerfile.armv7hf ../.. docker build -t criu-armv7hf -f Dockerfile.armv7hf ../..
aarch64: qemu-user-static aarch64: qemu-user-static binfmt_misc
docker build -t criu-aarch64 -f Dockerfile.aarch64 ../.. docker build -t criu-aarch64 -f Dockerfile.aarch64 ../..
ppc64le: qemu-user-static ppc64le: qemu-user-static binfmt_misc
docker build -t criu-aarch64 -f Dockerfile.ppc64le ../.. docker build -t criu-aarch64 -f Dockerfile.ppc64le ../..
clean: clean:
......
set -e -x
test -f /proc/sys/fs/binfmt_misc/armv7hf ||
echo ':armv7hf:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register;
test -f /proc/sys/fs/binfmt_misc/aarch64 ||
echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-aarch64-static:' > /proc/sys/fs/binfmt_misc/register
test -f /proc/sys/fs/binfmt_misc/ppc64le ||
echo ':ppc64le:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\x00:/usr/bin/qemu-ppc64le-static:' > /proc/sys/fs/binfmt_misc/register
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment