digital garden of reflections, hopes and fears

home

raspberry pi and windows

There are a few methods to run older windows software and some steam games on a raspberry pi, 1) use box86 or 2) dosbox ECE with windows 98 SE or 3) use hangover

box86

taking instructions from the repository notes and this one and this armbian distro forum thread.

""Change -DRPI4=1 to -DRPI4ARM64=1 for compiling on arm64. (armhf multiarch or chroot required alongside armhf gcc. Install it with 'sudo apt install gcc-arm-linux-gnueabihf'.)

git clone https://github.com/ptitSeb/box86
cd box86
mkdir build; cd build; cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j2
sudo make install
sudo systemctl restart systemd-binfmt

compatibility list

instructions for debian/ubuntu arm64

. 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](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/](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

. 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

  1. Then add a config file for debian-armhf:

sudo nano /etc/schroot/chroot.d/debian-armhf.conf Copy paste this code, and change 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= users=

  1. 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.

#

#passwd shadow #group gshadow services protocols #networks #hosts #user

  1. 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

  1. Now you should be able to schroot by typing

sudo schroot -c debian-armhf

  1. edit the bashrc

nano ~/.bashrc add this code to the bottom of the line

export LANGUAGE="C" export LC_ALL="C" export DISPLAY=:0

  1. 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

su - 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

  1. 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

  1. 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

  1. 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

  1. Install Zenity in chroot environment, as wine will not have window without it:

apt install zenity

  1. Exit from chroot environment by typing

exit

  1. 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'

  1. 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