Installing Wine i386 on Pinebook Pro - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Pinebook Pro Tutorials (https://forum.pine64.org/forumdisplay.php?fid=117) +--- Thread: Installing Wine i386 on Pinebook Pro (/showthread.php?tid=8979) |
Installing Wine i386 on Pinebook Pro - wrzomar - 01-31-2020 I've mostly followed the Novaspirit's tutorial from: https://www.novaspirit.com/2019/04/15/run-x86-arm/ First, I've built and run vmsplit checking code from wine (from https://gist.github.com/liuqi/ccf638adc675a3b00c98): Code: #include <sys/mman.h> Then we need to install prerequisites: Quote:sudo apt update && sudo apt upgradeAfter successful install, run: Quote:sudo debootstrap --foreign --arch i386 stretch ./chroot-stretch-i386 http://ftp.us.debian.org/debianThen prepare system to run chroot: Quote:sudo mount -t sysfs sys ./chroot-stretch-i386/sys/ With system qemu-i386-static there may be 'illegal instruction' errors, so we'll build qemu from source. I've followed instructions from http://logan.tw/posts/2018/02/18/build-qemu-user-static-from-source-code/ Quote:sudo apt-get build-dep qemuWithout --disable-tools there were linker errors, --target-list=i386-linux-user will build only qemu-i386 binary. And start second stage: Quote:sudo chroot ./chroot-stretch-i386/ /debootstrap/debootstrap --second-stageOn my Pinebook Pro it took 28 minutes 30 seconds to finish second stage. Next, we'll chroot as root user: Quote:sudo chroot ~/chroot-stretch-i386/ /bin/su -l rootIf your DNS isn't working inside chroot check /etc/resolv.conf and fix your name server address! Quote:nano .bashrc Then we need to add this: Code: export LANGUAGE="C" Quote:source ~/.bashrcso change will to effect. Then run: Quote:apt updateAnd create user account: Quote:adduser -uid 1000 <username>where <username> is your chosen username. Then install leafpad or xterm to install all needed dependencies. Quote:apt install leafpadThen open second terminal window and enter: Quote:sudo chroot /home/marek/chroot-stretch-i386/ /bin/su -l <username>to chroot as your newly created user. Quote:nano .bashrcAdd at the end: Code: export LANGUAGE="C" Quote:source ~/.bashrcand then run leafpad (or xterm): Quote:leafpad Now we are ready to install Wine. Switch focus to your root terminal window or run: Quote:sudo chroot ~/chroot-stretch-i386/ /bin/su -l root To make things easier first install apt-transport-https package: Quote:apt install apt-transport-httpsIt will install all dependencies for SSL certificates to work (and we might need apt-transport-https it in the future). Download Wine from Playonlinux with: Quote:wget -c https://www.playonlinux.com/wine/binaries/linux-x86/PlayOnLinux-wine-3.20-linux-x86.polI've chosen version 3.20, but you can choose a different version (and maybe have better luck with running Windows programs). Then install bzip2: Quote:apt install bzip2and then unpack previously downloaded Wine and "install' it: Quote:tar -jxf PlayOnLinux-wine-3.20-linux-x86.pol --strip-components=1Symbolic link will help with switching wine versions in the future. Then open .bashrc: Quote:nano .bashrcand add this: Quote:export PATH=/opt/wine/bin:$PATHat the end and run: Quote:source ~/.bashrcto refresh session then do the same line to the .bashrc file of your new i386 user account. Run: Quote:sudo chroot ~/chroot-stretch-i386/ /bin/su -l <username>Then open .bashrc: Quote:nano .bashrcand add this: Quote:export PATH=/opt/wine/bin:$PATHat the end and run: Quote:source ~/.bashrcto refresh session. Now you need to check, if Wine is working, run: Quote:winecfgThe window should appear and it will download gecko and stuff, finally Wine config window should appear. Novaspirit has prepared winetricks but I haven't tried them, yet. https://github.com/novaspirit/winetricks Let's finish the installation. Outside of chroot we'll create script to mount /sys, /proc and the rest at start. Quote:sudo mkdir -p /opt/chrootscript/Paste this: Code: #!/bin/sh Next, make above script executable: Quote:sudo chmod a+x /opt/chrootscript/chrootmountThen create service file: Quote:sudo nano /etc/systemd/system/chrootmount.servicepaste this: Code: [Unit] Quote:sudo systemctl enable chrootmount.serviceThen we will make scripts to make chrooting easier: Quote:sudo nano /opt/chrootscript/start_x86_userAnd paste: Code: #!/bin/sh Quote:sudo chmod a+x /opt/chrootscript/start_x86_userRepeat this process for root: Quote:sudo nano /opt/chrootscript/start_x86_root Code: #!/bin/sh Quote:sudo chmod a+x /opt/chrootscript/start_x86_root At last create desktop shortcuts: Quote:nano ~/Desktop/chroot_user.desktop Code: [Desktop Entry] Quote:nano ~/Desktop/chroot_root.desktop Code: [Desktop Entry] Quote:chmod a+x ~/Desktop/chroot_user.desktopRestart Pinebook Pro. After restart check status of our mounting service: Quote:sudo systemctl status chrootmount.serviceIf there are no error, you can double click on one of Wine x86 shortcuts to open terminal. Unfortunately, I was only able to run installers but installed programs (like Notepad++ or Treesheets) crashed but I haven't used Wine for years, so maybe recent Notepad++ or Treesheets are not good starting points. Don't look at me, I didn't touch it, I swear Maybe different Wine version would do the trick. Good luck, and good night. EDIT: One of the problems was broken qemu-i386-static (there was qemu's 'illegal instruction' error at one of last lines of messages when putty crashed), so I've added instructions to build qemu. I've also changed icons of desktop shortcuts. Now putty works and I was able to install Notepad++ 6.7.4, but it crashed anyway with wine client bad descriptor error. |