Intel Edison - AnaNek/tarantool GitHub Wiki
The Intel® Edison development platform is the first in a series of low-cost, product-ready, general purpose compute platforms that help lower the barriers to entry for entrepreneurs of all sizes—from pro makers to consumer electronics and companies working in the Internet of Things (IoT).
Hardware
- Board with 70-pin connector, 35.5 × 25.0 × 3.9 mm (1.4 × 1.0 × 0.15 inches) max
- 22nm Intel® Intel® Atom™ x86_64 SoC at 500MHz with HyperThreading + 32-bit Intel® Quark™
- 1 GB LPDDR3 POP memory (2 channel 32bits @ 800MT/sec)
- 4 GB EMMC
- Integrated dual-band Wi-Fi and Bluetooth 4.0 with LE support Broadcom 43340 chip
- SD card 1 interface
- USB 2.0 1 OTG controller
- Support for more than 30 industry-standard I/O interfaces via a 70-pin connector (UART, GPIO, I2C):
- UART 2 controllers (1 full flow control, 1 Rx/Tx)
- I2C 2 controllers
- SPI 1 controller with 2 chip selects
- I2S 1 controller
- GPIO Additional 12 (with 4 capable of PWM)
- Has Arduino-compatible breakout board
/proc/cpuinfo
2 x
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 74
model name : Genuine Intel(R) CPU 4000 @ 500MHz
stepping : 8
microcode : 0x810
cpu MHz : 500.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf nonstop_tsc_s3 pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch ida arat epb dtherm tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms
bogomips : 998.40
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Software
The device runs Yocto Linux distribution. Yocto Linux is a constructor like OpenWRT - you selects packages, configure kernel and then get firmware image in a file. Additional packages can be installed using opkg.
Unfortunally, there is no x86_64 bit distribution for this device yet. Anyway, x32 (64-bit with 32-bit pointers) should make more sense here for 1GB of RAM.
root@edison:~# uname -a
Linux edison 3.10.17-poky-edison+ #1 SMP PREEMPT Sun Nov 23 09:51:25 MSK 2014 i686 GNU/Linux
Stock firmware already has nodejs and redis (in some builds) installed by default.
Cross-compiling Tarantool
-
Get official SDK from Intel web-site. You need
Edison SDK Linux 64
orEdison SDK Linux 32
. OS X wasn't tested. Alternative, you can build SDK manually using Yocto Linux scripts fromedison-src-weekly-68.tgz
. Please take a look to Intel® Edison Board Support Package for details. -
Install SDK to proposed folder (
/opt/poky-edison/1.6
). -
Start a fresh console and configure environment:
source /opt/poky-edison/1.6/environment-setup-core2-32-poky-linux
- Check that environment vairables were set up properly:
roman@desktop:~$ echo $CC
i586-poky-linux-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign -fno-omit-frame-pointer --sysroot=/opt/poky-edison/1.6/sysroots/core2-32-poky-linux
roman@desktop:~$ echo $CXX
i586-poky-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mstackrealign -fno-omit-frame-pointer --sysroot=/opt/poky-edison/1.6/sysroots/core2-32-poky-linux
roman@desktop:~$ $CC --version
i586-poky-linux-gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Build Tarantool:
roman@desktop:~tarantool$ cmake . -DCMAKE_INSTALL_PREFIX=$SDKTARGETSYSROOT/usr
roman@desktop:~tarantool$ make
Please note that -DCMAKE_INSTALL_PREFIX
is needed for CMake to find libreadline headers.
Copy ./src/tarantool
binary to your device via ssh
.
Yocto/OpenEmbeddeded recipes are not implemented yet.
Building Tarantool on Device
You can also build Tarantool directly on the device.
- Download source tarball from http://tarantool.org/download/
- Unpack tarball
- cmake .
- make -j2
- ./src/tarantool
Please file a ticket if this build fails.
Running Tarantool
$ tarantool
tarantool> roman@edison:~/tarantool$ ./src/tarantool
Failed to set locale to C.UTF-8
./src/tarantool: version 1.6.6-227-ga126d14
type 'help' for interactive help
tarantool> box.cfg { slab_alloc_arena = 0.5 }
Known Issues
Primary features (app server, box) work properly. Some tests in test suite fails due to missing locales.
- Local-dependent features doesn't work due to missing locales - ignore "Failed to set locale to C.UTF-8)".
- Default value of
box.cfg { slab_alloc_arena = xx }
is great than available memory - use smaller value, e.g.box.cfg { slab_alloc_arena = 0.5 }
How to Get
- Order Edison + Arduino Breakout Kit from SparkFun https://www.sparkfun.com/products/13097
- Participate in a hackaton