User avatar
sakaki
Posts: 57
Joined: Sun Jul 16, 2017 1:11 pm

How to install and run 32-bit Raspbian apps on 64-bit Gentoo (RPi3 B/B+)

Tue Apr 17, 2018 7:00 pm

Hello,

if you are running a 'pure' 64-bit Gentoo system on your RPi3 B / B+ (such as my gentoo-on-rpi3-64bit image), you may sometimes find yourself wishing you could just install and run a particular 32-bit package from Raspbian, if it has not yet been added to the Gentoo arm64 tree.

Well, the good news is you can, while still running your 64-bit Gentoo, since mixed-mode userland is permitted on ARMv8! I've just posted a new wiki tutorial, showing how to install a 32-bit Raspbian chroot on your gentoo-on-rpi3-64bit system, then, using this, install 32-bit apps (using apt-get) from Raspbian, and run them alongside 64-bit Gentoo apps on your (64-bit) desktop. The example app I use in the tutorial is Lazarus (but you can obviously install anything you like). Here's a screenshot of 32-bit Raspbian Lazarus running on an 64-bit Gentoo RPi3 B+:

Image

Have fun, sakaki ^-^

ejolson
Posts: 1567
Joined: Tue Mar 18, 2014 11:47 am

Re: How to install and run 32-bit Raspbian apps on 64-bit Gentoo (RPi3 B/B+)

Fri May 25, 2018 4:39 am

sakaki wrote:
Tue Apr 17, 2018 7:00 pm
you may sometimes find yourself wishing you could just install and run a particular 32-bit package from Raspbian, if it has not yet been added to the Gentoo arm64 tree.
Does the 32-bit version of Mathematica included free with Raspbian work?

User avatar
sakaki
Posts: 57
Joined: Sun Jul 16, 2017 1:11 pm

Re: How to install and run 32-bit Raspbian apps on 64-bit Gentoo (RPi3 B/B+)

Sat May 26, 2018 3:01 pm

Yes, it works:
Image

To get this to run, I followed the instructions cited above, but used the full Raspbian as a "donor" image (and made sure to start Mathematica once within that image booted natively first, to ensure all setup had been completed), and also placed the following (executable) script in /usr/local/bin/uname (inside the chroot filesystem, to allow Mathematica's startup system ID to pass):

Code: Select all

#!/bin/bash
# Override reported uname --machine type in chroot, to armv7l
# as some programs like mathematica check this
#
# Copyright (c) 2018 sakaki <sakaki@deciban.com>
# License: GPL v3+
# NO WARRANTY

if ((1==${#})) && [[ "-m" == "${1}" || "--machine" == "${1}" ]]; then
	echo "armv7l"
else
	# pass to default handler
	/bin/uname ${@}
fi
hth, sakaki

User avatar
Gavinmc42
Posts: 1951
Joined: Wed Aug 28, 2013 3:31 am

Re: How to install and run 32-bit Raspbian apps on 64-bit Gentoo (RPi3 B/B+)

Sun May 27, 2018 2:32 am

Mathematica :o
Wow, pick something small, not :D

Wonder if the command line Wolfram will compile in Aarch64?
Never checked to see if there was source code :oops:

Sakaki, you want to try the camera next?
viewtopic.php?f=29&t=213435&p=1320360#p1320360
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ejolson
Posts: 1567
Joined: Tue Mar 18, 2014 11:47 am

Re: How to install and run 32-bit Raspbian apps on 64-bit Gentoo (RPi3 B/B+)

Mon Jun 18, 2018 9:33 pm

sakaki wrote:
Sat May 26, 2018 3:01 pm
Yes, it works:
Image

To get this to run, I followed the instructions cited above, but used the full Raspbian as a "donor" image (and made sure to start Mathematica once within that image booted natively first, to ensure all setup had been completed), and also placed the following (executable) script in /usr/local/bin/uname (inside the chroot filesystem, to allow Mathematica's startup system ID to pass):

Code: Select all

#!/bin/bash
# Override reported uname --machine type in chroot, to armv7l
# as some programs like mathematica check this
#
# Copyright (c) 2018 sakaki <sakaki@deciban.com>
# License: GPL v3+
# NO WARRANTY

if ((1==${#})) && [[ "-m" == "${1}" || "--machine" == "${1}" ]]; then
	echo "armv7l"
else
	# pass to default handler
	/bin/uname ${@}
fi
hth, sakaki
Great news! Thank you for testing this and figuring out how to make it work.

Return to “Gentoo”

Who is online

Users browsing this forum: No registered users and 2 guests