[asterisk-users] Cross compiling Asterisk, Dahdi..
Gordon Henderson
gordon+asterisk at drogon.net
Sun Jan 17 05:47:08 CST 2010
On Sun, 17 Jan 2010, Tzafrir Cohen wrote:
> On Sat, Jan 16, 2010 at 07:00:26AM -1000, Jean-Denis Girard wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi Gordon
>>
>> Gordon Henderson a écrit :
>>> 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?
>>
>> Here is what I'm doing for building dahdi modules on my x86_64 system,
>> for geode target. In dahdi linux directory:
>>
>> make KVERS=2.6.33-rc3-git3-sysnux KSRC=/home/jdg/RPM/BUILD/linux
>>
>> Then install in /tmp/dahdi:
>> make DESTDIR=/tmp/dahdi ARCH=i386 KVERS=2.6.33-rc3-git3-sysnux
>> KSRC=/home/jdg/RPM/BUILD/linux install-modules
>
> Is an explicit ARCH needed? It shouldn't have been there in the first
> place. The ARCH is caculated by Kbuild from your config (in the kernel
> tree) and there should be no need to provide it (at least as of dahdi
> 2.2).
>
> Likewise: is KVERS really needed in that line?
When your building on one platform (lets say Intel Atom) for a kernel
running on a different platform, (e.g. ARM) The build process can't get
the kernel version by any other means, so KVERS is needed at compile time
to let the makefiles find the target kernel, and from there, it can find
the target kernel source tree.
And I'd like to think setting ARCH wasn't needed - as I'd like to think
the build process can infer the target architecture from the kernel source
tree, but it doesn't seem to be able to. Until I explicity set it in the
KBuild file, the process was compiling for the Atom.
Of-course myself and Jean-Denis could both be doing something wrong...
However, we both seem to have a method that works for us - it's elegant
enough - but it would be better if the make process recognised it was
building for a system that's not the one it's being compiled on and didn't
noodle local files on the build system.
Gordon
More information about the asterisk-users
mailing list