use of PyInstaller on ARM platform?

1,747 views
Skip to first unread message

jkn

unread,
Feb 1, 2012, 1:22:26 PM2/1/12
to PyInstaller
Hi there
I have a python script which runs on an ARM platform. If I install
and run PyInstaller in this environment, I end up with an Intel 386
binary ;-(. What would I need to be able to create a binary which runs
on the ARM?

Thanks
J^n

Martin Zibricky

unread,
Feb 2, 2012, 10:29:17 AM2/2/12
to pyins...@googlegroups.com
jkn píše v St 01. 02. 2012 v 10:22 -0800:

Hi,

I don't know of anyone using pyinstaller with arm architecture. So
consider ARM as not officially supported by pyinstaller.

There are precompiled bootloaders for i386/x86_64 architectures in
support/loader directory. That would explain why your binary is Intel
386.

You might try to recompile the bootloader with C compiler for arm
(highly experimental stuff). Probably you would need to patch the C code
of the bootloader.

Hartmut Goebel

unread,
Feb 2, 2012, 11:18:25 AM2/2/12
to pyins...@googlegroups.com
Am 02.02.2012 16:29, schrieb Martin Zibricky:
> You might try to recompile the bootloader with C compiler for arm
> (highly experimental stuff). Probably you would need to patch the C code
> of the bootloader.

Hi jkn,

please base your work on the current development branch. This would help
integrating your work later.

--
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de


jkn

unread,
Feb 3, 2012, 11:11:58 AM2/3/12
to PyInstaller
Hi there,
thanks for the comments. I will start to have a look at the
bootloader code and compiling it for the ARM.

For various reasons this actually means that I will have to cross-
compile the bootloader code on an X86 linux. I already have some cross-
compilation tools installed though.

I will try to understand more about the process which creates the
bootloader code and see where that gets me.

Thanks & Regards
J^n

jkn

unread,
Feb 9, 2012, 7:01:27 AM2/9/12
to PyInstaller
Hi all
(this is more of a WAF question than a PyInstaller one)

I've done a little bit of experimenting with crosscompiling the
bootloader parts of PyInstaller for the arm. I'm doing this manually,
ie. just from the command-line rather than with waf and wscript.

I'm reading up on WAF and ideally I'd like to extend wscript for my
usage. One thing I think I need to know is: what does selecting a
given compiler actually do? for instance, wscript has:

def set_options(opt):
# ....
opt.tool_options('compiler_cc')


Presumably this causes gcc to be used for compilation, with certain
flags set, and maybe other things.

In my case, I want to run my cross-compiler (under scratchbox2, so eg.
'"sb2 gcc ..." instead of just "gcc ...").

So what kinds of things would I have so do so that in set_options(opt)
above I can say something like

# opt.tool_options('compiler_cc')
opt.tool_options('xcompiler_cc') # xcompiler_cc is something I
prepared elsewhere for my cross-compiler

?

Thanks for any pointers
J^n

Martin Zibricky

unread,
Feb 9, 2012, 8:25:25 AM2/9/12
to pyins...@googlegroups.com
jkn píše v Čt 09. 02. 2012 v 04:01 -0800:

> def set_options(opt):
> # ....
> opt.tool_options('compiler_cc')

This is just part of C compiler detection. Not the most important.

>
> Presumably this causes gcc to be used for compilation, with certain
> flags set, and maybe other things.
>
> In my case, I want to run my cross-compiler (under scratchbox2, so eg.
> '"sb2 gcc ..." instead of just "gcc ...").
>
> So what kinds of things would I have so do so that in set_options(opt)
> above I can say something like
>
> # opt.tool_options('compiler_cc')
> opt.tool_options('xcompiler_cc') # xcompiler_cc is something I
> prepared elsewhere for my cross-compiler

Download the waf source code and look for files in folders
waf_src/waflib/Tools
waf_src/waflib/extras

In wscript look for lines like:

80 conf.check_tool('gcc')

138 conf.env.CC = conf.env.LSBCC
139 conf.env.LINK_CC = conf.env.LSBCC

NOTE: we use waf 1.5. Waf 1.6 has slightly different syntax.

cxp

unread,
Oct 1, 2014, 4:28:06 PM10/1/14
to pyins...@googlegroups.com
Did you figure this out for arm or any other arch? I know its a late question, but I'm looking something similar to this?
Reply all
Reply to author
Forward
0 new messages