Skip to content
[dk]

~/blog/building-an-intel-edison-image-release-3.5.md

Building an Intel Edison Release 3.5 Image

:TOC
  1. Download the BSP source
  2. If you are working behind a proxy
  3. Fix the GNU Classpath URL
  4. Fix the icedtea recipe
  5. meta-java/recipes-core/icedtea/icedtea7-native_2.1.3.bb
  6. meta-java/recipes-core/icedtea/openjdk-7-03b147/fix-checksums.patch
  7. References
  8. Remove iotkit-common from the build targets
  9. Build the image
  10. Reference
  11. Kernel customization
  12. Add standard Yocto packages

The official procedure exists in the BSP User Guide, but even when I followed the current Revision 006, I could not build it successfully, so I am documenting the method that worked for me. I built it on Linux Mint 18.1 x64.

First install the packages required for the build.

$ sudo apt-get install build-essential git diffstat gawk chrpath texinfo libtool gcc-multilib u-boot-tools

Download the BSP source

Download the release 3.5 source code and set up the environment variables.

$ curl -LO http://iotdk.intel.com/src/3.5/edison/iot-devkit-yp-poky-edison-20160606.zip
$ unzip iot-devkit-yp-poky-edison-20160606.zip
$ cd iot-devkit-yp-poky-edison-20160606/poky
$ source oe-init-build-env ../build_edison/

If you are working behind a proxy

If you are behind a proxy, follow this section. First configure Git so that the git:// protocol is rewritten automatically to https://.

$ git config --global url."https://".insteadOf git://

Fix the GNU Classpath URL

The FTP server for GNU Classpath appears to be dead, so change the path. Update GNU_MIRROR in ../poky/meta/conf/bitbake.conf as follows.

--- bitbake.conf.orig	2017-04-07 23:06:11.843464998 +0900
+++ bitbake.conf	2017-04-07 23:06:19.207464982 +0900
@@ -556,7 +556,7 @@ DEBIAN_MIRROR = "ftp://ftp.debian.org/de
 GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
 GNOME_GIT = "git://git.gnome.org"
 GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
-GNU_MIRROR = "ftp://ftp.gnu.org/gnu"
+GNU_MIRROR = "http://ftp.gnu.org/gnu"
 GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
 KERNELORG_MIRROR = "http://kernel.org/pub"
 SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"

Fix the icedtea recipe

If you leave it as-is, the build fails, so modify the two files below.

meta-java/recipes-core/icedtea/icedtea7-native_2.1.3.bb

require openjdk-7-release-03b147.inc

PR = "${INC_PR}.0"

ICEDTEA = "icedtea-2.1.3"

SRC_URI[iced.md5sum] = "200e74ad440f9c4bfa21cc2bd94b4325"
SRC_URI[iced.sha256sum] = "1929e57eb6718d30735e1e04e9e129457f845f7d7a8404b2b028740d0779ddb6"

HOTSPOT_CHANGESET = "a456d0771ba0"
SRC_URI[hotspot.md5sum] = "625d903e79e4f9aaf21cf98e369118e1"
SRC_URI[hotspot.sha256sum] = "69719a9657b15e6bef1bef137a15d830293091fbc46616fe8759e863ba904442"

CORBA_CHANGESET = "79ee8535bc51"
SRC_URI[corba.md5sum] = "f9aae602c4d31203fcbf8dcfc5560ad9"
SRC_URI[corba.sha256sum] = "00bf0b0996484db3d0497345ca5b14db4ffb2288b6c7adf8a003b2eafc396fb2"

JAXP_CHANGESET = "77e7219c7424"
SRC_URI[jaxp.md5sum] = "440258a557c3cf0d585304a04ab060b8"
SRC_URI[jaxp.sha256sum] = "bb4beb62fae52d0ff871aefd64ae54eaed8978bff87df1e23f1bfead40ceae6d"

JAXWS_CHANGESET = "d92eda447bca"
SRC_URI[jaxws.md5sum] = "52b1d409628184988ff0f1d1e4d0a853"
SRC_URI[jaxws.sha256sum] = "566778320a0fa18ca93427d6afadc8bd3e416fd8249f9ce88e37e215f9295335"

JDK_CHANGESET = "d7ecb57d3c61"
SRC_URI[jdk.md5sum] = "db2a0f91f27ad7ebbc68db53691ca403"
SRC_URI[jdk.sha256sum] = "b24bf93559804610a6e1078bea94adcec1b2f818dd600b12304926f6e86c6747"

LANGTOOLS_CHANGESET = "fd2fdb20d858"
SRC_URI[langtools.md5sum] = "702becdfee546841ed038c79fa1a9909"
SRC_URI[langtools.sha256sum] = "10fee41a0cdd1b166ff78e6426430c76af0f2358d026c181d325af1e41646c34"

OPENJDK_CHANGESET = "f89009ada191"
SRC_URI[openjdk.md5sum] = "2bc941373ca4b033c9a25f972eec7858"
SRC_URI[openjdk.sha256sum] = "5efd8e66f18fcbf45527bcc74aa3e6ed11f66bc793c88e3841925c4acb4827ba"


# Hardcoded for now as icedtea7 is used in headless mode
RDEPENDS_remove = " libxrender-native libxrender"

meta-java/recipes-core/icedtea/openjdk-7-03b147/fix-checksums.patch

--- icedtea-2.1.3/Makefile.am	2016-10-18 15:31:45.451073805 +0200
+++ icedtea-2.1.3/Makefile.am	2016-10-18 15:42:14.651066400 +0200
@@ -12,13 +12,13 @@
 LANGTOOLS_CHANGESET = fd2fdb20d858
 OPENJDK_CHANGESET = f89009ada191

-CORBA_SHA256SUM = f61dad8d484e4a9e645b7fb73da87bc44f9986a074629154f37ed46be05f5b84
-HOTSPOT_SHA256SUM = 09a64fca0beff0759ef1b461d63ed6a00e43032972781bb3a55e49d8b93f67d0
-JAXP_SHA256SUM = 9cfbc0efaface20f7188870b9bf5b0ebc73d745cd9a49d013cd4e81ba223ccdc
-JAXWS_SHA256SUM = 6d0858d46b68d6e8488e70d1675e5b656aeb4ef51e8ee4e330e77219f92c1c0c
-JDK_SHA256SUM = 11146763409098a42dd9896f3fb7e7324a58c5cff5298009eb347ad26abeed51
-LANGTOOLS_SHA256SUM = 3a4039348aa49547fffa96563b77b704c72e2ac3ead2c132843ba1e9fe4dbad2
-OPENJDK_SHA256SUM = 0f2e414fee619e78c33bceaee7c440efa598d651b23a75fd61e1282ad6001839
+CORBA_SHA256SUM = 00bf0b0996484db3d0497345ca5b14db4ffb2288b6c7adf8a003b2eafc396fb2
+HOTSPOT_SHA256SUM = 69719a9657b15e6bef1bef137a15d830293091fbc46616fe8759e863ba904442
+JAXP_SHA256SUM = bb4beb62fae52d0ff871aefd64ae54eaed8978bff87df1e23f1bfead40ceae6d
+JAXWS_SHA256SUM = 566778320a0fa18ca93427d6afadc8bd3e416fd8249f9ce88e37e215f9295335
+JDK_SHA256SUM = b24bf93559804610a6e1078bea94adcec1b2f818dd600b12304926f6e86c6747
+LANGTOOLS_SHA256SUM = 10fee41a0cdd1b166ff78e6426430c76af0f2358d026c181d325af1e41646c34
+OPENJDK_SHA256SUM = 5efd8e66f18fcbf45527bcc74aa3e6ed11f66bc793c88e3841925c4acb4827ba

 CACAO_VERSION = a567bcb7f589
 CACAO_SHA256SUM = d49f79debc131a5694cae6ab3ba2864e7f3249ee8d9dc09aae8afdd4dc6b09f9

References

Remove iotkit-common from the build targets

Remove iotkit-common from meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb. If you leave it in place, the build fails.

--- edison-image.bb.orig	2017-04-10 22:11:02.083981251 +0900
+++ edison-image.bb	2017-04-10 22:10:30.859981319 +0900
@@ -139,8 +139,8 @@ IMAGE_INSTALL += "zeromq-dev"
 IMAGE_INSTALL += "cppzmq-dev"
 IMAGE_INSTALL += "paho-mqtt-dev"
 IMAGE_INSTALL += "mdns-dev"
-IMAGE_INSTALL += "iotkit-comm-js"
-IMAGE_INSTALL += "iotkit-comm-c-dev"
+#IMAGE_INSTALL += "iotkit-comm-js"
+#IMAGE_INSTALL += "iotkit-comm-c-dev"
 IMAGE_INSTALL += "iotkit-agent"
 IMAGE_INSTALL += "iotkit-lib-c-dev"
 IMAGE_INSTALL += "xdk-daemon"

Build the image

Once all of the modifications above are complete, run the following command to build.

$ bitbake edison-image u-boot

Depending on the environment, the build takes several hours. It also consumes about 50 G of disk space, so keep that in mind. Once the build is finished, run the following. The image for flashing is copied into the toFlash folder.

$ mkdir ../poky/u-boot
$ ln -s /usr/bin/mkimage ../poky/u-boot
$ ../poky/meta-intel-edison/utils/flash/postBuild.sh
$ zip -r toFlash.zip toFlash

Reference

Kernel customization

If you want to customize the kernel, run the following procedure.

$ bitbake virtual/kernel -c menuconfig
$ cp ../poky/linux-kernel/arch/x86/configs/i386_edison_defconfig ../poky/linux-kernel/arch/x86/configs/i386_edison_defconfig.orig
$ cp ../tmp/work/edison-poky-linux/linux-externalsrc/1.0-r2/linux-externalsrc-1.0/.config.custom ../poky/linux-kernel/arch/x86/configs/i386_edison_defconfig
$ bitbake virtual/kernel -c configure -f -v
$ bitbake edison-image u-boot

Add standard Yocto packages

Edit poky/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb. For example, if you want to add expect and rsync, append the following lines.

IMAGE_INSTALL += "expect"
IMAGE_INSTALL += "rsync"

After adding them, run the steps below and rebuild.

$ bitbake virtual/kernel -c configure -f -v
$ bitbake edison-image u-boot

$ related --same-tags