diff options
author | Yonghee Han <onstudy@samsung.com> | 2016-02-22 21:26:05 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2016-02-22 21:26:05 -0800 |
commit | 383fc3deeca45d17010d57b119cb02969950efb5 (patch) | |
tree | 16837d07a4bcacaec2873342ef65df1d0e9bce15 | |
parent | 1cb3a471bdef3dece184734f8a34f0ee57e753d6 (diff) | |
parent | 26a24b2926ab806347abc90e0b2d2ead2b2814c4 (diff) | |
download | qemu-383fc3deeca45d17010d57b119cb02969950efb5.tar.gz qemu-383fc3deeca45d17010d57b119cb02969950efb5.tar.bz2 qemu-383fc3deeca45d17010d57b119cb02969950efb5.zip |
Merge "Keep working binfmt on Runscripts" into tizen_base
-rw-r--r-- | packaging/baselibs.conf | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf index df137d0f3..b50ee4740 100644 --- a/packaging/baselibs.conf +++ b/packaging/baselibs.conf @@ -5,12 +5,19 @@ arch x86_64 targets armv7l:cross aarch64:cross targettype cross package qemu-linux-user autoreqprov off +/ + post "function setbinfmt () {" + post " local arch=$1" + post " local fmt=$2" + post " local comp_fmt=$(echo ${fmt} | sed -e 's/.*:://;s/:[^:]$//;s/\\x//g')" + post " local curr_fmt=$(cat /proc/sys/fs/binfmt_misc/${arch} | sed -ne '/interpreter/{s/interpreter //;h};/magic/{s/magic //;H};/mask/{s/mask //;G;s/\([^\n]*\)\n\([^\n]*\)\n\([^\n]*\)/\3:\1:\2/p}')" + post " if ( [ ! -e "/proc/sys/fs/binfmt_misc/${arch}" ] || [ "x${comp_fmt}" != "x${curr_fmt}" ] ); then" + post " builtin echo -1 > "/proc/sys/fs/binfmt_misc/${arch}"" + post " builtin echo "${fmt}" > /proc/sys/fs/binfmt_misc/register" + post " fi" + post "}" post "[ ! -d /proc/sys/fs/binfmt_misc ] && ( /sbin/modprobe binfmt_misc )" post "[ ! -f /proc/sys/fs/binfmt_misc/register ] && ( mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc )" - post "[ -e /proc/sys/fs/binfmt_misc/aarch64 ] && ( builtin echo -1 > /proc/sys/fs/binfmt_misc/aarch64 )" post "[ -e /proc/sys/fs/binfmt_misc/arm64 ] && ( builtin echo -1 > /proc/sys/fs/binfmt_misc/arm64 )" - post "[ -e /proc/sys/fs/binfmt_misc/arm ] && ( builtin echo -1 > /proc/sys/fs/binfmt_misc/arm )" - post "[ -e /proc/sys/fs/binfmt_misc/armeb ] && ( builtin echo -1 > /proc/sys/fs/binfmt_misc/armeb )" - post "builtin echo ':arm: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-binfmt:P' > /proc/sys/fs/binfmt_misc/register" - post "builtin echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P' > /proc/sys/fs/binfmt_misc/register" - post "builtin 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-binfmt:P' > /proc/sys/fs/binfmt_misc/register" + post "setbinfmt 'arm' ':arm:M::\x7f\x45\x4c\x46\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-binfmt:P' " + post "setbinfmt 'armeb' ':armeb:M::\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P'" + post "setbinfmt 'aarch64' ':aarch64:M::\x7f\x45\x4c\x46\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-binfmt:P'" |