Skip to content →

Building the firmware of Intel Edison

Hello! It’s coord.e. Today, I’ll explain the way to build the firmware of Intel Edison.

Tested Environment

  • Ubuntu 16.04
  • Using edison-src-ww25.5-15.tgz

 

Requirements

  • Time (about one night)
  • PC working linux (Windows+cygwin or Mac might be able to build, but not tested)
  • Internet connection

 

Building Environment

 

Installing software dependencies

[shell]sudo apt-get install build-essential git diffstat gawk chrpath texinfo libtool gcc-multilib dfu-util u-boot-tools[/shell]

 

‘git’ will using in building, so you have to set your information if you are first at git.

[shell]git config –global user.name ‘YOUR NAME’
git config –global user.email ‘YOUR EMAIL ADDRESS'[/shell]

 

 

Setting up envirnment

Let’s create working folder. Now, I made folder named ‘edison’ under home directory.

[shell]
cd ~
mkdir edison
cd edison
[/shell]

And download the file named edison-src-wwXX.X-XX.tgz1).tgz means tar.gz2)This file is used to be placed at these URL, but it changed.
https://software.intel.com/iot/hardware/edison/downloads
https://communities.intel.com/docs/DOC-23242
。’X’ will be replaced with version string.

https://downloadcenter.intel.com/download/25028/Intel-Edison-Board-Software-Package

Please look for it well. The link is difficult to find. (Downloading will be finished soon because the size is not so large. )

I assume that it is downloaded directly under ‘edison’ folder.

First, let’s extract it.

[shell]

tar xzf edison-src-wwXX.X-XX.tgz

[/shell]

 

Then, execute the script to setup the build environment. ‘–bb_number_thread’ option specifies thread number while building, ‘–parallel_make’ option specifies the number of process using at the same time. I often hear that these number had better be twice as many as CPU’s core number.3)You can check it with nproc command.

[shell]
cd edison-src
./meta-intel-edison/setup.sh –bb_number_thread=8 –parallel_make=8
[/shell]

 

 

Preparing

Let’s modify the source because there will have a lot of error.

 

No space left on device (ENOSPC)4)Source:https://github.com/seb-m/pyinotify/wiki/Frequently-Asked-Questions

[shell]
sudo sysctl -n -w fs.inotify.max_user_watches=16384
[/shell]

 

Warnings

Edit: ~/edison/edison-src/out/linux64/poky/meta/conf/bitbake.conf

around line 486,

[shell]export BUILD_CPPFLAGS = ‘-isystem${STAGING_INCDIR_NATIVE}'[/shell]

to

[shell]export BUILD_CPPFLAGS = ‘-isystem${STAGING_INCDIR_NATIVE} -P'[/shell]

like this(add -P option)

Then,

[shell]export BUILD_CFLAGS = ‘${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}'[/shell]

to

[shell]export BUILD_CFLAGS = ‘${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION} -Wno-error'[/shell]

like this,

[shell]export BUILD_CXXFLAGS = ‘${BUILD_CFLAGS}'[/shell]

to

[shell]export BUILD_CXXFLAGS = ‘${BUILD_CFLAGS} -Wno-error'[/shell]

like this.(add -Wno-error option)

 

paho-mqtt5)Source:https://communities.intel.com/thread/101849

Edit: ~/edison/edison-src/out/linux64/poky/meta-intel-iot-middleware/recipes-connectivity/paho-mqtt/paho-mqtt_3.1.bb

modify around ‘SRC_URI’.

[shell]SRC_URI = ‘git://github.com/eclipse/paho.mqtt.c.git;protocol=http \
file://makefile.patch \
‘[/shell]

like this.

 

cross-localedef-native6)Source:http://lists.busybox.net/pipermail/buildroot/2015-August/138337.html

around line 42 at ~/edison/edison-src/out/linux64/poky/meta/recipes-core/glibc/cross-localedef-native_2.20.bb

[shell]CFLAGS += ‘-DNOT_IN_libc=1′[/shell]

to

[shell]CFLAGS += ‘-DNOT_IN_libc=1 -fgnu89-inline'[/shell]

like this.

iotkit-comm(append on 2016/11/30)7)Source:https://communities.intel.com/thread/108000

around line 140 at ~/edison/edison-src/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb

[shell]

#IMAGE_INSTALL += "iotkit-comm-js"
#IMAGE_INSTALL += "iotkit-comm-c-dev"

[/shell]

Please comment out two lines like above.

 

Compile

[shell]cd out/linux64
source poky/oe-init-build-env
bitbake edison-image[/shell]

Wait for a long time.

 

Make a flashable image

[shell]~/edison/edison-src/meta-intel-edison/utils/flash/postBuild.sh[/shell]

 

Flash

[shell]cd toFlash
sudo ./flashall.sh[/shell]

After executing this command, please connect to Edison with the USB cable.

 

Reference

http://hobby.farit.ru/building-yocto-linux-for-intel-edison/

 

References   [ + ]

1. .tgz means tar.gz
2. This file is used to be placed at these URL, but it changed.
https://software.intel.com/iot/hardware/edison/downloads
https://communities.intel.com/docs/DOC-23242
3. You can check it with nproc command.
4. Source:https://github.com/seb-m/pyinotify/wiki/Frequently-Asked-Questions
5. Source:https://communities.intel.com/thread/101849
6. Source:http://lists.busybox.net/pipermail/buildroot/2015-August/138337.html
7. Source:https://communities.intel.com/thread/108000

Published in Edison linux Y-modify YamaX Software