User Tools

Site Tools


build_iotivity_for_raspberry_pi

Setup

Host

Ubuntu 14.10 64-bit

Raspberry Pi

OS

  • Raspbian Wheezy

Tested Models

  • Raspberry Pi Model B+
  • Raspberry Pi 2 Model B

Steps

One time process

* Install Raspbian Wheezy on an SDCard using the procedure given in Raspberry Pi website.


In the Raspberry Pi unit


Install the essential dependencies in Raspberry Pi box for building iotivity.

sudo apt-get install scons build-essential libboost-dev libexpat1-dev libboost-thread-dev uuid-dev

In the Host PC


Remove the SD card fro the Pi and mount it in the host PC (Ubuntu for ex.).

sudo fdisk -l
/dev/sdc2 - Raspberry Pi File System in SD card (identified by type 'Linux')
sudo mount /dev/sdc2 /mnt

This step is optional but it seems to speed up the build.


Copy the /mnt file system locally.

cp -fr /mnt/* /home/developer/rpichroot/

Install the required packages for chroot environment.


sudo apt-get install qemu qemu-user qemu-user-static

Copy the qemu binary to the chroot bin folder.


sudo cp /usr/bin/qemu-arm-static /home/developer/usr/bin

Comment out the LD preload line


vi /home/developer/rpichroot/etc/ld.so.preload
Comment out the only line.
#/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so

Copy some essential files from the host to chroot.


cp /etc/network/interfaces /home/developer/rpichroot/etc/network/interfaces
cp /etc/resolv.conf /home/developer/rpichroot/etc/resolv.conf 
cp -fr iotivity /home/developer/rpichroot/home/pi/.

Get into the chroot root prompt


sudo chroot /home/developer/rpichroot/

Development Cycle

Build IoTivity


cd home/pi/iotivity
scons TARGET_ARCH=arm

The binaries will be generated locally. They can be copied directly or via network to the SD card.

Resources

Check hardware and os page

build_iotivity_for_raspberry_pi.txt · Last modified: 2017/03/28 12:19 by Johannes Spangenberg