[Freeswitch-dev] ARM cross compile

Simon Capper scapper at ooma.com
Sun Jun 29 13:19:00 EDT 2008


I'm trying to get freeswitch to cross compile on arm (linux 2.6.21), build
o/s linux, using OpenWRT buildroot.

I've gotten as far as getting the console running and loading all the
modules (no calls attempted yet), the switch will be SIP only with a custom
(yet to be developed) endpoint module for an analog line interface.

I'm using these modules:
mod_console
mod_syslog
mod_commands
mod_conference
mod_dptools
mod_limit
mod_expr
mod_esf
mod_fsv
mod_ilbc
mod_dialplan_asterisk
mod_sofia
mod_event_socket
mod_sndfile
mod_tone_stream
mod_lua

Is there a way to disable the c++ code in freeswitch without totally
breaking it? I'm in an embedded environment and libstdc++ is large and takes
up valuable flash space.

Is there a way to specify a different install and runtime location for the
modules (like you can do for log conf and db?) Could be runtime or build
time, I found --with-modinstdir but this seems to affect the install
location and the runtime search location.


In switch_core_state_machine.c backtrace_symbols() fails, not supported in
my arm environment. I hacked this to use the alternative version of
print_trace.

In pcre, libtool failed with the host build tools, had to add --tag=CC in
LINK_FOR_BUILD.
LINK_FOR_BUILD = $(LIBTOOL) --mode=link --tag=CC $(CC_FOR_BUILD)
$(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -I. -I$(top_srcdir)

Although I don't need it the voipcodecs lib it will not load, causes
freeswitch to exit, lrintf & rintf are not available in my arm environment
and the voipcodecs configure does not test for them (libsndfile handles this
correctly).


My configure command line:
    export config_TARGET_CC="$(TARGET_CC)"; \
    export config_BUILD_CC="$(HOSTCC)"; \
    export config_TARGET_CFLAGS="$(TARGET_CFLAGS)"; \
    export config_TARGET_LIBS="-L$(STAGING_DIR)/usr/lib"; \
    export CC_FOR_BUILD="$(HOSTCC)"; \
    export ac_cv_file__dev_zero=no; \
    export apr_cv_tcp_nodelay_with_cork=yes; \
    export ac_cv_sizeof_ssize_t=4; \
    export ac_cv_file_dbd_apr_dbd_mysql_c=yes; \
    export 
ac_cv_path__libcurl_config=$(BUILD_DIR)/curl-7.18.2/install/bin/curl-config;
\
    export apr_cv_mutex_recursive=yes; \
    (cd $(TOPDIR)/ooma/freeswitch; rm -rf config.{cache,status} ; \
        $(TARGET_CONFIGURE_OPTS) \
        CFLAGS='$(TARGET_CFLAGS)' \
        CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
        LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
        ./configure \
        --prefix=$(PKG_BUILD_DIR) \
        --target=$(GNU_TARGET_NAME) \
        --host=$(GNU_TARGET_NAME) \
        --build=$(GNU_HOST_NAME) \
        --with-libcurl=$(BUILD_DIR)/curl-7.18.2/install \
        --with-devrandom=/dev/urandom \
        --with-modinstdir=/mod \


Thanks,

Simon





More information about the Freeswitch-dev mailing list