赤峰做网站开发,域名备案管理系统,学校英语网站栏目名称,通栏式网站FEX-Emu在Debian/Ubuntu系统使用 1. Debootstrap子系统安装#xff08;可选#xff09;2. Debian/Ubuntu依赖包安装3. 获取FEX-Emu源码并编译4. 根文件系统RootFS安装5. 基于 FEX-Emu 运行应用 1. Debootstrap子系统安装#xff08;可选#xff09;
sudo apt-get install … FEX-Emu在Debian/Ubuntu系统使用 1. Debootstrap子系统安装可选2. Debian/Ubuntu依赖包安装3. 获取FEX-Emu源码并编译4. 根文件系统RootFS安装5. 基于 FEX-Emu 运行应用 1. Debootstrap子系统安装可选
sudo apt-get install debootstrap
sudo debootstrap --arch arm64 bullseye ~/arch/debian https://mirrors.tuna.tsinghua.edu.cn/debian/
sudo debootstrap --variantbuildd --arch arm64 bullseye ~/arch/debian https://mirrors.tuna.tsinghua.edu.cn/debian/安装成功后进入目录切换环境
cd ~/arche/debian
sudo chroot .2. Debian/Ubuntu依赖包安装
按照官网要求安装全部依赖库
apt install git cmake ninja-build pkgconf ccache clang llvm lld binfmt-support libsdl2-dev libepoxy-dev libssl-dev python-setuptools g-x86-64-linux-gnu libgcc-10-dev-i386-cross g-x86-64-linux-gnu libgcc-10-dev-amd64-cross nasm python3-clang libstdc-10-dev-i386-cross libstdc-10-dev-amd64-cross libstdc-10-dev-arm64-cross squashfs-tools squashfuse libc-bin libc6-dev-i386-amd64-cross lib32stdc-10-dev-amd64-cross 如果提示找不到包可以配置一下源 /etc/apt/sources.list (安装成功请略过此步骤)
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://security.debian.org/debian-security bullseye-security main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian bullseye main更新源后再次安装(安装成功请略过此步骤)
apt update3. 获取FEX-Emu源码并编译
在子系统获取代码和子模块
git clone --recurse-submodules https://github.com/FEX-Emu/FEX.git编译源码
cd FEXmkdir Buildcd BuildCCclang CXXclang cmake -DCMAKE_INSTALL_PREFIX/usr -DCMAKE_BUILD_TYPERelease -DUSE_LINKERlld -DENABLE_LTOTrue -DBUILD_TESTSFalse -DENABLE_ASSERTIONSFalse -G Ninja ..configure完成后执行ninja
ninja我这里会报如下错可能我安装的libstdc的版本问题 没有出错可以略过
../Source/Tools/pidof/pidof.cpp:56:24: error: no matching constructor for initialization of std::istringstream (aka basic_istringstreamchar)暂时强制改一下代码
std::istringstream ss{static_caststd::string(Omit)};重新执行没有错了
CCclang CXXclang cmake -DCMAKE_INSTALL_PREFIX/usr -DCMAKE_BUILD_TYPERelease -DUSE_LINKERlld -DENABLE_LTOTrue -DBUILD_TESTSFalse -DENABLE_ASSERTIONSFalse -G Ninja ..执行安装命令:
rootnfs-PC:/FEX/Build# ninja install
[0/2] Re-checking globbed directories...
[0/1] Install the project...
-- Install configuration: RELEASE
-- Installing: /usr/share/man/man1/FEX.1.gz
-- Installing: /usr/lib/libFEXCore.a
..........................................
-- Installing: /usr/bin/FEXServer
-- Installing: /usr/bin/FEXBash
-- Installing: /usr/bin/FEXLoader
-- Installing: /usr/bin/FEXInterpreter
-- Installing: /usr/bin/FEXUpdateAOTIRCache
-- Installing: /usr/bin/FEXpidof
-- Installing: /usr/share/fex-emu/AppConfig/client.json
-- Installing: /usr/share/fex-emu/ThunksDB.json4. 根文件系统RootFS安装
当前的debian系统默认没有curlfex工具会用到因此需要先安装一下
上述编译并安装完成后可以执行FEXRootFSFetcher来安装RootFS终端会提示你rootfs没有找到是否下载, 输入y: 当前验证的机器用的是debian11版本没有对应的版本我们就用Ubuntu 20.04
下载完成后、解压配置为默认RootFS
5. 基于 FEX-Emu 运行应用
直接运行安装目录下的FEXBash命令来启动 接下来启动一下wine看一下效果这里我用的是自己编译的wine9.4, 关于如何编译wine可以参照 Wine编译环境搭建及使用完整流程详细笔记 会发现有如下错误 回到宿主机执行一下: xhost 让其允许子系统使用其显示窗口
xhost
access control disabled, clients can connect from any host回到FEXBash-root中再次启动
FEXBash-rootnfs-PC:/home ./install/opt/winux/wine9.4/usr/local/bin/winecfg 可以看到如下效果:
/home/install/opt/winux/wine9.4/usr/local/bin/wine notepad