1
votes

I'm planning to build DAHDI for Beagleboneblack
Firstly, I built the kernel for BBB completely by following this tutorial http://elinux.org/Building_BBB_Kernel,

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- beaglebone_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs
make ARCH=arm CROSS_COMPILE=arm-linux-gnu- uImage-dtb.am335x-boneblack modules

I used linaro toolchain for armhf (CROSS_COMPILE=arm-linux-gnueabihf-) instead of the instructed one.
And then I start building the DAHDI :

cd dahdi-linux-complete-2.10.1-rc2+2.10.1-rc2
cd linux/ # I build the dahdi only, not their tools
make KSRC=PATH_TO_MY_ABOVE_KERNEL

Unfortunately, process ends with the following error when compiling the dahdi-base.c :

/home/working/dl/dahdi-linux-complete-2.10.1-rc2+2.10.1-rc2/linux/drivers/dahdi/dahdi-base.c:1: error: code model kernel not supported in the 32 bit mode
/home/working/dl/dahdi-linux-complete-2.10.1-rc2+2.10.1-rc2/linux/drivers/dahdi/dahdi-base.c:1: sorry, unimplemented: 64-bit mode not compiled in

I have no idea why, because my linaro toolchain is 32-bit

/home/working/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2012.10-20121022_linux/bin/arm-linux-gnueabihf-gcc-4.7.3: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

and my gnu gcc toolchain is 32-bit as well.

/usr/bin/gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

If anybody gets an idea, your help would be appreciated.
Best Regard.
Loi Dang Thanh

1
how is your --host configured for your arm-linux-gnueabihf-gcc. Run arm-linux-gnueabihf-gccand look for --host - Milind Dumbare
And try make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KSRC=PATH_TO_MY_ABOVE_KERNEL - Milind Dumbare
Why do you need DAHDI? ...Are you connecting a Digium card to the beagle bone black? Otherwise, you shouldn't need DAHDI to run asterisk. - dougBTV
BBB have no HPET. so yes, he need dahdi or other timer. Unfortanly it is not granted dahdi can be compiled for other platform except x86. Developer must change it to support new platform. DAHDI just say you you have no x86 on this box. I recommend you use thread on openwrt forum for ideas. - arheops
Thank you guys, I was confusing of building it. I thought only KSRC argument is needed when building dahdi only, not dahdi's tools. So I didn't input CROSS_COMPILE or ARCH. Following Miline's instruction solves the issue pretty well. Best regards - Loi Dang

1 Answers

2
votes

I'm making this answer to make sure everyone else who get into my issue can search and solve the problem in the future.
Just add 2 more ARGS to the make command when building DAHDI, and the problem solved pretty well.

make KSRC=PATH_TO_MY_ABOVE_KERNEL ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

A big thanks to Miline who get me out of the stuck.

Best Regards
Loi Dang.