[Buildroot] porting libffi to microblaze architecture

Will Newton will.newton at gmail.com
Thu Jan 26 19:15:00 UTC 2012


On Thu, Jan 26, 2012 at 6:19 PM, Johannes Teiwes
<jteiwes at informatik.uni-bremen.de> wrote:
> Hey fellow buildroot contributors,
>
> (Sorry for posting a similar request again - i could not find the original
> thread)
>
> I am trying to run python on a microblaze-based SoC. The Systems
> configuration and creation is currently done using buildroot for
> cross-compiling and package selection (which works like a charm).
> The problem still remains that libffi (one of pythons dependencies) has not
> been ported to the Microblaze architecture. We have an existing software
> framework written in python, which should run on that processor - so python
> is mandatory for me.
>
> Can anybody point me to the right spots inside the libffi configuration or
> code to adjust some parameters in order to compile that library for the
> microblaze processor? What is the exact difficulty when porting this library
> to a different machine?
>
> One possible problem i would see is that the Microblaze CPU is some kind of
> a moving target, since it can be configured in many ways (MMU/NOMMU,
> HARDFPU/SOFTFPU/NOFPU etc.) so one could then only target one specific
> configuration.
>
> So i am thankful for any help, recipes for porting software or any advice,
> you can give me.

libffi is an implementation of the calling convention on an
architecture, so it has to be able to take a list of arguments and
convert it into a call frame and vice versa. It's quite tricky code to
write but only a few hundred lines or so, if you are familiar with
your architecture's calling convention it shouldn't be too hard.

However I believe Python only needs libffi for the ctypes module so it
may be possible to hack the build to avoid this dependency.


More information about the buildroot mailing list