I was able to run x86 programs on my RPi3 with a x86 Debian Jessie chroot. What a chroot does is it basically takes you into another file system. Thanks to qemu-user-static (which allows you to chroot into Linux environments compiled for different architectures), I was able to chroot into an i386 Debian Jessie environment (amd64 doesn't work at the moment). I was able to run the i386 version of Pluma successfully. The problem is, when I attempted to save my file, Pluma crashed with a Segmentation fault (I'm not entirely sure, but I believe it is related to the fact that the Pi uses a 2g/2g memory split rather than a 3g/1g memory split).
If someone could give me advice on how to enable 3g/1g memory split, I'd appreciate it. Thanks.
x86 on the Raspberry Pi with jessie chroot
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
- DougieLawson
- Posts: 42144
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: x86 on the Raspberry Pi with jessie chroot
Forget it. It won't work.
If you insist on running code from an alien architecture you're going to have to bite the bullet and pay the Eltechs folks for their optimised X86 emulator.
https://eltechs.com/product/exagear-desktop/
A better prospect is to buy a cheap secondhand laptop (from eBay), reformat the hard disk, load up Ubuntu on it and run your X86 programs on an X86 machine not on a Raspberry
If you insist on running code from an alien architecture you're going to have to bite the bullet and pay the Eltechs folks for their optimised X86 emulator.
https://eltechs.com/product/exagear-desktop/
A better prospect is to buy a cheap secondhand laptop (from eBay), reformat the hard disk, load up Ubuntu on it and run your X86 programs on an X86 machine not on a Raspberry
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: x86 on the Raspberry Pi with jessie chroot
Eltechs' ExaGear is essentially chroot but with a few tweaks made. If I was able to start up Pluma for x86 in a chroot environment, then running x86 on the Pi is possible, but not very stable.DougieLawson wrote: ↑Sat Nov 03, 2018 11:03 amForget it. It won't work.
If you insist on running code from an alien architecture you're going to have to bite the bullet and pay the Eltechs folks for their optimised X86 emulator.
https://eltechs.com/product/exagear-desktop/
A better prospect is to buy a cheap secondhand laptop (from eBay), reformat the hard disk, load up Ubuntu on it and run your X86 programs on an X86 machine not on a Raspberry
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
- davidcoton
- Posts: 6747
- Joined: Mon Sep 01, 2014 2:37 pm
- Location: Cambridge, UK
Re: x86 on the Raspberry Pi with jessie chroot
You cannot run x86 code on a Pi without an emulator, which is what Exagear is.
If your "Pluma" is this MATE editor, then it is a Python program, not x86 code. Your "chroot" might provide an environment in which Python code written on on x86 Ubuntu Mate will run, but it is not enabling x86 code.
If your "Pluma" is this MATE editor, then it is a Python program, not x86 code. Your "chroot" might provide an environment in which Python code written on on x86 Ubuntu Mate will run, but it is not enabling x86 code.
Location: 345th cell on the right of the 210th row of L2 cache
Re: x86 on the Raspberry Pi with jessie chroot
Hmmm, I see. However, with qemu-user-static, it is possible to chroot into filesystems for different architectures. Whether or not that enables running code for different architectures I do not know.davidcoton wrote: ↑Sat Nov 03, 2018 11:38 amYou cannot run x86 code on a Pi without an emulator, which is what Exagear is.
If your "Pluma" is this MATE editor, then it is a Python program, not x86 code. Your "chroot" might provide an environment in which Python code written on on x86 Ubuntu Mate will run, but it is not enabling x86 code.
https://wiki.debian.org/QemuUserEmulation
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
Re: x86 on the Raspberry Pi with jessie chroot
I am not sure it is Python code but if it is the MATE Editor then it can be installed on a Raspbian Stretch Pi with -davidcoton wrote: ↑Sat Nov 03, 2018 11:38 amIf your "Pluma" is this MATE editor, then it is a Python program, not x86 code.
sudo apt-get install pluma
It even automatically appears as an option on the desktop start menu under accessories.
Re: x86 on the Raspberry Pi with jessie chroot
I'm aware, I was just using it as a testing program.hippy wrote: ↑Sat Nov 03, 2018 12:23 pmI am not sure it is Python code but if it is the MATE Editor then it can be installed on a Raspbian Stretch Pi with -davidcoton wrote: ↑Sat Nov 03, 2018 11:38 amIf your "Pluma" is this MATE editor, then it is a Python program, not x86 code.
sudo apt-get install pluma
It even automatically appears as an option on the desktop start menu under accessories.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
- davidcoton
- Posts: 6747
- Joined: Mon Sep 01, 2014 2:37 pm
- Location: Cambridge, UK
Re: x86 on the Raspberry Pi with jessie chroot
On looking again, you are right. I read the github page too quickly. I think it is C/C++, but it is compiled on the target when installed.
In any case you are NOT executing x86 code on a Pi.
Correct.code_exec wrote: However, with qemu-user-static, it is possible to chroot into filesystems for different architectures.
It provides the environment for code from a diiferent OS -- so a Windows program can run on Linux, for example.code_exec wrote: Whether or not that enables running code for different architectures I do not know.
It does not provide emulation for code from a different architecture. You cannot run x86 code directly on a Pi, which has an Arm processor.
Location: 345th cell on the right of the 210th row of L2 cache
Re: x86 on the Raspberry Pi with jessie chroot
You can only chroot into other Linux distros, not into Windows.davidcoton wrote: ↑Sat Nov 03, 2018 2:33 pmIt provides the environment for code from a diiferent OS -- so a Windows program can run on Linux, for example.
It does not provide emulation for code from a different architecture. You cannot run x86 code directly on a Pi, which has an Arm processor.
If x86 programs can't run on ARM through Chroot because of architecture issues, then what causes programs to give a "segmentation fault" rather than an error about architecture.
According to Wikipedia:
In computing, a segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operating system (OS) the software has attempted to access a restricted area of memory (a memory access violation).
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
Re: x86 on the Raspberry Pi with jessie chroot
Also, on my x64 laptop, I was able to run ARM64 Chromium under a chroot and it launched. However, it was slow, and couldn't load any webpages.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
Re: x86 on the Raspberry Pi with jessie chroot
The main thing is qemu which is used to emulate x86 on the pi.
Exagear is essentially an x86 chroot install with a modified/optimized qemu and wine(if using Windows apps)
You need to compile your own kernel for 3/1 memory split.
Also have a prebuilt image here:
https://github.com/mikerr/RPi-QEMU-x86- ... /README.md
https://sourceforge.net/projects/pi-qemu-wine/
Exagear is essentially an x86 chroot install with a modified/optimized qemu and wine(if using Windows apps)
You need to compile your own kernel for 3/1 memory split.
Also have a prebuilt image here:
https://github.com/mikerr/RPi-QEMU-x86- ... /README.md
https://sourceforge.net/projects/pi-qemu-wine/
Android app - Raspi Card Imager - download and image SD cards - No PC required !
Re: x86 on the Raspberry Pi with jessie chroot
I recompiled the kernel for 3G/1G memory split.mikerr wrote: ↑Sat Nov 03, 2018 5:44 pmThe main thing is qemu which is used to emulate x86 on the pi.
Exagear is essentially an x86 chroot install with a modified/optimized qemu and wine(if using Windows apps)
You need to compile your own kernel for 3/1 memory split.
Also have a prebuilt image here:
https://github.com/mikerr/RPi-QEMU-x86- ... /README.md
https://sourceforge.net/projects/pi-qemu-wine/
I'm trying to run WINE under a Debian Jessie chroot. However, when I try to setup WINE through wineboot, I get the following error:
Code: Select all
/bin/cat: /root/.wine/system.reg: No such file or directory
/usr/bin/wineboot: 32: exec: wineboot.exe: not found
Code: Select all
/usr/lib/i386-linux-gnu/wine/bin/wine-preloader: Unable to find space for application
Any ideas on how to fix this?
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
Re: x86 on the Raspberry Pi with jessie chroot
I find this thread interesting because of the posts which confidently say something can't be done along with a near equal number of posts explaining how to do it. Running x86 code on ARM is also what Microsoft has said will be possible with their new ARM based version of Windows. It's interesting to see how well x86 emulation currently performs using open source tools.
While I don't have anything other than enthusiasm to contribute, I was wondering whether current versions of QEMU support emulation of multiprocessor x86 systems?
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: x86 on the Raspberry Pi with jessie chroot
ejolson wrote: ↑Wed Nov 07, 2018 8:10 pmI find this thread interesting because of the posts which confidently say something can't be done along with a near equal number of posts explaining how to do it. Running x86 code on ARM is also what Microsoft has said will be possible with their new ARM based version of Windows. It's interesting to see how well x86 emulation currently performs using open source tools.
While I don't have anything other than enthusiasm to contribute, I was wondering whether current versions of QEMU support emulation of multiprocessor x86 systems?
The OP has a NEW post:
viewtopic.php?f=41&t=226376
Take what I advise as advice not the utopian holy grail, and it is gratis !!
Re: x86 on the Raspberry Pi with jessie chroot
x86 on ARM is possible thanks to qemu-user-static.ejolson wrote: ↑Wed Nov 07, 2018 8:10 pmI find this thread interesting because of the posts which confidently say something can't be done along with a near equal number of posts explaining how to do it. Running x86 code on ARM is also what Microsoft has said will be possible with their new ARM based version of Windows. It's interesting to see how well x86 emulation currently performs using open source tools.
While I don't have anything other than enthusiasm to contribute, I was wondering whether current versions of QEMU support emulation of multiprocessor x86 systems?
Don't believe me?

Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
Re: x86 on the Raspberry Pi with jessie chroot
Nothing new, you're treading the same steps we did in 2012ish...
viewtopic.php?f=41&t=12727
Follow that thread to see how it's done, but some patches will have been integrated into qemu by now.
(And lots of posters moaned it wasn't possible or would be too slow then, too)
It's better with pi3 but still slow.
viewtopic.php?f=41&t=12727
Follow that thread to see how it's done, but some patches will have been integrated into qemu by now.
(And lots of posters moaned it wasn't possible or would be too slow then, too)
It's better with pi3 but still slow.
Android app - Raspi Card Imager - download and image SD cards - No PC required !
Re: x86 on the Raspberry Pi with jessie chroot
Sorry for late reply, I only just noticed this.mikerr wrote: ↑Wed Nov 07, 2018 9:11 pmNothing new, you're treading the same steps we did in 2012ish...
viewtopic.php?f=41&t=12727
Follow that thread to see how it's done, but some patches will have been integrated into qemu by now.
(And lots of posters moaned it wasn't possible or would be too slow then, too)
It's better with pi3 but still slow.
It appears that WINE on the Pi in 2012 could run apps that could run on Windows RT and Windows CE (both versions of Windows made for ARM processors), and there aren't many of those. Pi386, however, lets you run 32-bit x86 software on your Pi, including WINE. Since Pi386 is an emulation layer, the version of WINE you use on it is compiled for the i386 architecture and therefore allows execution of 32-bit x86 Windows software on the Pi.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
Re: x86 on the Raspberry Pi with jessie chroot
Hey code_exec, just wanted to lend my support to cheer you on. It's great that you're doing this.
Of course, even if the fundamental mechanisms haven't changed much as mikerr points out, over time it can be a huge difference making things more convenient and accessible to the everyday user. I see aspects such as having much faster hardware than 2012, mikerr's img file, and your tool as all part of this.
Now for some suggestions:
* We haven't escaped requiring a modified kernel. Even if your distribution makes it easier to update this, it's a hassle to maintain alongside official kernel updates and at the very least a reboot is required to install. This has probably been suggested in the past, but what are the downsides if the Raspbian maintainers were to make 3G/1G the official default?
* If the above is a no-go, I think Eltech modified wine:i386 such that the 3G/1G split isn't required. Could we standardize a build of that branch of wine:i386 or maybe even get the changes pushed upstream?
* Any speedups or at least compatibility improvements if we use the latest wine from winehq-staging?
* In notaz's Diablo II build I see all these flags like WINE_SND_FORCE_RATE, WINE_FBDEV_VSYNC, WINE_FBDEV_DOUBLEBUF, WINE_FBDEV_USE_SCALER, WINE_DDRAW_NO_FLIP_CAP, WINE_DDRAW_NO_FRONT_BLIT. Has anyone found these to improve performance outside of Diablo II?
I'm catching up on the old threads too. Although the first page you cite is largely about Wine+ARM, page 2 and beyond are discussing and building wine:i386.
Of course, even if the fundamental mechanisms haven't changed much as mikerr points out, over time it can be a huge difference making things more convenient and accessible to the everyday user. I see aspects such as having much faster hardware than 2012, mikerr's img file, and your tool as all part of this.
Now for some suggestions:
* We haven't escaped requiring a modified kernel. Even if your distribution makes it easier to update this, it's a hassle to maintain alongside official kernel updates and at the very least a reboot is required to install. This has probably been suggested in the past, but what are the downsides if the Raspbian maintainers were to make 3G/1G the official default?
* If the above is a no-go, I think Eltech modified wine:i386 such that the 3G/1G split isn't required. Could we standardize a build of that branch of wine:i386 or maybe even get the changes pushed upstream?
* I think he's asking you about trying qemu with the -smp arg. Given much of the pre-2000 software that we're running here is single-threaded it's debatable how much we'd get out of this, but would be good to answer.
* Any speedups or at least compatibility improvements if we use the latest wine from winehq-staging?
* In notaz's Diablo II build I see all these flags like WINE_SND_FORCE_RATE, WINE_FBDEV_VSYNC, WINE_FBDEV_DOUBLEBUF, WINE_FBDEV_USE_SCALER, WINE_DDRAW_NO_FLIP_CAP, WINE_DDRAW_NO_FRONT_BLIT. Has anyone found these to improve performance outside of Diablo II?
Last edited by jdonald on Tue Nov 20, 2018 2:58 pm, edited 1 time in total.
Re: x86 on the Raspberry Pi with jessie chroot
You should really mention it's QEMU that is actually providing x86 emulation, not "pi386" as opposed to bochs, dosbox etc
Android app - Raspi Card Imager - download and image SD cards - No PC required !