mirror of https://gitee.com/openkylin/qemu.git
update binfmt conf
1) dont register i386 qemu on x86_64 host 2) widen sparc and arm match 3) add sh4, based on patch by David Kozub <zub@linux.fjfi.cvut.cz> Rest based on patch by Jan-Simon Möller <jsmoeller@linuxfoundation.org>
This commit is contained in:
parent
9190749fbe
commit
644d677779
|
@ -12,7 +12,7 @@ fi
|
||||||
# probe cpu type
|
# probe cpu type
|
||||||
cpu=`uname -m`
|
cpu=`uname -m`
|
||||||
case "$cpu" in
|
case "$cpu" in
|
||||||
i386|i486|i586|i686|i86pc|BePC)
|
i386|i486|i586|i686|i86pc|BePC|x86_64)
|
||||||
cpu="i386"
|
cpu="i386"
|
||||||
;;
|
;;
|
||||||
m68k)
|
m68k)
|
||||||
|
@ -24,7 +24,7 @@ case "$cpu" in
|
||||||
"Power Macintosh"|ppc|ppc64)
|
"Power Macintosh"|ppc|ppc64)
|
||||||
cpu="ppc"
|
cpu="ppc"
|
||||||
;;
|
;;
|
||||||
armv4l)
|
armv[4-9]*)
|
||||||
cpu="arm"
|
cpu="arm"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -60,3 +60,7 @@ if [ $cpu != "mips" ] ; then
|
||||||
echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register
|
echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register
|
||||||
echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register
|
echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register
|
||||||
fi
|
fi
|
||||||
|
if [ $cpu != "sh" ] ; then
|
||||||
|
echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue