[asterisk-users] Cross compiling Asterisk, Dahdi..

Gordon Henderson gordon+asterisk at drogon.net
Sat Jan 16 09:54:44 CST 2010


Is there a proper, documented way to cross compile DAHDI and Asterisk for 
a processor/system other than the one you're currently typing on?

Now.. I have been doing this for some time, but it's been really 
frustrating every time I change/upgrade, etc.

I've just tried to compile DAHDI for an AMD Geode system on my development 
system which is Intel Atom. Building the kernel is easy - been doing that 
for years, but DAHDI is just hard and does the wrong thing.

So I start by hardwiring HOTPLUG to no because my target device doesn't 
support nor need it. Then setting KVERS to be the correct thing, and this 
is picked up by the Makefile, but I really want -march=geode and the only 
way I've found to get this is to edit Kbuild directly. (And comment out 
all the modules I really don't want to build like torisa, xpp, etc. Even 
then it still barfed on the VPMADT032 loader, so I just commented that 
whole section out.

Now, at install time, it's fiddling with system files on my build box that 
it really should not be touching at all - output from make:

[ `id -u` = 0 ] && /sbin/depmod -a 2.6.32.3-dsx-geode || :
install -d /etc/udev/rules.d
build_tools/genudevrules > /etc/udev/rules.d/dahdi.rules
build_tools/genudevrules: line 3: udevinfo: command not found
build_tools/genudevrules: line 7: udevadm: command not found
install -m 644 drivers/dahdi/xpp/xpp.rules /etc/udev/rules.d/
for hdr in kernel.h user.h fasthdlc.h wctdm_user.h dahdi_config.h; do \
                 install -D -m 644 include/dahdi/$hdr 
/usr/include/dahdi/$hdr; \
         done
rmdir: failed to remove `/usr/include/zaptel': No such file or directory
make: [install-include] Error 1 (ignored)

I don't use udev on my build system, nor my target systems so why is it 
bothering... But I feel there really ought to be a means to tell it that 
it's not building for the local system, so don't fiddle with local 
files...

Bah!

OK. I appreciate that probably no-one actually bothers to compile a custom 
kernel, nor tune dahdi/asterisk to the underlying hardware, and 
probably no-one does a "true" cross compile but even so...

It's just being a frustrating afternoon.

(Although I would appreciate hearing from people who do cross compile 
"properly" for other chips - eg. compile for ARM on an Intel, etc.)

Gordon



More information about the asterisk-users mailing list