add in all the other architectures from binfmt misc and script to generate them

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
Justin Cormack
2016-01-07 16:12:35 +00:00
parent e50c7317cb
commit 453f38e64a
2 changed files with 32 additions and 1 deletions

13
scripts/binfmt.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
for f in /proc/sys/fs/binfmt_misc/qemu*
do
NAME=$(basename $f)
MAGIC=$(cat $f | grep '^magic' | sed 's/^magic //' | sed 's/\(..\)/\\x\1/g')
OFFSET=$(cat $f | grep '^offset' | sed 's/^offset //')
MASK=$(cat $f | grep '^mask' | sed 's/^mask //' | sed 's/\(..\)/\\x\1/g')
EXEC="/usr/bin/$f-static"
FLAGS=$(cat $f | grep '^flags:' | sed 's/^flags: //')
printf "echo \":${NAME}:M:${OFFSET}:${MAGIC}:${MASK}:${EXEC}:${FLAGS}\" > /proc/sys/fs/binfmt_misc/register\n"
done