Compile for Linux ARM¶
Compilation runs on the development host PC running Linux. The main difference with a PC build is a usage of another compiler name, such as /opt/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc. Build scripts are nearly the same for Linux and PC.
To run the stack on Linux/ARM platform, build the stack itself and compile Linux kernel with two additional drivers.
Currently, only Debug build is available.
Stack build¶
- Setup cross-compile tools (unpack toolchain into /opt/toolchain).
- Add /opt/toolchain/arm-none-linux-gnueabi/bin to the PATH environment variable.
- Unpack linux-2.6.31 to any directory.
- Edit build-configurations/Options-linux-arm-debug to setup path to the Linux kernel include dir: change LINUX_HDRS (by default it set to be LINUX_HDRS=/home/zheka/zbarm/linux-2.6.31/include).
cd stack ln -s build-configurations/Platform-linux-arm Platform ln -s build-configurations/Options-linux-arm-debug Options make rebuild
Linux kernel build¶
- Copy all files from linux_drv/ to the Linux kernel sources tree into arch/arm/mach-mx3/.
- Change directory to linux kernel home.
- Configure Linux kernel:
make ARCH=arm menuconfig
- Enable spidev driver in Device Drivers->SPI support->User mode SPI device driver support. Be sure ZigBee testing driver is disabled!
- Enable zigbee_intr driver in System Type->Freescale MXC Implementations->UZ2400 interrupt driver.
- Build Linux kernel:
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-