Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何配置龙芯二进制翻译环境 #6

Open
shipujin opened this issue Jul 26, 2023 · 0 comments
Open

如何配置龙芯二进制翻译环境 #6

shipujin opened this issue Jul 26, 2023 · 0 comments

Comments

@shipujin
Copy link
Member

shipujin commented Jul 26, 2023

  1. 打开slakbuilds仓库安装二进制翻译程序和库
slackpkg install lat lat-runtime-i386 lat-runtime-x86_64 wine
  1. 配置
mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc 

echo ":lat-i386-static:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/lat-i386-static:" > /proc/sys/fs/binfmt_misc/register

echo ":lat-x86_64-static:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/lat-x86_64-static:" > /proc/sys/fs/binfmt_misc/register

至此可以用安装好的wine执行windows程序;可以执行 x86_64 和 i386 架构的linux 二进制程序

参考文档:
kernel binfmt_misc: https://www.kernel.org/doc/Documentation/binfmt_misc.txt
qemu binfmt config: https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant