User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Debian 'armhf' (hard-float ABI) for Raspberry Pi?

Sun Mar 11, 2012 4:43 am

OK, I've got a Freescale i.MX53 Quick Start board on order from Digikey along with a handful of spare SD cards from Amazon.  I'll also order a SATA drive for the quickstart board, but I won't need it right away.

To make progress creating a hard float optimized port of Debian for RPi, right now my basic plans are as follows:

1. Get the i.MX53 Quick Start board running under the vanilla Debian armhf port.  I'll be following the Debian Squeeze armel information at the following link, but adapt the instructions to bring it up under Debian Wheezy armhf.

http://eewiki.net/display/linu.....uick+Start

2. Using the armhf Wheeze source repository create a version of the armhf build-essential packages (or as much as I can) that spit out RPi friendly ARMv6 instructions & VPFv2 by default rather than ARMv7-A/Thumb-2 & VFPv3-D16.  I'm not sure of the exact procedure to do this yet, but it can't be too hard to figure out. Correct?

3. Using the tools created in step 2, rebuild all the Debian packages that are required for a minimal root file system image.  There are only so many of these packages and they shouldn't be too hard to recompile.

4. Create a new root file system for the i.MX53 Quick Start board created from all the packages created in step 3.

5. Boot the i.MX53 Quick Start under the new RPi friendly armhf.  If things work correctly, I believe the system should still be 100% compatible with packages created for the standard flavor of armhf.  This would essentially be the "proof of concept" for the next step.

6. Follow basically the same steps outlined above to recreate the reference Debian filesystem available from the RPi foundation for Debian Squeeze, but this new one should be a hart float version of Debian Wheezy. This will of course be made available to anyone who would like to test it out.

Hopefully by the time I get to step six many of us will have RPi hardware in our hands.  Also, I realize that other than the packages I create in step 2 and 3, there will be no repository available that supports this new flavor of Debian so it's not like it will be terrifically useful.  However, if the build-essential tools are available, it should be enough to compile some interesting benchmarks to determine if a full effort to create an RPi friendly armhf port is worthwhile.

It is my sincere hope that if I am able to get steps 1 through 6 accomplished, that this will provide enough impetus for a broader community effort to create a real hardfloat version of Debian for the RPi.  If I can succeed in creating a hardfloat Debuild build for RPi, I'm just going on faith a group of people can come together and create a real repository for all the Debian packages.  If that fails, at the very worst, I learned a whole lot of things in the process.

Some potential issues that I'm already anticipating I may run into are:

Up to now it's been generally assumed that the ARM i.MX53 is backwards compatible with the required compiler options I'll need to create the RPi friendly version of the build tools.  If not, I'll be dead in the water pretty quickly.

The compiler tools will no doubt include assembler stub files that are linked into all executables (the crt files).  It's possible these will include ARMv7/Thumb-2 assembly instructions and these files will be a PIA to convert to ARMv6.  Right now, I'm just crossing my fingers this will not be the case.  The various standard libraries may also run into the same issue.

I'm sure I'm missing a compilation of the kernel somewhere in the steps outlined above.  I'll cross that bridge when I get to it.  The reason I didn't fit it in yet, the existing kernels may be perfectly happy to work with the new armhf packages that will be created.

Comments?  Just go easy on me and don't be too discouraging as this already looks like a pretty daunting task.  However, pointing out incorrect assumptions on my part would be terrific as it will surely save me a great deal of time.

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Debian 'armhf' (hard-float ABI) for Raspberry Pi?

Tue Mar 13, 2012 8:16 am

If I were to recompile the gcc related packages for Debian Wheezy armhf to emit RPi optimized ARMv6 & VPFv2 instructions by default rather than ARMv7-A/Thumb-2 & VFPv3-D16, can someone point me to the specific options that have to be set in the configuration flags for the package?

Gcc is a bear of a package and it's not immediately clear where one configures the compiler that is built as to what specific instructions and ABI it should conform to.  I'll figure it out eventually, but if someone knows this already it would be a big help.

Also, it's been speculated that Arm code using hard floats optimized for the RPi should still be able to link against code compiled for Debian armhf.  Does someone know if this is true (or at least likely to be true)?

Return to “General discussion”