mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-02 15:37:11 +00:00
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:
13
scripts/binfmt.sh
Executable file
13
scripts/binfmt.sh
Executable 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
|
Reference in New Issue
Block a user