Dear All,
I just want to make a Tutorial on my successful attempt in Installing Box86 on Arm64 and Install Wine X86 apps. In this example it is Sketchup 7.1 and Sketchup 8
But before starting I want to thanks to PtitSeb for his hard work to bring this dream into reality (running x86 apps on arm64 box).
My system is X96 Max+ S905x3. I used @balbes150 older image to boot to Armbian, many thanks for him. So In general every box running Armbian 64bit should work.
This tutorial will use debootstrap Debian Buster Armhf as base for chroot. The keyword is "Arm64" support "Armhf", therefore you do not need to use Qemu or Binfmt_misc as it is very slow. Here's my report on Manjaro Arm Forum: https://archived.forum.manjaro.org/t/x86-64-chroot-on-manjaro-arm-install-x86-64-deb-install-wine-windows-apps/150420/103
Here's what you need:
1. Open terminal, then type:
sudo apt install schroot debootstrap
sudo mkdir /srv/chroot
sudo mkdir /srv/chroot/debian-armhf
sudo debootstrap --arch armhf --foreign buster /srv/chroot/debian-armhf http://debian.xtdv.net/debian
sudo chroot "/srv/chroot/debian-armhf" /debootstrap/debootstrap --second-stage
2. Then add a config file for debian-armhf:
sudo nano /etc/schroot/chroot.d/debian-armhf.conf
Copy paste this code, and change <username> into your computer username
[debian-armhf]
description=Debian Armhf chroot
aliases=debian-armhf
type=directory
directory=/srv/chroot/debian-armhf
profile=desktop
personality=linux
preserve-environment=true
root-users=<username>
users=<username>
3. Then edit the nssdatabases
sudo nano /etc/schroot/desktop/nssdatabases
copy paste this code
# System databases to copy into the chroot from the host system.
#
# <database name>
#passwd
shadow
#group
gshadow
services
protocols
#networks
#hosts
#user
4. Edit the stateoverride, and change the first contrab to root
sudo nano /srv/chroot/debian-armhf/var/lib/dpkg/statoverride
copy paste this code
root root 2755 /usr/bin/crontab
5. Now you should be able to schroot by typing
sudo schroot -c debian-armhf
6. edit the bashrc
nano ~/.bashrc
add this code to the bottom of the line
export LANGUAGE="C"
export LC_ALL="C"
export DISPLAY=:0
7. let's restart chroot environment by exit and login again, then add a username that is similar to your main system username
exit
id
sudo schroot -c debian-armhf
adduser <username>
su - <username>
then again add bashrc
nano ~/.bashrc
again add this code to the bottom of the line
export LANGUAGE="C"
export LC_ALL="C"
export DISPLAY=:0
8. Then restart chroot by double exit and login again, then install the following package
exit
exit
sudo schroot -c debian-armhf
apt update && apt upgrade
apt install git wget cmake build-essential python3
apt install gcc-arm-linux-gnueabihf
9. Now let's compile the Box86 within Chroot environment
git clone https://github.com/ptitSeb/box86
cd box86
mkdir build; cd build; cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo; make
exit
10. Now login to chroot again then download wine from twisteros: https://twisteros.com/wine.tgz then extract it to your home folder. Your extracted wine location should be in: ~/wine/bin/wine
sudo schroot -c debian-armhf
wget https://twisteros.com/wine.tgz
tar zxvf wine.tgz
11. Install Zenity in chroot environment, as wine will not have window without it:
apt install zenity
12. Exit from chroot environment by typing
exit
13. To install a windows app, in this case sketchup 7.1 and 8 you can download it from: http://www.oldversion.com/windows/google-sketchup/ then type:
schroot -c debian-armhf ~/box86/build/box86 ~/wine/bin/wine 'your/installation/folder/It/is/better/to/drag/and/drop/the/installer'
14. To run the installed program you can type this or make it as a shortcut from desktop launcher:
schroot -c debian-armhf ~/box86/build/box86 ~/wine/bin/wine your/installed/program/location
and here's my final sketchup running smoothly on LLVM Pipe Graphics. I also attached the Box86 running on Manjaro Arm with the good performance as well for addition.
To be honest, I didn't expect the performance to be this good. It almost remind me of "Rosetta 2" of Apple Silicon, but it is open source.
Big respect for PtitSeb for bringing this magic to the Arm64 World. I also want to thanks to Xabbu and Lolix from Manjaro Forum to help me figuring out the chroot environment in my older Manjaro Forum Post.
Hope that helps,
Many Thanks,
rna
UPDATE 1
*IMPORTANT NOTE:
To fix Sketchup 7/8 OpenGL Display Error:
You have to edit the wine regedit and change the sketchup display setting from "0" to "1"
- Open Sketchup then close
- Open terminal then run regedit by typing:
schroot -c debian-armhf ~/box86/build/box86 ~/wine/bin/wine regedit
- Then find:
HKEY_CURRENT_USER\Software\Google\SketchUp7\GLConfig\Display
- Then change the “HW_OK” from “0” to “1”
- Then close your regedit
- Then open Sketchup 7/8. Now you should be ok.
UPDATE 2
you can also follow the Box86 compatibility list here:
https://github.com/ptitSeb/box86-compatibility-list/issues
You can also use winetricks to install some dependency, like .NET 4.0 as detailed by WheezyE here:
https://github.com/ptitSeb/box86-compatibility-list/issues/46
In fact, by using WheezyE method I was able to install all depencencies to install sketchup 2014 successfully from winetricks in Armbian Reforge (Just to let you know that Armbian Reforge is embedded with Box86 by default).
However, at the moment winetricks does not works in our chroot method. Therefore, Help would be appreciated.
BONUS:
For those of you that desperately want to install blender 2.79 on Armbian Focal / Manjaro, you can use this method.
Open terminal, then type:
sudo schroot -c debian-armhf
apt install blender
exit
Now to open blender, you can use this command (you can also make launcher):
schroot -c debian-armhf blender
Now Blender 2.79b should run perfectly on you system
I also tried to go with mainline earlier this year but as you both mentioned stability issues get me back to legacy ;P i didn't have time to investigate that further, temporary fix is "do not reboot", in case of mainline kernel there is probably still an issue with it because there is still some reports here and there that are no older than 1-2months, and there is hardly any evidence of it resolved, except of various fix by locking clock speeds and changing governor's which in the and usually still ends with instabilities
v1 is more stable, so it even can be hardware level bug in case of v2... the issue persist from early days and there is still no clear resolution for this (i have v2 almost from first days of its availability) especially that rockpi with also ddr4 works without a hitch.