diff --git a/configs/loongarch-lab/tools/host-run b/configs/loongarch-lab/tools/host-run index 7319149..a548a5a 100755 --- a/configs/loongarch-lab/tools/host-run +++ b/configs/loongarch-lab/tools/host-run @@ -5,5 +5,9 @@ if [ ! -f /proc/sys/fs/binfmt_misc/register -o ! -f /proc/sys/fs/binfmt_misc/qemu-loongarch64 ]; then # multiarch/qemu-user-static doesn't support loongarch64 yet # docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes >/dev/null - sudo sh -c "echo ':qemu-loongarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02\x01:\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-loongarch64:' > /proc/sys/fs/binfmt_misc/register" + + # ref: https://github.com/multiarch/qemu-user-static/issues/17 + # FIXME: sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges + flags="OCF" + sudo sh -c "echo ':qemu-loongarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02\x01:\xff\xff\xff\xff\xff\xff\xff\xfc\x00\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-loongarch64:$flags' > /proc/sys/fs/binfmt_misc/register" fi