Skip to content

Commit

Permalink
Adding script to configure binfmt.service for users.
Browse files Browse the repository at this point in the history
  • Loading branch information
idavis committed Feb 6, 2020
1 parent e41f868 commit f43f177
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/configure-binfmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/bash

if [ ! -f /lib/binfmt.d/qemu-aarch64-static.conf ]; then
sudo mkdir -p /lib/binfmt.d

# Create a configuration for arm64v8
sudo sh -c 'echo :qemu-aarch64:M::\\x7f\\x45\\x4c\\x46\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\xb7\\x00:\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xfe\\xff\\xff\\xff:/usr/bin/qemu-aarch64-static:F > /lib/binfmt.d/qemu-aarch64-static.conf'

# Restart the service to force an evaluation of the /lib/binfmt.d directory
sudo systemctl restart systemd-binfmt.service
fi

0 comments on commit f43f177

Please sign in to comment.