jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Mon Nov 19, 2018 7:00 pm

Hey DarkPlatinum,

Although not 100% positive, I'm a bit skeptical that your problem is code_exec's build being out of sync. I replace my kernel with much more drastic changes and I don't think updates to the official Raspbian kernel could cause this to break so quickly.

When you say it does not work, are you getting the 3G/1G error, or another issue?

Is it possible that his kernel-replacing tool isn't actually updating kernel7.img after you run it? i.e., what does the timestamp say when you look at the files in /boot? Just checking that it's not a permissions issue or other problem writing the boot partition.

Pedantic, but did you remember to reboot after re-replacing the kernel?

Edit: Okay took a closer look. code_exec, your custom kernel doesn't include any /lib/modules. This means it might boot but lose peripheral support and other basic functionality! Perhaps that's what DarkPlatinum meant saying "it does not work". Not just qemu+Wine failing, but his whole system.

User avatar
DarkPlatinum
Posts: 793
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website

Re: Introducing Pi386

Mon Nov 19, 2018 7:56 pm

jdonald wrote:
Mon Nov 19, 2018 7:00 pm
Hey DarkPlatinum,

Although not 100% positive, I'm a bit skeptical that your problem is code_exec's build being out of sync. I replace my kernel with much more drastic changes and I don't think updates to the official Raspbian kernel could cause this to break so quickly.

When you say it does not work, are you getting the 3G/1G error, or another issue?

Is it possible that his kernel-replacing tool isn't actually updating kernel7.img after you run it? i.e., what does the timestamp say when you look at the files in /boot? Just checking that it's not a permissions issue or other problem writing the boot partition.

Pedantic, but did you remember to reboot after re-replacing the kernel?

Edit: Okay took a closer look. code_exec, your custom kernel doesn't include any /lib/modules. This means it might boot but lose peripheral support and other basic functionality! Perhaps that's what DarkPlatinum meant saying "it does not work". Not just qemu+Wine failing, but his whole system.
This is exactly what I mean, I should have explained myself better.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): Https://Html.dynu.net

jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Tue Nov 20, 2018 7:47 pm

All good, later I noticed the part where you said
downloaded your kernel, and when I boot it up I get cant load kernel module error.
I had missed that earlier in the long thread.

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Tue Nov 20, 2018 9:25 pm

Will try to get a new kernel out when I have time, but please be aware that I won't be able to provide a new kernel for EVERY single Raspbian kernel release.

Also, Pi386 2.0 will have an Ubuntu 16.04 environment (upgradeable to 18.04) as well as a Debian one, allowing you to use a newer version of WINE directly from Ubuntu repos (3.0.3).

You don't NEED the custom kernel files I provided to run Pi386, but if you want to use WINE, you'll need to compile the Eltechs version with 2G/2G support (when Pi386 with Ubuntu is released, you can just directly add the Eltechs WINE PPA and install from that).
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Tue Nov 20, 2018 11:23 pm

code_exec wrote:
Tue Nov 20, 2018 9:25 pm
please be aware that I won't be able to provide a new kernel for EVERY single Raspbian kernel release.
That's probably fine going forward. The real problem here appears to be that you distributed your custom kernel without its modules. Perhaps you could package those up before building a new one.
(when Pi386 with Ubuntu is released, you can just directly add the Eltechs WINE PPA and install from that).
Awesome, with your hint I found and configured the said PPA:

Code: Select all

    deb http://ppa.launchpad.net/eltechs/wine2g/ubuntu trusty main
(also requires sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F8DC2EE3DCC4D6E7).

And I can confirm it runs my hello.exe with the original Raspbian kernel. This is definitely superior to an installation requiring a modified kernel. Note I'm testing this with wine32:i386 installed directly on the Raspbian Stretch host via multiarch. That approach has its various tradeoffs vs using a chroot.

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Wed Nov 21, 2018 5:21 am

jdonald wrote:
Tue Nov 20, 2018 11:23 pm
code_exec wrote:
Tue Nov 20, 2018 9:25 pm
please be aware that I won't be able to provide a new kernel for EVERY single Raspbian kernel release.
That's probably fine going forward. The real problem here appears to be that you distributed your custom kernel without its modules. Perhaps you could package those up before building a new one.
(when Pi386 with Ubuntu is released, you can just directly add the Eltechs WINE PPA and install from that).
Awesome, with your hint I found and configured the said PPA:

Code: Select all

    deb http://ppa.launchpad.net/eltechs/wine2g/ubuntu trusty main
(also requires sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F8DC2EE3DCC4D6E7).

And I can confirm it runs my hello.exe with the original Raspbian kernel. This is definitely superior to an installation requiring a modified kernel. Note I'm testing this with wine32:i386 installed directly on the Raspbian Stretch host via multiarch. That approach has its various tradeoffs vs using a chroot.
Keep in mind that the Eltechs WINE PPA gives a very old version of WINE (1.8.1). Eltechs have a much newer version available (3.0), but it is found in a different PPA.

https://launchpad.net/~eltechs/+archive ... wine3.0-2g
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Wed Nov 21, 2018 8:47 pm

jdonald wrote:
Tue Nov 20, 2018 11:23 pm
Note I'm testing this with wine32:i386 installed directly on the Raspbian Stretch host via multiarch.
How'd you get an i386 build of WINE running on an ARM environment? You'd be able to add the repo and set a custom filter which forces apt to only check for armhf packages on the Raspbian repos and i386 packages on the Launchpad PPA, but how did you get WINE to run directly?

Also, you'd probably have to add an i386 Ubuntu repository too to satisfy all those dependencies of WINE.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Wed Nov 21, 2018 10:17 pm

code_exec wrote:
Wed Nov 21, 2018 5:21 am
Keep in mind that the Eltechs WINE PPA gives a very old version of WINE (1.8.1). Eltechs have a much newer version available (3.0), but it is found in a different PPA.

https://launchpad.net/~eltechs/+archive ... wine3.0-2g
Awesome. The default one on Stretch is 1.8.7 and I didn't realize it was that old. I'm playing with Wine 3.9 now.

Also, after poking around a bit more I see the relevant Wine patches on Eltech's GitHub repo:
https://github.com/Eltechs/wine/commit/ ... 3e36cd14ca
https://github.com/Eltechs/wine/commit/ ... d221944592
How'd you get an i386 build of WINE running on an ARM environment? You'd be able to add the repo and set a custom filter which forces apt to only check for armhf packages on the Raspbian repos and i386 packages on the Launchpad PPA, but how did you get WINE to run directly?

Also, you'd probably have to add an i386 Ubuntu repository too to satisfy all those dependencies of WINE.
Yeah, I've been working on a script to get Raspbian to play nice with multiarch (add the Debian stretch repo, filter [arch=armhf] on Raspbian-specific repos as you say). It's here: https://github.com/jdonald/raspbian-multiarch

Right now it's geared toward armhf + aarch64 multiarch but with some additional effort this helps install i386 packages too. Does not require an Ubuntu repository, only Debian for Wine 1.8.

User avatar
DarkPlatinum
Posts: 793
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website

Re: Introducing Pi386

Wed Nov 21, 2018 10:33 pm

Has an updated version been released yet? I'll try it out tommorow if it has.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): Https://Html.dynu.net

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Thu Nov 22, 2018 7:32 am

I mean, how did you get i386 WINE running on plain Raspbian? Raspbian does not include an emulation layer by default, so how did you get WINE to run without Pi386?

Also, there's no need for a new kernel considering that WINE 3.0 can be installed from the Eltechs WINE PPA.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Thu Nov 22, 2018 8:49 am

I did

Code: Select all

sudo apt install qemu-user
So yeah technically there's still an emulation layer, but no chroot. qemu-user-binfmt is designed to make it seamless.

User avatar
DarkPlatinum
Posts: 793
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website

Re: Introducing Pi386

Thu Nov 22, 2018 8:30 pm

code_exec wrote:
Thu Nov 22, 2018 7:32 am
Also, there's no need for a new kernel considering that WINE 3.0 can be installed from the Eltechs WINE PPA.
Could you provide instruction so that I can install Pi386 on Raspbian from scratch?
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): Https://Html.dynu.net

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Sat Nov 24, 2018 4:35 pm

DarkPlatinum wrote:
Thu Nov 22, 2018 8:30 pm
code_exec wrote:
Thu Nov 22, 2018 7:32 am
Also, there's no need for a new kernel considering that WINE 3.0 can be installed from the Eltechs WINE PPA.
Could you provide instruction so that I can install Pi386 on Raspbian from scratch?
Pi386 uses qemu-user-static for emulation and was built using debootstrap. I recently came across a couple of replies to my post about running LibreOffice 6.1 on the Pi, saying that you should be careful about downloading untrusted packages from the internet. While Pi386 is safe and not a virus, I still understand these users' thoughts. If you don't trust me, then you can build Pi386 yourself using qemu-debootstrap.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

User avatar
DarkPlatinum
Posts: 793
Joined: Thu Nov 02, 2017 2:30 pm
Location: Unknown
Contact: Website

Re: Introducing Pi386

Sat Nov 24, 2018 7:00 pm

code_exec wrote:
Sat Nov 24, 2018 4:35 pm
DarkPlatinum wrote:
Thu Nov 22, 2018 8:30 pm
code_exec wrote:
Thu Nov 22, 2018 7:32 am
Also, there's no need for a new kernel considering that WINE 3.0 can be installed from the Eltechs WINE PPA.
Could you provide instruction so that I can install Pi386 on Raspbian from scratch?
Pi386 uses qemu-user-static for emulation and was built using debootstrap. I recently came across a couple of replies to my post about running LibreOffice 6.1 on the Pi, saying that you should be careful about downloading untrusted packages from the internet. While Pi386 is safe and not a virus, I still understand these users' thoughts. If you don't trust me, then you can build Pi386 yourself using qemu-debootstrap.
Could I have the instructions please? I am not doubting the security of pi386, I just dont want to have seperate SD cards for each OS, I am using a HDD to store multiple Oses.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): Https://Html.dynu.net

Avukatum
Posts: 1
Joined: Wed Dec 05, 2018 4:17 pm

Re: Introducing Pi386

Wed Dec 05, 2018 4:50 pm

Hi!
I created a chroot directory (i386, bionic) with debootstrap and all is fine. But I would like to mount /home/user to the chroot directory (I can do this) and always use default user (not root) in chroot space. Then I will can install any pkgs in chroot system and they will be able (their icon) on the host system (in the menu and desktop) and they will can work if chroot directory will be premount.
I could do it, but I would like to see how other people could realize this.
Sorry for my english :)))

jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Sun Dec 09, 2018 4:51 pm

Avukatum wrote:
Wed Dec 05, 2018 4:50 pm
I created a chroot directory (i386, bionic) with debootstrap
Nice! Bionic should work best with Eltech's Wine builds or any of the recent stuff coming from WineHQ.
But I would like to mount /home/user to the chroot directory (I can do this) and always use default user (not root) in chroot space. Then I will can install any pkgs in chroot system and they will be able (their icon) on the host system (in the menu and desktop) and they will can work if chroot directory will be premount.
That sounds like the right way to do it. Could you post your exact sequence of mount commands? Seems like this would be handy for anyone using mikerr's prebuilt image too.

With the neverending quest to build a seamless experience I noticed there exists a wine-binfmts package. However, I recall it never worked as expected when I tried it (would just say ./wordpad.exe: Binary format not recognized)

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Mon Dec 10, 2018 7:13 am

Avukatum wrote:
Wed Dec 05, 2018 4:50 pm
Hi!
I created a chroot directory (i386, bionic) with debootstrap and all is fine. But I would like to mount /home/user to the chroot directory (I can do this) and always use default user (not root) in chroot space. Then I will can install any pkgs in chroot system and they will be able (their icon) on the host system (in the menu and desktop) and they will can work if chroot directory will be premount.
I could do it, but I would like to see how other people could realize this.
Sorry for my english :)))
In the chroot, run:

Code: Select all

adduser user
usermod -aG sudo user
visudo
Add the following line to the end of the sudoers file:

Code: Select all

$USER ALL=(ALL) NOPASSWD: ALL
Outside of chroot, run:

Code: Select all

sudo mount -o bind /home/user /path/to/chroot/home/user
sudo mount -o bind /proc /path/to/chroot/proc
sudo mount -o bind /dev /path/to/chroot/dev
sudo mount -o bind /dev/pts /path/to/chroot/dev/pts
sudo mount -o bind /sys /path/to/chroot/sys
sudo cp /etc/resolv.conf /path/to/chroot/etc/resolv.conf
xhost +
sudo chroot /path/to/chroot su - user 
You won't even notice you're in the chroot after typing the final command! But you can confirm you are by running:

Code: Select all

arch
It should return 'i686'.

For graphical applications such as WINE and LibreOffice 6.1, run the following command inside the chroot:

Code: Select all

export DISPLAY=:0.0
Get a segmentation fault when running an application? This means that the app requires SSE2 support on your CPU, which QEMU User Emulation does not emulate.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

User avatar
DavidS
Posts: 3800
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Introducing Pi386

Mon Dec 17, 2018 4:40 am

While this looks like an interesting project, and one that may be of use to Windows users:

What advantage does it have over running Windows 98SE or ReactOS in !FastDOSBox? While other emulators (qemu et al) are a bit slow on the RPi 3 series !FastDOSBox is more than fast enough to run ReactOS smoothly, and way more than needed for Windows 98SE. And once you add a few updates to Windows 98SE plus KernelEX it will run better than 97% of Windows XP or newer applications I have seen, and better than 80% of 32-bit Windows 7 or later only applications I have seen. Now ReactOS is obviously even better, as it is in the spirit of NT so more compatible. As either option would give the full Windows experience to those that want it, at a better speed than running an x86 chroot environment with Wine from Qemu, and either is more compatible with real windows software than Wine, what is the advantage?

As reference !FastDOSBox is at:
NO RISC - NO FUN
and requires RISC OS. Yes the site is archived, not sure what happened to the original maintainer.

The Raspbian version may be usable, though in my experience it does not keep up as well as the RISC OS version. Also note that !FastDOSBox does need to be patched to run on the ARMv8 (thanks to the depricated instructions), just go about the normal way of patching any ARMv7 stuff that fails on ARMv8 (eg look for SWP ops and a few more rare cases).

Or if you rather, you can just recompile with a newer gcc version to get aroun the issues.
RPi = Way for me to have fun and save power.
100% Off Grid.
Household TTL Electricity Usage = 1.4KW/h per day.
500W Solar System, produces 2.8KW/h per day average.

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Mon Dec 17, 2018 6:25 am

I've tried RiscOS in the past, it lacks wireless connectivity support. Definitely not an OS for me.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

neoaikon
Posts: 1
Joined: Thu Dec 20, 2018 2:55 pm

Re: Introducing Pi386

Thu Dec 20, 2018 2:59 pm

I was able to install pi386 onto my PI Zero W just fine, it already has a 3g/1g split so I didn't modify the kernel in any way. I was able to start up several test programs, however the one I want to use on the PI requires at least .NET 2.0; so I used winetricks to install it, which seemed like it was working; but it has been sitting at "Initializing Install..." for over 8 hours now. Has anybody been able to get dotnet20 installed?

jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Sun Dec 23, 2018 4:55 am

I haven't tried with Pi386 but I recall installing dotnet20 on a Linux box long ago.

The install could be painfully slow in qemu (on a Pi Zero!). I recommend you try running winetricks dotnet20 on a Mac or PC Linux machine (and be sure to set up with WINEARCH=win32), then copy the resulting .wine directory over to the Pi.

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Introducing Pi386

Sun Dec 23, 2018 8:18 am

I'm currently planning the successor to Pi386 and it will likely be prebundled with future ARM64 Debian releases. However, I'm not just planning for i386 support in the successor, after all, since my Debian images are 64-bit...
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

Caspina
Posts: 3
Joined: Tue Feb 19, 2019 1:31 pm

Re: Introducing Pi386

Tue Feb 19, 2019 2:04 pm

Hi @CodeExecution

So as far as I understand these are the steps:
1- Install qemu-user-static which can run i386 code
2- Build and install a 3G/1G Rraspbian Kernel following the steps they provide online - nothing specific other than the 3G/1G config
3- Make and run a Debian chroot using Debootstrap (any suggestions regarding the details and what to/not to do?)

So what about the Wine? Install the Wine:i386 package inside the Debian chroot or do you build it using a gcc:i386 compiler (cross compile on RPi or built on a x86 host)?

I like to try these, am I missing anything?

Caspina
Posts: 3
Joined: Tue Feb 19, 2019 1:31 pm

Re: Introducing Pi386

Thu Feb 21, 2019 5:42 pm

code_exec wrote:
Fri Nov 09, 2018 5:15 pm
Pi386 has been released. Download the .deb file http://www.mediafire.com/file/6j1m9ppcc ... _1.0.1.deb

Download the custom kernel files (which use a 3G/1G memory split rather than the default 2G/2G) http://www.mediafire.com/file/dyho3vj3j ... nel_3g.zip

Once the zip file containing the kernel files has been downloaded, apply the new kernel with the following:

Code: Select all

unzip custom_kernel_3g.zip
sudo cp -rT custom_kernel /boot
Reboot your Pi for the new kernel to take effect.

Install Pi386 with the following command:

Code: Select all

sudo dpkg -i pi386_1.0.1.deb
sudo apt install -f
You can then run Pi386 with the following command:

Code: Select all

pi386
Once you're inside the chroot environment, you can install WINE with the following command:

Code: Select all

apt install wine

I had a working Raspbian SDCARD which I got when I bought my R-Pi 3B+ and R-Pi 3 B.

$ uanme -a
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

I have copied the prebuilt kernel from this post above to test on both B and B+. They both boot, show the desktop and the cursor but the Mouse and Keyboard do not work at all. The keyboard seems to not even be powered up.

jdonald
Posts: 139
Joined: Fri Nov 03, 2017 4:36 pm

Re: Introducing Pi386

Thu Feb 21, 2019 5:55 pm

That's what I wrote above regarding /lib/modules. This package is not usable until that is addressed.

The only way neoaikon was able to get it to run was that his existing system had a 3G/1G split.

Return to “Other projects”