<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Its already some time ago (March 2013)
      when we built Freeswitch with a fresh compile from git on
      Rapsberry Pi.<br>
      <br>
      But it just worked right of of the box, after having all dependend
      libraries installed on Raspbian. It takes a couple of hours though
      until ./configure finshed and to see that a library was missing.
      So every time it took some hours again to solve the next problem
      with missing dependencies. But finally it worked.<br>
      And I cannot guarantee that every module is working, we just used
      just the minimum of modules to make it working as a SBC and to
      register phones.<br>
      <br>
      I think it makes sense to write down all the needed installation
      steps for compiling Freeswitch on RPi in a seperate wiki chapter.<br>
      I did some basic steps here:<br>
<a class="moz-txt-link-freetext" href="https://wiki.freeswitch.org/wiki/Raspberry_PI-specific_documentation#Installation_from_GIT_.28Raspbian.29">https://wiki.freeswitch.org/wiki/Raspberry_PI-specific_documentation#Installation_from_GIT_.28Raspbian.29</a><br>
      <br>
      <br>
      Best regards<br>
      Peter<br>
      <br>
      <br>
      <br>
      On 01/01/14 19:08, Ken Rice wrote:<br>
    </div>
    <blockquote cite="mid:CEE9B5C5.73994%25krice@freeswitch.org"
      type="cite">
      <title>Re: [Freeswitch-users] Cross compiling freeswitch for
        raspberry pi</title>
      <font face="Monaco, Courier New"><span style="font-size:11pt">I
          think the real reason people want to cross compile it as they
          see it as being faster, however, I have found its more of a
          pain then its really worth... Even Raspbian doesn&#8217;t cross
          compile, they use binary compatible hardware (they were using
          the Freescale i.MX5 platform, however not sure if they still
          are as about 4 or 5 months ago Plugwash commented on how it
          was getting a bit long in the tooth, and i.MX6 hardware is
          shipping now)<br>
          <br>
          As far as building on The Rpi under raspbian you just follow
          the debian instructions<br>
          <br>
          K <br>
          <br>
          <br>
          On 1/1/14 12:01 PM, "Bob Hartwig" &lt;<a
            moz-do-not-send="true" href="bobjects@gmail.com">bobjects@gmail.com</a>&gt;
          wrote:<br>
          <br>
        </span></font>
      <blockquote><font face="Monaco, Courier New"><span
            style="font-size:11pt">Is cross-compiling an academic
            exercise? &nbsp;If not, why not just natively build it? &nbsp;Natively
            building Asterisk or FreeSWITCH is as straightforward on the
            Raspberry Pi as it is on more mainstream platforms. &nbsp;Here's
            how I do it:<br>
            <br>
            <a moz-do-not-send="true"
href="http://www.bobjectsinc.com/tinycomputers/raspberry-pi-vs-beaglebone-black-building-freeswitch/">http://www.bobjectsinc.com/tinycomputers/raspberry-pi-vs-beaglebone-black-building-freeswitch/</a><br>
            <br>
            It takes awhile, but doesn't require any head-scratching.<br>
            <br>
            &nbsp; &nbsp; Bob<br>
            <br>
            <br>
            <br>
            On Wed, Jan 1, 2014 at 11:37 AM, Du&#353;an Dragi&#263; &lt;<a
              moz-do-not-send="true" href="dragic.dusan@gmail.com">dragic.dusan@gmail.com</a>&gt;
            wrote:<br>
          </span></font>
        <blockquote><font face="Monaco, Courier New"><span
              style="font-size:11pt">Happy New Year Everyone! May all
              your wishes come true!<br>
              <br>
              <br>
              Finally had some time to get back at this.<br>
              After my last message I simply built freeswitch using
              qemu-arm-static<br>
              since I needed it running on RPi.<br>
              That worked just fine, except for some mod_spandsp trouble
              (more on that later).<br>
              <br>
              Now I took another shot at cross compiling.<br>
              First, I looked at config.cache differences between cross
              compile and<br>
              native, and there where quite a few.<br>
              But most where because apr disables large file support
              when being<br>
              cross compiled. There where also some thread related but
              none that<br>
              made any difference, freeswitch still segfaulted in the
              same way.<br>
              <br>
              Since this was on Fedora 19 64-bit, I decided to try on a
              different<br>
              build platform, namely Debian 7.3 64-bit.<br>
              While running make on debian I ran into FS-5956 (infinite
              loop on<br>
              build), but thankfully Seven Du's fix-loop-on-mac-2.diff
              patch fixed<br>
              the problem.<br>
              <br>
              After it was finally built I started freeswitch on RPi and
              what do you<br>
              know, it actually runs and works!!<br>
              <br>
              The build steps are the same as outlined in my first post
              (the env<br>
              setup script was the same, only paths and build gcc's
              triplet were<br>
              changed).<br>
              <br>
              If anyone wants to try this (using --sysroot), you will
              probably need<br>
              the patch from FS-6016 to fix esl makefile (or something
              along those<br>
              lines). Also you may need the patch from FS-6015, but that
              can be<br>
              sidestepped by using "export config_TARGET_LIBS=-lpthread"
              (Note:<br>
              debian's gcc is built with "--with-sysroot=/" so sqlite
              configure will<br>
              probably not fail to detect libpthread, but it will be
              testing for the<br>
              build system library not the host (raspbian; rpi sysroot)
              one).<br>
              <br>
              Minor annoyance: freeswitch version string is missing the
              git revision<br>
              and date since ./build/print_git_revision got built for
              arm and didn't<br>
              run on the build system (x86). This is a similar problem
              as with<br>
              gennmtab that I mentioned before.<br>
              <br>
              As mentioned earlier, spandsp doesn't work for me on rpi,
              but this<br>
              isn't related to cross-compiling, I'm also having this
              problem with<br>
              native compiled freeswitch (both master and stable). It
              hogs the cpu<br>
              during module loading (while adding tone descriptors), but
              also<br>
              elsewhere (for example sending fax with txfax). I'll start
              a new<br>
              thread about this issue.<br>
              <br>
              <br>
              Well, there you have it, cross-compiled freeswitch...
              sorry about the<br>
              long, blog like post :)<br>
              <br>
              P.S. Kristian, thanks for the openwrt link. Even though I
              didn't go<br>
              that route (for now), it's useful to see how others have
              dealt with<br>
              some of these problems.<br>
              <br>
              On 4 December 2013 03:12, Kristian Kielhofner &lt;<a
                moz-do-not-send="true" href="kris@kriskinc.com">kris@kriskinc.com</a>&gt;
              wrote:<br>
              &gt; Your best bet to cross compile for Raspberry Pi (or
              anything, really)<br>
              &gt; is to use OpenWRT:<br>
              &gt;<br>
              &gt; <a moz-do-not-send="true"
                href="http://wiki.openwrt.org/toh/raspberry_pi">http://wiki.openwrt.org/toh/raspberry_pi</a><br>
              &gt;<br>
              &gt; with the latest OpenWRT telephony code:<br>
              &gt;<br>
              &gt; <a moz-do-not-send="true"
                href="http://git.nanl.de/?p=openwrt/telephony.git;a=summary">http://git.nanl.de/?p=openwrt/telephony.git;a=summary</a><br>
              &gt;<br>
              &gt; If you give it a shot let us know how it goes!<br>
              &gt;<br>
              &gt; On Tue, Dec 3, 2013 at 3:21 PM, Du&#353;an Dragi&#263; &lt;<a
                moz-do-not-send="true" href="dragic.dusan@gmail.com">dragic.dusan@gmail.com</a>&gt;
              wrote:<br>
              &gt;&gt; Hi all,<br>
              &gt;&gt;<br>
              &gt;&gt; This weekend I tried my luck at cross-compiling
              freeswitch for<br>
              &gt;&gt; raspberry pi (armv6). After a few bumps along the
              way (opened jiras<br>
              &gt;&gt; for those) I managed to build it, but &nbsp;when
              running freeswitch on the<br>
              &gt;&gt; target system it segfaults during startup.<br>
              &gt;&gt;<br>
              &gt;&gt; I'm building on Fedora 19 x86_64 using the
              prebuilt toolchain from<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="https://github.com/raspberrypi/tools">https://github.com/raspberrypi/tools</a>
              (I can build a toolchain from<br>
              &gt;&gt; source if anyone thinks it might be better).
              Raspbian debootstrap<br>
              &gt;&gt; created base system is used as sysroot (also
              tried loop mounted<br>
              &gt;&gt; raspbian image as sysroot).<br>
              &gt;&gt;<br>
              &gt;&gt; My simple build environment setup script:<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://pastebin.freeswitch.org/21698">http://pastebin.freeswitch.org/21698</a><br>
              &gt;&gt;<br>
              &gt;&gt; The build process (source the script, configure
              and compile):<br>
              &gt;&gt; ./bootstrap.sh<br>
              &gt;&gt; . ~/fs-cc-env.sh<br>
              &gt;&gt; ./configure --build=x86_64-redhat-linux
              --host=arm-linux-gnueabihf<br>
              &gt;&gt; --with-sysroot=$SYSROOT<br>
              &gt;&gt; make<br>
              &gt;&gt;<br>
              &gt;&gt; make install didn't work (I guess it's kinda
              expected, didn't really<br>
              &gt;&gt; look into it) so I just copied the binaries,
              libraries and modules to<br>
              &gt;&gt; rpi.<br>
              &gt;&gt; Also mod_spidermonkey and mod_xml_rpc were
              disabled. Didn't even try<br>
              &gt;&gt; to build mod_spidermonkey and mod_xml_rpc failed
              to build (well it<br>
              &gt;&gt; builds but makefile tries to run<br>
              &gt;&gt; libs/xmlrpc-c/lib/expat/gennmtab/gennmtab which
              was compiled for arm<br>
              &gt;&gt; and should have been x86, probably should create
              jira for this as<br>
              &gt;&gt; well).<br>
              &gt;&gt;<br>
              &gt;&gt; Console log when FS is started:<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://pastebin.freeswitch.org/21699">http://pastebin.freeswitch.org/21699</a><br>
              &gt;&gt;<br>
              &gt;&gt; and backtrace:<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://pastebin.freeswitch.org/21700">http://pastebin.freeswitch.org/21700</a><br>
              &gt;&gt;<br>
              &gt;&gt; Is my build environment sane? What am I missing,
              any hints? Has anyone<br>
              &gt;&gt; successfully cross-compiled FS for raspberry pi?<br>
              &gt;&gt;<br>
              &gt;&gt; Thanks,<br>
              &gt;&gt; --<br>
              &gt;&gt; Du&#353;an Dragi&#263;<br>
              &gt;&gt;<br>
              &gt;&gt;
_________________________________________________________________________<br>
              &gt;&gt; Professional FreeSWITCH Consulting Services:<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
              &gt;&gt;<br>
              &gt;&gt; FreeSWITCH-powered IP PBX: The CudaTel
              Communication Server<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://www.cudatel.com">http://www.cudatel.com</a><br>
              &gt;&gt;<br>
              &gt;&gt; Official FreeSWITCH Sites<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://www.cluecon.com">http://www.cluecon.com</a><br>
              &gt;&gt;<br>
              &gt;&gt; FreeSWITCH-users mailing list<br>
              &gt;&gt; <a moz-do-not-send="true"
                href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              &gt;&gt; UNSUBSCRIBE:<a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              &gt;<br>
              &gt;<br>
              &gt;<br>
              &gt; --<br>
              &gt; Kristian Kielhofner<br>
              &gt;<br>
              &gt;
_________________________________________________________________________<br>
              &gt; Professional FreeSWITCH Consulting Services:<br>
              &gt; <a moz-do-not-send="true"
                href="consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              &gt; <a moz-do-not-send="true"
                href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
              &gt;<br>
              &gt; FreeSWITCH-powered IP PBX: The CudaTel Communication
              Server<br>
              &gt; <a moz-do-not-send="true"
                href="http://www.cudatel.com">http://www.cudatel.com</a><br>
              &gt;<br>
              &gt; Official FreeSWITCH Sites<br>
              &gt; <a moz-do-not-send="true"
                href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              &gt; <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
              &gt; <a moz-do-not-send="true"
                href="http://www.cluecon.com">http://www.cluecon.com</a><br>
              &gt;<br>
              &gt; FreeSWITCH-users mailing list<br>
              &gt; <a moz-do-not-send="true"
                href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              &gt; <a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              &gt; UNSUBSCRIBE:<a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              &gt; <a moz-do-not-send="true"
                href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              <br>
              <br>
              <br>
              --<br>
              Du&#353;an Dragi&#263;<br>
              <br>
_________________________________________________________________________<br>
              Professional FreeSWITCH Consulting Services:<br>
              <a moz-do-not-send="true" href="consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
              <br>
              FreeSWITCH-powered IP PBX: The CudaTel Communication
              Server<br>
              <a moz-do-not-send="true" href="http://www.cudatel.com">http://www.cudatel.com</a><br>
              <br>
              Official FreeSWITCH Sites<br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
              <a moz-do-not-send="true" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
              <br>
              FreeSWITCH-users mailing list<br>
              <a moz-do-not-send="true"
                href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              UNSUBSCRIBE:<a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
            </span></font></blockquote>
        <font face="Monaco, Courier New"><span style="font-size:11pt"><br>
            <br>
            <hr align="CENTER" size="3" width="95%"></span></font><font
          size="2"><font face="Consolas, Courier New, Courier"><span
              style="font-size:10pt">_________________________________________________________________________<br>
              Professional FreeSWITCH Consulting Services:<br>
              <a moz-do-not-send="true" href="consulting@freeswitch.org">consulting@freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><br>
              <br>
              FreeSWITCH-powered IP PBX: The CudaTel Communication
              Server<br>
              <a moz-do-not-send="true" href="http://www.cudatel.com">http://www.cudatel.com</a><br>
              <br>
              Official FreeSWITCH Sites<br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><br>
              <a moz-do-not-send="true" href="http://www.cluecon.com">http://www.cluecon.com</a><br>
              <br>
              FreeSWITCH-users mailing list<br>
              <a moz-do-not-send="true"
                href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              UNSUBSCRIBE:<a moz-do-not-send="true"
                href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              <a moz-do-not-send="true" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
            </span></font></font></blockquote>
      <font size="2"><font face="Consolas, Courier New, Courier"><span
            style="font-size:10pt"><br>
          </span></font></font><font face="Monaco, Courier New"><span
          style="font-size:11pt">-- <br>
          Ken<br>
          <font color="#0000FF"><u><a moz-do-not-send="true"
                href="http://www.FreeSWITCH.org">http://www.FreeSWITCH.org</a><br>
              <a moz-do-not-send="true" href="http://www.ClueCon.com">http://www.ClueCon.com</a><br>
              <a moz-do-not-send="true" href="http://www.OSTAG.org">http://www.OSTAG.org</a><br>
            </u></font>irc.freenode.net #freeswitch<br>
          Twitter: @FreeSWITCH<br>
          <br>
        </span></font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
With kind regards
Peter Steinbach 

Telefaks Services GmbH
<a class="moz-txt-link-freetext" href="mailto:lists">mailto:lists</a> (att) telefaks.de
Internet: <a class="moz-txt-link-abbreviated" href="http://www.telefaks.de">www.telefaks.de</a>

</pre>
  </body>
</html>