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

  1. Setup cross-compile tools (unpack toolchain into /opt/toolchain).
  2. Add /opt/toolchain/arm-none-linux-gnueabi/bin to the PATH environment variable.
  3. Unpack linux-2.6.31 to any directory.
  4. 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

  1. Copy all files from linux_drv/ to the Linux kernel sources tree into arch/arm/mach-mx3/.
  2. Change directory to linux kernel home.
  3. Configure Linux kernel:
    make ARCH=arm menuconfig
  4. Enable spidev driver in Device Drivers->SPI support->User mode SPI device driver support. Be sure ZigBee testing driver is disabled!
  5. Enable zigbee_intr driver in System Type->Freescale MXC Implementations->UZ2400 interrupt driver.
  6. Build Linux kernel:
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-