notaz
Certified Guru
Intro
So in the early days when we started with pandora, Cortex-A8 was state-of-art CPU and ARM9 (with no FPU) was still common, so gcc did not have armhf support. It did support the VFP instructions already, but still used the old ABI, so called softfp. The situation was similar when the first units shipped (well Cortex-A8 has become common, but armhf was still not there), so we are stuck on softfp now to maintain compatibility. The same is even true for Android, it's still softfp to this day, but the whole ARM Linux world has moved to hardfp now.
There is a relatively recent thing on Linux called multiarch which allows multiple architectures coexist on a single machine. This was made primarily for x86/i386 to live along with x86_64/amd64, but curious thing is it allows softfp to coexist with hardfp too. What's even better, Debian's armhf doesn't seem to conflict on with Angstrom and they can happily live together. With these instructions you can try it out.
Installation
warning: if things fo wrong, you'll most likely have to reflash.
You need ~12MB of space on NAND for this, I'd recommend at least 10MB free at all times, so check if you have at least 20-30MB free before starting.
After this, if you have rebirth or 1GHz, install (or reinstall) 4.10.00.01 SGX driver (use the SGX installer PND). For the OMAP3 chip in CC TI does not provide the hardfp SGX driver, sorry.
There is hardfp SGX support installed with above commands, I've packaged the hardfp driver from TI. They only started packaging hardfp since 4.09.00.01, so I've used 4.10.00.01 (it's the more popular one). A matching driver from SGX PND has to be installed too. If you had 4.10.00.01 already installed, you'll need to reinstall it because OS upgrade may have reverted it to the older one.
A test case
You can try it on Minecraft Pi Edition. Get it from pi.minecraft.net and
libbcmhost-shim is a small shim I wrote for libbcm_host.so that r-pi software must link against. libGLES_CM.so preload is needed because minecraft-pi is GLES1 game, but linked against GLES2 library. The pi's driver doesn't care, but SGX gets upset if the wrong lib is linked.
Some thoughts
It should be possible now to make hardfp PNDs, and users who have armhf-support installed will be able to use them. However I recommend against it, because:
Anyway it would be great to get some testing, I wonder if it really doesn't break anything...
So in the early days when we started with pandora, Cortex-A8 was state-of-art CPU and ARM9 (with no FPU) was still common, so gcc did not have armhf support. It did support the VFP instructions already, but still used the old ABI, so called softfp. The situation was similar when the first units shipped (well Cortex-A8 has become common, but armhf was still not there), so we are stuck on softfp now to maintain compatibility. The same is even true for Android, it's still softfp to this day, but the whole ARM Linux world has moved to hardfp now.
There is a relatively recent thing on Linux called multiarch which allows multiple architectures coexist on a single machine. This was made primarily for x86/i386 to live along with x86_64/amd64, but curious thing is it allows softfp to coexist with hardfp too. What's even better, Debian's armhf doesn't seem to conflict on with Angstrom and they can happily live together. With these instructions you can try it out.
Installation
warning: if things fo wrong, you'll most likely have to reflash.
You need ~12MB of space on NAND for this, I'd recommend at least 10MB free at all times, so check if you have at least 20-30MB free before starting.
Code:
sudo opkg update
sudo opkg upgrade
sudo opkg install armhf-support
There is hardfp SGX support installed with above commands, I've packaged the hardfp driver from TI. They only started packaging hardfp since 4.09.00.01, so I've used 4.10.00.01 (it's the more popular one). A matching driver from SGX PND has to be installed too. If you had 4.10.00.01 already installed, you'll need to reinstall it because OS upgrade may have reverted it to the older one.
A test case
You can try it on Minecraft Pi Edition. Get it from pi.minecraft.net and
Code:
sudo opkg install libbcmhost-shim
tar xf minecraft-pi-0.1.1.tar.gz
cd mcpi
LD_PRELOAD=libbcm_host.so:libGLES_CM.so ./minecraft-pi
Some thoughts
It should be possible now to make hardfp PNDs, and users who have armhf-support installed will be able to use them. However I recommend against it, because:
- No 3D for CC users (TI does not provide hardfp driver for the old chip)
- In most cases there is no noticeable performance improvement from armhf (I tested PCSX, for example)
- More work for me to maintain PND compatibility on new SuperZaxxon releases
- Only a few hardfp libraries are available in firmware (but I might add more if it turns out to be really useful)
Anyway it would be great to get some testing, I wonder if it really doesn't break anything...
Last edited: