evk-w16 user guide - u-bloxubx... · odin-w160 modules user guide abstract ... evk-w16 - user guide...

38
EVK-W16 Evaluation kit for ELIN-W160 and ODIN-W160 modules User Guide Abstract This document describes how to set up the EVK-W16 evaluation kit to evaluate u-blox ELIN-W160 and ODIN-W160 multiradio modules. It also provides an overview of the ELIN-W160 module, the build environment, how to download the firmware for ELIN-W160 and brief information on how to modify and add new functionality to Yocto build environment. www.u-blox.com UBX-15017061 - R02

Upload: lethu

Post on 30-Nov-2018

256 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16

Evaluation kit for ELIN-W160 and ODIN-W160 modules User Guide

Abstract

This document describes how to set up the EVK-W16 evaluation kit to evaluate u-blox ELIN-W160 and ODIN-W160 multiradio modules.

It also provides an overview of the ELIN-W160 module, the build

environment, how to download the firmware for ELIN-W160 and brief information on how to modify and add new functionality to

Yocto build environment.

www.u-blox.com

UBX-15017061 - R02

Page 2: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Contents

Page 2 of 38

Document Information

Title EVK-W16

Subtitle Evaluation kit for ELIN-W160 and ODIN-W160 modules

Document type User Guide

Document number UBX-15017061

Revision, date R02 1-Mar-2016

Document status Advance Information

Document status information

Objective Specification Document contains target values. Revised and supplementary data will be published later.

Advance Information Document contains data based on early testing. Revised and supplementary data will be published later.

Early Production Information Document contains data from product verification. Revised and supplementary data may be published later.

Production Information Document contains the final product specification.

This document applies to the following products:

Product name Type number Firmware version PCN / IN

ELIN-W160 ELIN-W160-00B-00 2.0.0.0 N/A

u-blox reserves all rights to this document and the information contained herein. Products, names, logos and designs described herein may in whole or in part be subject to intellectual property rights. Reproduction, use, modification or disclosure to third parties of this document or any part thereof without the express permission of u-blox is strictly prohibited.

The information contained herein is provided “as is” and u-blox assumes no liability for the use of the information. No warranty, either express or implied, is given, including but not limited, with respect to the accuracy, correctness, reliability and fitness for a particular purpose of the information. This document may be revised by u-blox at any time. For most recent documents, please visit www.u-blox.com.

Copyright © 2016, u-blox AG.

u-blox® is a registered trademark of u-blox Holding AG in the EU and other countries.

Page 3: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Contents

Page 3 of 38

Contents

Contents .............................................................................................................................. 3

1 Introduction .................................................................................................................. 5

1.1 Overview .............................................................................................................................................. 5

1.2 Development board .............................................................................................................................. 5

1.2.1 System requirements ......................................................................................................................... 7

2 Getting started ............................................................................................................. 8

2.1 Jumper configuration............................................................................................................................ 8

2.2 GPIO LED overview ............................................................................................................................... 9

2.3 UART Terminal .................................................................................................................................... 10

2.4 Ethernet over USB............................................................................................................................... 11

2.5 Working with Wi-Fi............................................................................................................................. 11

2.6 Bluetooth ........................................................................................................................................... 13

2.7 Ethernet ............................................................................................................................................. 15

2.8 Benchmark ......................................................................................................................................... 16

3 Yocto environment setup .......................................................................................... 17

3.1 Install environment ............................................................................................................................. 17

3.1.1 Build default distribution ................................................................................................................. 20

3.2 Download firmware to target ............................................................................................................. 22

4 Factory restore ........................................................................................................... 23

4.1 USB Device firmware upgrade ............................................................................................................ 23

5 Build and install package ........................................................................................... 25

5.1 Package server .................................................................................................................................... 25

5.2 Sample Python package ...................................................................................................................... 26

6 Overview of Yocto meta layers ................................................................................. 28

6.1 Developer layer ................................................................................................................................... 28

6.2 Application layer ................................................................................................................................. 28

6.3 u-blox layers ....................................................................................................................................... 28

6.3.1 meta-ublox Layer ............................................................................................................................ 29

6.3.2 meta-ublox-extras Layer .................................................................................................................. 30

6.3.3 Yocto, OpenEmbedded, and TI layers .............................................................................................. 31

6.4 Working with the meta layers ............................................................................................................. 31

6.4.1 Creating a new meta layer .............................................................................................................. 31

6.4.2 Overriding or modifying a meta layer or an image ........................................................................... 33

Appendix .......................................................................................................................... 35

A Glossary ...................................................................................................................... 35

B Policies and configuration ......................................................................................... 36

Page 4: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Contents

Page 4 of 38

Related documents and links .......................................................................................... 37

Revision history ................................................................................................................ 37

Contact .............................................................................................................................. 38

Page 5: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Introduction

Page 5 of 38

1 Introduction This document describes how to set up the u-blox EVK-W16 evaluation kit to perform some basic operations

with Wi-Fi, Bluetooth and the terminal. The EVK-W16 also serves as reference platform for the ODIN-W160 module and this guide also demonstrates the capabilities of the ODIN-W160 multiradio module. The setup

process takes around 10 minutes. This guide also provides information on how to build and customize the

firmware. You can build and customize the firmware in 1-2 hours, depending on the build system and speed of the internet connection.

1.1 Overview

The ELIN-W160 is a system-on-module that uses an AM3352, 512 MB NAND, 256 MB RAM with a dual-band 802.11a/b/g/n Wi-Fi and Bluetooth 4.0 radio for OEMs. The ELIN-W160 module has the following three main

connectors:

Primary host connector

Secondary host connector

A U.FL. connector for connecting to an external antenna

Two LEDs indicate the power and the activity of the CPU as shown in Figure 1.

Figure 1: ELIN-W16 Connector LED overview

1.2 Development board

The ELIN-W160 requires a carrier board to provide power and connectors for the user interfaces, as needed for operation. The EVK-W16 evaluation kit and its main parts are shown in Figure 2. The development board

provides convenient connectors for the ELIN-W160 for all default interfaces, as shown in Figure 3.

Socket for ELIN-W160

Dual 100 Mbit Ethernet PHY and RJ45 connectors

USB 2.0 OTG

o Host, Micro-AB o Device, Type-A

Console UART (UART0) via

o FTDI chip o Full modem connector

UART1 with CTS/RTS signals

Page 6: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Introduction

Page 6 of 38

o DSUB9

Signal pin headers

o Access to almost all CPU signals

JTAG for ELIN-W160 CPU

Three GPIO buttons

Four user customizable LEDs

Antenna connector

Power switch

Figure 2: Overview of EVK-W16 evaluation kit

Page 7: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Introduction

Page 7 of 38

Figure 3: Overview of EVK-W16 connectors

1.2.1 System requirements

The minimum system requirements are provided below:

EVK-W16 evaluation kit o ELIN-W160 module

o EVB-W16 evaluation board

o 9-12 V power adapter 1A o USB A - B mini cable

o USB A - B micro cable

o Antenna o u.fl. to RPSMA antenna cable

PC with Linux or Windows

o Minimum recommended configuration: 2 core, 60 GB disk space and 4 GB RAM o Linux build host is recommended for building the firmware. The build times can be long if done

through a virtual Linux system.

Page 8: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 8 of 38

2 Getting started The setup process described in this section allows you to quickly get up and running with your development

board using Ethernet over USB and a console through FTDI chip UART:

Ensure that the development board is not connected to a power source.

2.1 Jumper configuration

1. Set the jumper on JP4 between pin 1 and 5. This selects 5V0 regulated as the power source for

ELIN-W1. 2. Set the jumper on JP6 between pin 1 and 2. This disables the UART0 DSUB transceiver, which could

cause interference with the FTDI chip.

3. Set three jumpers between pins on JP7 and JP8 between pairs of pins: JP7.19 - JP8.20, JP7.15 - JP8.16, and JP7.9 - JP8.10. This enables the UART1 transceiver on the DSUB J24 and connects RXD and TXD to

the DSUB connector.

4. Set the jumper on JP12 between pin 1 and 2. This sets 3.3 V to the Ethernet PHYs.

Figure 4: EVK-W16 jumper configuration

5. Connect a regulated power supply to the J16.

Page 9: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 9 of 38

2.2 GPIO LED overview

6. Turn on the power supply and turn on the power switch (SW8). The LED LD17 lights up to indicate

power to the board while the LED LD20 lights up to indicate power to the ELIN-W160 module.

7. Connect a USB cable to the FTDI chip. The LED LD18 will indicate USB Voltage.

Figure 5: EVK-W16 GPIO LED overview

8. Press PWR TGL (SW11) to start the OEM Module. Your OS should detect the FTDI chip and provide 4

UARTs. Connect to the console.

The FTDI chip has four channels and the console is on the third.

a. 115200 8N1

b. No hardware handshake

// On HOST PC

9. You can see that the module boots first the u-boot and then boots the kernel into user space. 10. You can now login as root and no password is required by default.

$ minicom -b 115200 -D /dev/ttyUSB2

Page 10: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 10 of 38

2.3 UART Terminal

The UART0 serves as a terminal at 115200 8N1 and is accessible through the FTDI chip (port C) on J26 or RS232

on J22. If you use the FTDI chip, ensure that the JP6 jumper is in place. Remove J22 if you use RS232.

U-Boot SPL 2013.10 (Jun 10 2015 - 12:02:59)

U-Boot 2013.10 (Jun 10 2015 - 12:02:59)

I2C: ready

DRAM: 256 MiB

NAND: 512 MiB

MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1

Net: cpsw:3 is connected to cpsw. Reconnecting to cpsw

cpsw

Hit any key to stop autoboot: 1 ^H^H^H 0·

Booting from nand ...

NAND read: device 0 offset 0x200000, size 0x500000

5242880 bytes read: OK

NAND read: device 0 offset 0x1c0000, size 0x40000

262144 bytes read: OK

Kernel image @ 0x80008000 [ 0x000000 - 0x4104a8 ]

## Flattened Device Tree blob at 80f80000

Booting using the fdt blob at 0x80f80000

Using Device Tree in place at 80f80000, end 80f8b3fd

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0

[ 0.000000] Linux version 3.19.8 (msen@de-bln-lt-msen) (gcc version 4.9.2 (GCC) ) #1 Tue Oct 20 12:14:28 CEST 2015

...

...

Starting rpcbind daemon...done.

Starting UART HCI interface: hciattach

Starting Bluetooth daemon: bluetoothd

starting Busybox UDHCP Server: udhcpd... done.

Starting syslogd/klogd: done

* Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon

...done.

Starting Hiawatha Web Server: hiawatha.

Poky (Yocto Project Reference Distro) 1.8.1 elin-w160-evk /dev/ttyO0

elin-w160-evk login:

Page 11: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 11 of 38

2.4 Ethernet over USB

Connect the EVK-W16 to the PC using a USB cable (Type-A to Micro-AB) inserted into USB0 port. On Linux, you

should be able to find the USB device on your PC using the following commands:

// On HOST PC

The ELIN-W160 has a DHCP server, which provides an IP address for your PC. If required, you can request a new

IP address from the ELIN-W160 using the following command:

You should now be able to ping your target

If you use Windows, you must change the USB gadget driver to RNDIS and install the RNDIS driver on Windows

for Ethernet-Over-USB to work properly. Currently, there is no driver in Windows OS for USB NCM. For USB RNDIS, use the linux.inf driver.

1. Open the Device Manager in Windows to install the driver.

2. Under Other devices, select the RNDIS device, right click and choose Update Driver Software. 3. In the Update Driver Software window, select Browse my computer for driver software.

4. On the next screen, where it prompts you to browse for driver software on your computer, select Let

me pick from a list of device drivers option and click Next. 5. In the next screen, click Have Disk button and select the driver you have already downloaded

(linux.inf).

6. Accept any warnings and the device should be installed.

2.5 Working with Wi-Fi

Connecting to a Wi-Fi is easy using wpa_cli. This also allows you to save your configuration after setting up the network. You can also modify /etc/wpa_supplicant.conf directly if you are familiar with wpa_supplicant. Refer to

http://w1.fi/wpa_supplicant/ for more information regarding wpa_supplicant.

The wpa_supplicant must be started before using wpa_cli.

Steps Instructions

Ensure that your Wi-Fi interface is up.

# ifconfig wlan0 up

Start wpa_supplicant command line interface.

# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf

Successfully initialized wpa_supplicant

# wpa_cli

wpa_cli v2.0

Copyright (c) 2004-2012, Jouni Malinen <[email protected]> and contributors

This software may be distributed under the terms of the BSD license.

See README for more details.

$ ping 192.168.7.1

$ dhclient -i usb0

$ ifconfig usb0

usb0 Link encap:Ethernet HWaddr 02:25:f5:19:00:89

inet addr:192.168.7.8 Bcast:192.168.7.255 Mask:255.255.255.0

inet6 addr: fe80::25:f5ff:fe19:89/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:37 errors:0 dropped:0 overruns:0 frame:0

TX packets:111 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:6019 (5.8 KiB) TX bytes:428814 (418.7 KiB)

Page 12: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 12 of 38

Steps Instructions

Selected interface 'wlan0'

Interactive mode

Verify whether the wlan0 interface is up.

> status

wpa_state=DISCONNECTED

address=de:ad:be:ef:00:00

Perform a scan to see the available networks.

> scan

OK

<3>CTRL-EVENT-SCAN-RESULTS

<3>WPS-AP-AVAILABLE

> scan_results

bssid / frequency / signal level / flags / ssid

00:11:22:33:44:55 2437 -77 [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS]TEST-AP

11:22:33:44:55:66 2447 -41 [WPS][ESS] TEST-AP2

22:33:44:55:66:77 2427 -36 [WPA2-EAP-CCMP-preauth][ESS] TEST-AP3

Associate with the network and save the configuration.

> add_network

0

> set_network 0 ssid "TEST-AP"

OK

> set_network 0 psk "1234567"

OK

> enable_network 0

OK

<3>CTRL-EVENT-SCAN-RESULTS

<3>WPS-AP-AVAILABLE

<3>Trying to associate with 00:11:22:33:44:55 (SSID='TEST-AP' freq=2437

MHz)

<3>Associated with 00:11:22:33:44:55

<3>WPA: Key negotiation completed with 00:11:22:33:44:55 [PTK=CCMP

GTK=CCMP]

<3>CTRL-EVENT-CONNECTED - Connection to 00:11:22:33:44:55 completed [id=0

id_str=]

> save_config

OK

> quit

#

Check whether your wpa_configuration is updated.

# cat /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

network={

ssid="TEST-AP"

psk="1234567"

}

Once associated with the access point, you can get an IP address. You can obtain the IP address either by using the network configurations preset in the ELIN-W16 or by using udhcpc DHCP client.

# ifup wlan0

udhcpc (v1.21.1) started

Sending discover...

Sending select for 192.168.0.89...

Lease of 192.168.0.89 obtained, lease time 43200

/etc/udhcpc.d/50default: Adding DNS 192.168.0.1

#

Page 13: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 13 of 38

Steps Instructions

or

# udhcpc -i wlan0

udhcpc (v1.21.1) started

Sending discover...

Sending discover...

Sending discover...

Sending select for 192.168.0.89...

Lease of 192.168.0.89 obtained, lease time 43200

/etc/udhcpc.d/50default: Adding DNS 192.168.0.1

#

You can now ping the router to verify the connection.

# ping 192.168.0.1

PING 192.168.0.1 (192.168.0.1): 56 data bytes

64 bytes from 192.168.0.1: seq=0 ttl=64 time=3.253 ms

64 bytes from 192.168.0.1: seq=1 ttl=64 time=2.856 ms

64 bytes from 192.168.0.1: seq=2 ttl=64 time=3.716 ms

Table 1: Steps to connect to Wi-Fi

2.6 Bluetooth

Bluetooth is handled through Bluez, a user space protocol/layer stack for Bluetooth. Use the steps mentioned in Table 2 to scan and connect to different devices.

Steps Instructions

Verify whether the Bluetooth interface is started. The Bluetooth interface is started automatically during boot.

# hcitool dev

Devices:

hci0 78:C5:E5:30:83:45

You can scan for Bluetooth devices. # hcitool scan

Scanning ...

1C:BA:8C:7F:58:B3 Bluetooth Device

00:12:F3:1A:CA:89 n/a

00:12:F3:23:43:60 PB COM21

00:12:F3:1A:CA:F7 PB COM36

00:12:F3:17:C4:DE OBS421 echo device

Choose a device and obtain additional information regarding the device.

# hcitool info 00:12:F3:17:C4:DE

Requesting information ...

BD Address: 00:12:F3:17:C4:DE

Device Name: OBS421 echo device

LMP Version: 4.0 (0x6) LMP Subversion: 0x1b55

Manufacturer: Texas Instruments Inc. (13)

Features page 0: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87

<3-slot packets> <5-slot packets> <encryption> <slot

offset>

<timing accuracy> <role switch> <hold mode> <sniff mode>

<RSSI> <channel quality> <SCO link> <HV2 packets>

<HV3 packets> <u-law log> <A-law log> <CVSD> <power

control>

<transparent SCO> <EDR ACL 2 Mbps> <EDR ACL 3 Mbps>

<enhanced iscan> <interlaced iscan> <interlaced pscan>

<inquiry with RSSI> <extended SCO> <EV4 packets> <EV5

packets>

<AFH cap. slave> <AFH class. slave> <LE support>

<3-slot EDR ACL> <5-slot EDR ACL> <sniff subrating>

<pause encryption> <AFH cap. master> <AFH class. master>

Page 14: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 14 of 38

Steps Instructions

<EDR eSCO 2 Mbps> <EDR eSCO 3 Mbps> <3-slot EDR eSCO>

<extended inquiry> <LE and BR/EDR> <simple pairing>

<encapsulated PDU> <err. data report> <non-flush flag>

<LSTO>

<inquiry TX power> <EPC> <extended features>

Features page 1: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00

Use the sdptool to find out the services supported by the device.

# sdptool records 00:12:F3:17:C4:DE

Service Name: SPP

Service RecHandle: 0x10001

Service Class ID List:

"Serial Port" (0x1101)

Protocol Descriptor List:

"L2CAP" (0x0100)

"RFCOMM" (0x0003)

Channel: 1

Profile Descriptor List:

"Serial Port" (0x1101)

Version: 0x0102

If you have a serial port adapter such as the OBS421, you can connect the device and make it a serial port on the ELIN-W1.

Press CTRL-A + x to leave minicom.

Use "rfcomm release 0" to disconnect.

# rfcomm connect 0 00:12:F3:17:C4:DE 1 &

Connected /dev/rfcomm0 to 00:12:F3:17:C4:DE on channel 1

Press CTRL-C for hangup

# minicom -b 115200 -D /dev/rfcomm0

To accept incoming SPP connections, you need to do the following on the ELIN-W1:

• Turn on both page and inquiry scan (optional).

• Add a Serial port service.

• Start the RFCOMM listener.

Press CTRL-A + x to leave minicom.

Use "rfcomm release 0" to disconnect the rfcomm listener.

# hciconfig hci0 piscan

# sdptool add SP

Serial Port service registered

# rfcomm listen /dev/rfcomm0 1 &

Waiting for connection on channel 1

Connection from 00:12:F3:17:C4:DE to /dev/rfcomm0

Press CTRL-C for hangup

# minicom -b 115200 -D /dev/rfcomm0

Table 2: Steps to connect to Bluetooth

Page 15: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 15 of 38

2.7 Ethernet

Ethernet on the ELIN-W160 is set to obtain an IP address through DHCP automatically. To see the interfaces, use

ifconfig:

To bring up the interfaces, use ifup. This command uses the configuration in /etc/network/interfaces to configure your Ethernet interface:

# ifup eth0

udhcpc (v1.21.1) started

Sending discover...

Sending discover...

# ifconfig -a

eth0 Link encap:Ethernet HWaddr 20:CD:39:FC:1F:42

UP BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Interrupt:56

eth1 Link encap:Ethernet HWaddr 20:CD:39:FC:1F:44

BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Page 16: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Getting started

Page 16 of 38

2.8 Benchmark

Use iperf to test the throughput of the network connection. Install iperf on your PC if not installed previously

and start iperf as a server.

// On HOST PC

The iperf is pre-installed on the ELIN-W160 module. Start testing using UDP and 100 MBit throughput test. Replace the IP address with the address you obtained during DHCP configuration.

// On Target

root@elin-w160-evk:~# iperf -c 192.168.1.1 -u -i 1 -b 100M

------------------------------------------------------------

Client connecting to 192.168.1.1, UDP port 5001

Sending 1470 byte datagrams

UDP buffer size: 160 KByte (default)

------------------------------------------------------------

[ 3] local 192.168.1.146 port 40375 connected with 192.168.1.1 port 5001

[ ID] Interval Transfer Bandwidth

[ 3] 0.0- 1.0 sec 11.5 MBytes 96.5 Mbits/sec

[ 3] 1.0- 2.0 sec 11.4 MBytes 95.7 Mbits/sec

[ 3] 2.0- 3.0 sec 11.4 MBytes 95.5 Mbits/sec

[ 3] 3.0- 4.0 sec 11.4 MBytes 96.0 Mbits/sec

[ 3] 4.0- 5.0 sec 11.4 MBytes 95.6 Mbits/sec

[ 3] 5.0- 6.0 sec 11.4 MBytes 95.5 Mbits/sec

[ 3] 6.0- 7.0 sec 11.4 MBytes 96.0 Mbits/sec

[ 3] 7.0- 8.0 sec 11.4 MBytes 95.6 Mbits/sec

[ 3] 8.0- 9.0 sec 11.4 MBytes 95.6 Mbits/sec

[ 3] 9.0-10.0 sec 11.4 MBytes 95.8 Mbits/sec

[ 3] 0.0-10.0 sec 114 MBytes 95.7 Mbits/sec

[ 3] Sent 81436 datagrams

[ 3] Server Report:

[ 3] 0.0-10.0 sec 114 MBytes 95.7 Mbits/sec 0.306 ms 0/81435 (0%)

[ 3] 0.0-10.0 sec 1 datagrams received out-of-order

$ sudo apt-get install iperf

$ iperf -s -u

Page 17: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Yocto environment setup

Page 17 of 38

3 Yocto environment setup This section provides information on how to set up the yocto build environment and make the default factory

image download to the target. For more information, refer to Yocto Quick Start Guide [4], which provides detailed information about the Yocto build system.

3.1 Install environment

Ensure that you have a PC with Linux installed. This guide assumes that you have installed Debian 7.4 and your user has sudo privileges (if not, issue "sudo usermod -a -G sudo 'username'"). You should not be logged in as

root.

First, install the required packages for the build process:

Clone u-blox tools repository:

$ git clone https://github.com/u-blox/elin-tools

Cloning into 'elin-tools'...

remote: Counting objects: 37, done.

remote: Total 37 (delta 0), reused 0 (delta 0), pack-reused 37

Unpacking objects: 100% (37/37), done.

$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath libsdl1.2-dev xterm lzop

Page 18: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Yocto environment setup

Page 18 of 38

For the next step, you should be a github user who has added an ssh key to your account. Refer

to the help section on GitHub [6] for more information on account settings and ssh key setup.

Run the following setup script that will download the required repositories and provide you with initial configuration files required by Yocto. This will download the poky, openembedded, ti and u-blox meta layers

(roughly 150 MiB). On successful download, you should have a poky folder populated with the required meta

layers.

$ cd elin-tools/scripts

$ ./ublox-poky-setup.sh

Setting up poky

Cloning into 'poky'...

remote: Counting objects: 304080, done.

remote: Compressing objects: 100% (74926/74926), done.

remote: Total 304080 (delta 224033), reused 303244 (delta 223329)

Receiving objects: 100% (304080/304080), 117.71 MiB | 8.86 MiB/s, done.

Resolving deltas: 100% (224033/224033), done.

HEAD is now at b74ea96 build-appliance-image: Update to fido head revision

Setting up meta-openembedded

Cloning into 'meta-openembedded'...

remote: Counting objects: 54719, done.

remote: Compressing objects: 100% (20271/20271), done.

remote: Total 54719 (delta 32712), reused 53451 (delta 31788)

Receiving objects: 100% (54719/54719), 22.84 MiB | 1.78 MiB/s, done.

Resolving deltas: 100% (32712/32712), done.

HEAD is now at df2f700 geoclue: add PACKAGECONFIG for geoip

Setting up meta-ublox

Cloning into 'meta-ublox'...

remote: Counting objects: 148, done.

remote: Total 148 (delta 0), reused 0 (delta 0), pack-reused 148

Receiving objects: 100% (148/148), 26.81 KiB, done.

Resolving deltas: 100% (44/44), done.

HEAD is now at 47dbe3a elin-eeprom-reader: fix S and QA Issue warnings

Setting up meta-ublox-extras

Cloning into 'meta-ublox-extras'...

remote: Counting objects: 260, done.

remote: Total 260 (delta 0), reused 0 (delta 0), pack-reused 260

Receiving objects: 100% (260/260), 40.71 KiB, done.

Resolving deltas: 100% (100/100), done.

HEAD is now at 52e11eb elin-w1-webdocumentation: update operated temperature and include type approvals for Japan

Page 19: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Yocto environment setup

Page 19 of 38

Source the ublox environment script to initiate the Yocto build environment:

Now, Yocto would have generated a build folder, relocated your shell to the build folder and populated it with a

few files.

The following two files are used to configure your local build settings:

bblayers.conf is used to locate the build recipes used by bitbake during build time

local.conf is used to define local settings, target architecture, machine configuration, and many other

settings.

In the bblayers.conf file, you can see the paths for the different meta-layers, which bitbake requires to build the

u-blox distribution. Here, add your own meta-layer if you would like to add any layers of your own.

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf

# changes incompatibly

LCONF_VERSION = "6"

BBPATH = "${TOPDIR}"

BBFILES ?= ""

BBLAYERS ?= " \

/home/ublox/projects/yocto/poky/meta \

/home/ublox/projects/yocto/poky/meta-yocto \

/home/ublox/projects/yocto/poky/meta-ublox \

/home/ublox/projects/yocto/poky/meta-ublox-extras \

/home/ublox/projects/yocto/poky/meta-openembedded/meta-networking \

/home/ublox/projects/yocto/poky/meta-openembedded/meta-oe \

/home/ublox/projects/yocto/poky/meta-openembedded/meta-webserver \

"

BBLAYERS_NON_REMOVABLE ?= " \

/home/ublox/projects/yocto/poky/meta \

/home/ublox/projects/yocto/poky/meta-yocto \

"

/

└── conf

├── bblayers.conf

├── local.conf

└── templateconf.cfg

$ cd poky/

$ source ublox-init-build-env

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:

core-image-minimal

core-image-ublox-dev

meta-toolchain

Page 20: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Yocto environment setup

Page 20 of 38

The local.conf file contains local settings, such as the machine on which distro can be built. The DL_DIR variable should match the location where you want to save all your downloaded tarballs and git archives from the build

process. As this information enables you to save bandwidth and time, it is better to go through the different

settings and modify them, if required. The default settings are used in this document.

3.1.1 Build default distribution

You can now start the build and refer to the Yocto Quick Start Guide agreement [4] for additional information.

The build takes approximately 1 to 4 hours depending on the specifications of the compiling machine and the

speed of your internet connection.

...

...

# Where to place downloads

#

# During a first build the system will download many different source code tarballs

# from various upstream projects. This can take a while, particularly if your network

# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you

# can preserve this directory to speed up this part of subsequent builds. This directory

# is safe to share between multiple builds on the same machine too.

#

# The default is a downloads directory under TOPDIR which is the build directory.

#

DL_DIR := "/home/martin/projects/yocto/downloads"

...

...

# Make use of SMP:

# PARALLEL_MAKE specifies how many concurrent compiler threads are spawned

# per bitbake process

# BB_NUMBER_THREADS specifies how many concurrent bitbake tasks that spawns

PARALLEL_MAKE = "-j 3"

BB_NUMBER_THREADS = "3"

...

...

Page 21: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Yocto environment setup

Page 21 of 38

/elin-tools/scripts/poky/build$ bitbake core-image-ublox-dev

Parsing recipes: 100% |#########################################| Time: 00:23:17

Parsing of 1666 .bb files complete (0 cached, 1666 parsed). 2158 targets, 96 skipped, 0 masked, 0 errors.

NOTE: Resolving any missing task queue dependencies

Build Configuration:

BB_VERSION = "1.26.0"

BUILD_SYS = "x86_64-linux"

NATIVELSBSTRING = "Debian-7.4"

TARGET_SYS = "arm-poky-linux-gnueabi"

MACHINE = "elin-w160-evk"

DISTRO = "poky"

DISTRO_VERSION = "1.8.1"

TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard cortexa8"

TARGET_FPU = "vfp-neon"

meta

meta-yocto = "fido:b74ea963cefffad9fbd91d4eb9b240f6a8c86cd0"

meta-ublox = "fido:47dbe3a66a06bd321966107197c6682a1a4337a2"

meta-ublox-extras = "fido:52e11ebf56bfc4a3100284ea97d94d9aef296563"

meta-python

meta-networking

meta-oe

meta-webserver = "fido:df2f700d66bace65f5d802225232d01cf511fe81"

...

...

NOTE: Tasks Summary: Attempted 3150 tasks of which 13 didn't need to be rerun and all succeeded.

Summary: There were 8 WARNING messages shown.

Page 22: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Yocto environment setup

Page 22 of 38

3.2 Download firmware to target

The images generated during build are located in the build directory under tmp/deploy/images/ELIN-W16-evk/

The above-mentioned images provide information regarding the data generated from the boot loader, kernel, device tree, and root file system. Note the time stamp suffix on the images; each build is saved with a time

stamp and symlinks in the directory and always points to the latest image.

The following files must either be flashed into the SD card or downloaded through USB to the NAND on the ELIN-W16:

Symlink name Symlink to latest build for

zImage Kernel

zImage-am335x-elin-w160-evk.dtb Device Tree

core-image-ublox-dev-elin-w160-evk.ubi RootFS in UBI format

MLO U-Boot (loads U-Boot to RAM from NAND)

u-boot.img U-Boot boot loader

u-boot-spl.bin U-Boot (load U-Boot to RAM from UART)

Table 3: List of files to be stored on ELIN NAND or SD-card

$ ls tmp/deploy/images/ELIN-W16-evk/

core-image-ublox-dev-elin-w160-evk-20160208090855.rootfs.manifest

core-image-ublox-dev-elin-w160-evk-20160208090855.rootfs.tar.bz2

core-image-ublox-dev-elin-w160-evk-20160208090855.rootfs.ubi

core-image-ublox-dev-elin-w160-evk-20160208090855.rootfs.ubifs

core-image-ublox-dev-elin-w160-evk.manifest

core-image-ublox-dev-elin-w160-evk.tar.bz2

core-image-ublox-dev-elin-w160-evk.ubi

core-image-ublox-dev-elin-w160-evk.ubifs

MLO

MLO-elin-w160-evk

MLO-elin-w160-evk-v2013.10+gitAUTOINC+8db1ee3025-r0

modules--3.19+git0+93a3344328-r0-elin-w160-evk-20160208090855.tgz

modules-elin-w160-evk.tgz

README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt

ubinize.cfg

u-boot-elin-w160-evk.img

u-boot-elin-w160-evk-v2013.10+gitAUTOINC+8db1ee3025-r0.img

u-boot.img

u-boot-spl.bin

u-boot-spl-elin-w160-evk.bin

u-boot-spl-elin-w160-evk-v2013.10+gitAUTOINC+8db1ee3025-r0.bin

zImage

zImage--3.19+git0+93a3344328-r0-am335x-elin-w160-evk-20160208090855.dtb

zImage--3.19+git0+93a3344328-r0-elin-w160-evk-20160208090855.bin

zImage-am335x-elin-w160-evk.dtb

zImage-elin-w160-evk.bin

Page 23: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Factory restore

Page 23 of 38

4 Factory restore If a unit is not booting properly, the device can be restored to factory settings using the procedure mentioned in

section 4.1. To update the bootloader, contact u-blox support.

4.1 USB Device firmware upgrade

The USB DFU standard allows downloading of the firmware through a standardized protocol over USB. To

reflash the ELIN-W160 with new firmware, you can upgrade the whole system by reflashing the NAND. Reboot target and break the boot sequence when you see U-Boot.

Retrieve the firmware bundle for the ELIN-W160 and unpack in the firmware folder:

git clone [email protected]:u-blox/elin-w16-releases.git

In the release repository, you have scripts for automating the firmware download to target.

The script elin-w16-flashload.sh depends on dfu-util to be installed on the host.

The scripts are matched to the firmware from u-blox EVK though it can be easily changed to match other

images. Power off the module and connect the board with a USB micro into the USB0 interface on your PC and

the FTDI chip to your PC.

When you see the U-Boot loading, abort the boot sequence. In U-Boot prompt, clear the NAND flash to prepare for firmware upgrade.

This erases the UBI erase counters and is recommended only during development or when a unit is bricked.

$ cd utils

$ tar -xjvf elin-w160-evk-v2.0.0.0.tar.bz2

elin-w160-evk-v2.0.0.0/

elin-w160-evk-v2.0.0.0/u-boot-spl.bin

elin-w160-evk-v2.0.0.0/core-image-ublox-dev-elin-w160-evk.manifest

elin-w160-evk-v2.0.0.0/zImage-am335x-elin-w160-evk.dtb

elin-w160-evk-v2.0.0.0/u-boot.img

elin-w160-evk-v2.0.0.0/zImage

elin-w160-evk-v2.0.0.0/core-image-ublox-dev-elin-w160-evk.ubi

elin-w160-evk-v2.0.0.0/MLO

elin-w160-evk-v2.0.0.0/modules-elin-w160-evk.tgz

$ sudo apt-get install dfu-util

/

└── elin-w16-releases/

├── elin-w160-evk-v2.0.0.0.tar.bz2

├── README

└── utils

└──elin-w16-flashload.sh

Page 24: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Factory restore

Page 24 of 38

To set the ELIN-W160 in DFU mode:

Then on the PC, run the elin-w16-flashload.sh script:

On completion of the firmware download, the ELIN-W160 will reboot into your newly flashed system.

$ sudo ./elin-w16-flashload.sh all ../elin-w160-evk-v2.0.0.0

dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.

Copyright 2010-2012 Tormod Volden and Stefan Schmidt

This program is Free Software and has ABSOLUTELY NO WARRANTY

Please report bugs to [email protected]

...

...

Copying data from PC to DFU device

Starting download: [##################################################] finished!

state(2) = dfuIDLE, status(0) = No error condition is present

Done!

Resetting USB to switch back to runtime mode

U-Boot# dfu nand 0

using id 'nand0,0'

using id 'nand0,1'

using id 'nand0,2'

using id 'nand0,3'

using id 'nand0,4'

using id 'nand0,5'

using id 'nand0,6'

using id 'nand0,7'

using id 'nand0,8'

using id 'nand0,9'

using id 'nand0,10'

GADGET DRIVER: usb_dnl_dfu

musb-hdrc: peripheral reset irq lost!

U-Boot# nand erase.chip

NAND erase.chip: device 0 whole chip

Erasing at 0x1ffe0000 -- 100% complete.

OK

Page 25: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Build and install package

Page 25 of 38

5 Build and install package The Yocto provides a package manager, which allows for upgrade of existing programs and user space

applications. While building the target images, Yocto also generates the packages that can be downloaded to the target through the package manager.

The default package manager on the ELIN-W160 is OPKG package manager. You can easily setup a local

package server using Apache through a few configuration steps or you can setup a NFS folder.

5.1 Package server

On your development machine, install Apache2 and create repo:

Add the following section to your apache2 configuration script in

Replace the path

To match with your yocto directory

On some systems, you might have to add permissions to the directory for it to be accessible. The following code

grants access to the folder. See the Apache2 documentation for more information.

To restart apache:

Or

In the bitbake folder, update the package index:

You now have a package server that contains the latest build packages from your Yocto build directory. To set up the target to sync with the server, OPKG must be configured with the server location and ipk channels. Add

your PC:s USB ip address to the OPKG base feeds.

# echo 'src/gz ublox http://192.168.1.1/ipk/armv7a-vfp-neon' > /etc/opkg/ublox-base.conf

$ bitbake package-index

# sudo /etc/init.d/apache2 restart

# service apache2 restart

Alias /ipk /home/username/projects/ublox-tools/yocto/poky/tmp/deploy/ipk

<Directory /home/username/projects/ublox-tools/yocto/poky/tmp/deploy/ipk>

Order Allow,Deny

Allow from all

Require all granted

Options +Indexes

</Directory>

Alias /ipk /home/username/projects/ublox-tools/yocto/poky/tmp/deploy/ipk

<Directory /home/username/projects/ublox-tools/yocto/poky/tmp/deploy/ipk>

Options +Indexes

</Directory>

/home/username/projects/ublox-tools/yocto/poky/tmp/deploy/ipk

/etc/apache2/sites-available/default

$ sudo apt-get install apache2

Page 26: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Build and install package

Page 26 of 38

You can now update and recompile packages on your host machine and easily download them to your target.

Update the opkg feed on the target to sync the package streams:

5.2 Sample Python package

To test the setup of the package, python is downloaded and built via build tool bitbake. In the build directory,

start the build of the python-core package (the terminal must have sourced the ublox-init-build-env script!).

$ bitbake python-core

Loading cache: 100% |############################################################################| ETA: 00:00:00

Loaded 2159 entries from dependency cache.

NOTE: Resolving any missing task queue dependencies

Build Configuration:

BB_VERSION = "1.26.0"

BUILD_SYS = "x86_64-linux"

NATIVELSBSTRING = "Debian-7.4"

TARGET_SYS = "arm-poky-linux-gnueabi"

MACHINE = "elin-w160-evk"

DISTRO = "poky"

DISTRO_VERSION = "1.8.1"

TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard cortexa8"

TARGET_FPU = "vfp-neon"

meta

meta-yocto = "fido:b74ea963cefffad9fbd91d4eb9b240f6a8c86cd0"

meta-ublox = "fido:47dbe3a66a06bd321966107197c6682a1a4337a2"

meta-ublox-extras = "fido:52e11ebf56bfc4a3100284ea97d94d9aef296563"

meta-python

meta-networking

meta-oe

meta-webserver = "fido:df2f700d66bace65f5d802225232d01cf511fe81"

NOTE: Preparing runqueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

0: python-2.7.3-r0.3 do_compile (pid 10561)

...

# opkg update

Page 27: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Build and install package

Page 27 of 38

On completion, you can install python on your target. First update your package feed to get the newly compiled python package.

Whenever you build or update a package on the host machine, you should also update the package-index.

Otherwise, the new packages will not be indexed in the package feed.

$ bitbake package-index

root@ELIN-W16-evk:~# opkg install python-core

Installing python-core (2.7.3-r0.3) to root...

Downloading http://192.168.1.1/ipk/armv7a-vfp-neon/python-core_2.7.3-r0.3_arm.

Installing python-re (2.7.3-r0.3) to root...

Downloading http://192.168.1.1/ipk/armv7a-vfp-neon/python-re_2.7.3-r0.3_armv7.

Installing python-core (2.7.3-r0.3) to root...

Breaking cicular dependency on python-core for python-re.

Installing libpython2.7-1.0 (2.7.3-r0.3) to root...

Downloading http://192.168.1.1/ipk/armv7a-vfp-neon/libpython2.7-1.0_2.7.3-r0..

Installing python-lang (2.7.3-r0.3) to root...

Downloading http://192.168.1.1/ipk/armv7a-vfp-neon/python-lang_2.7.3-r0.3_arm.

Installing python-core (2.7.3-r0.3) to root...

Breaking cicular dependency on python-core for python-re.

Breaking cicular dependency on python-core for libpython2.7-1.0.

Breaking cicular dependency on python-core for python-lang.

Installing python-readline (2.7.3-r0.3) to root...

Downloading http://192.168.1.1/ipk/armv7a-vfp-neon/python-readline_2.7.3-r0.3.

Installing libncursesw5 (5.9-r15.1) to root...

Downloading http://192.168.1.1/ipk/armv7a-vfp-neon/libncursesw5_5.9-r15.1_arm.

Configuring python-re.

Configuring libpython2.7-1.0.

/sbin/ldconfig: /usr/lib/libnl.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-nf.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-route.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-genl.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-cli.so.2 is not a symbolic link

Configuring python-lang.

Configuring python-core.

Configuring libncursesw5.

/sbin/ldconfig: /usr/lib/libnl.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-nf.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-route.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-genl.so.2 is not a symbolic link

/sbin/ldconfig: /usr/lib/libnl-cli.so.2 is not a symbolic link

Configuring python-readline.

#

root@ELIN-W16-evk:~# opkg update

Downloading http://192.168.1.1/ipk/armv7a-vfp-neon/Packages.gz.

Inflating http://192.168.1.1/ipk/armv7a-vfp-neon/Packages.gz.

Updated list of available packages in /var/lib/opkg/ublox.

Page 28: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Overview of Yocto meta layers

Page 28 of 38

6 Overview of Yocto meta layers The software framework on which Yocto is based on is OpenEmbedded Core and it consists of several different

layers.

Figure 6: Meta layer stack on Yocto

The ELIN-W160 provides all layers up to the application layer. The dependency is resolved in the setup script

provided in the ublox-tools repository. For detailed information regarding the meta-layers, see the Yocto project documentation. See the below-mentioned sections for information on how the layers relate to each other.

6.1 Developer layer

At the top level, the developer may add his/her own configuration of applications and required tools to make the build match his/her requirements.

6.2 Application layer

This is the layer which the applications, packages and policies for the end product are defined.

6.3 u-blox layers

u-blox provides the following two layers:

meta-ublox

o Hardware specific layer for mandatory packages and configuration

o Do not override or modify as it might void warranty and regulatory requirements.

meta-ublox-extras

o Example configuration of applications and tools for running the ELIN-W16

o Provides the default interfaces

Page 29: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Overview of Yocto meta layers

Page 29 of 38

6.3.1 meta-ublox Layer

meta-ublox

├── conf

│ ├── layer.conf

│ └── machine

│ ├── elin-w160-evk.conf

│ └── include

│ └── elin-w160.inc

├── COPYING.MIT

├── README

├── recipes-bsp

│ ├── elin-eeprom-reader

│ │ ├── elin-eeprom-reader

│ │ │ └── elin-w16-radio-params

│ │ └── elin-eeprom-reader_001.bb

│ ├── ti-bt-firmware

│ │ └── ti-bt-firmware_git.bb

│ ├── ti-utils

│ │ ├── ti-utils

│ │ │ └── libnl3.patch

│ │ └── ti-utils_001.bb

│ ├── ublox-srr-firmware

│ │ └── ublox-srr-firmware_001.bb

│ └── u-boot

│ ├── u-boot-fw-utils-ublox

│ │ └── elin-w160-evk

│ │ └── fw_env.config

│ ├── u-boot-fw-utils-ublox_git.bb

│ └── u-boot-ublox_git.bb

├── recipes-connectivity

│ └── crda

│ └── crda_1.1.3.bb

├── recipes-core

│ └── udev

│ ├── udev

│ │ └── init

│ └── udev_182.bbappend

└── recipes-kernel

└── linux

├── linux-ublox

│ └── elin-w160-evk

│ └── defconfig

├── linux-ublox_3.19.bb

└── linux-ublox.inc

Page 30: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Overview of Yocto meta layers

Page 30 of 38

The meta-ublox layer contains a conf directory that holds information about the machine configuration. The machine configuration contains information about the target architecture and the supported machine features

such as Bluetooth, USB, Wi-Fi, and also the supported images and file system types such as UBI tar.bz2 and so

on.

The recipes-bsp layer contains hardware specific recipes for u-boot and radio configuration. The radio directories

(calibrator, ti-bt-firmware, ublox-eeprom-parser) should not be altered as they are a part of the regulatory

compliance. Any modification to these layers might void the u-blox warranty and breaks the regulatory requirements.

The U-Boot layer can be updated but should be done with great care as it can brick your device thus requiring a

factory reset.

6.3.2 meta-ublox-extras Layer

The meta-ublox-extras layer contains several applications for evaluating the performance and possibilities of the ELIN-W160 platform.

The conf/distro folder contains information regarding the policies for the distribution. The distribution features

and the machine feature will be matched to determine the packages that will be installed. For more information, see the Yocto project documentation.

$ cat conf/machine/include/ELIN-W16.inc

# u-blox ELIN-W160 System on Module machine configuration

SOC_FAMILY = "ti33x"

require conf/machine/include/soc-family.inc

DEFAULTTUNE ?= "cortexa8thf-neon"

require conf/machine/include/tune-cortexa8.inc

PREFERRED_PROVIDER_virtual/kernel ?= "linux-ublox"

PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ublox"

KERNEL_IMAGETYPE = "zImage"

UBOOT_ARCH = "arm"

UBOOT_MACHINE ?= "elin-w160-evk"

UBOOT_ENTRYPOINT ?= "0x80008000"

UBOOT_LOADADDRESS ?= "0x80008000"

MKUBIFS_ARGS = "-F -m 2048 -e 124KiB -c 3488"

UBINIZE_ARGS = "-m 2048 -p 128KiB"

UBI_VOLNAME = "rootfs"

USE_VT = "0"

MACHINE_FEATURES = "bluetooth wifi"

MACHINE_EXTRA_RRECOMMENDS = "crda ublox-srr-firmware elin-eeprom-reader"

EXTRA_IMAGEDEPENDS += "virtual/bootloader"

$ cat conf/machine/ELIN-W16-evk.conf

#@TYPE: Machine

#@NAME: ELIN-W160-EVK

#@DESCRIPTION: Machine configuration for u-blox ELIN-W160-EVK evalutation kit

require conf/machine/include/elin-w160.inc

IMAGE_FSTYPES += "ubi tar.bz2"

KERNEL_DEVICETREE = "am335x-elin-w160-evk.dtb"

UBOOT_MACHINE = "elin-w160-evk_config"

SERIAL_CONSOLE = "115200 ttyO0"

MACHINE_FEATURES = "bluetooth ext2 serial usbgadget usbhost vfat wifi"

MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"

Page 31: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Overview of Yocto meta layers

Page 31 of 38

The following programs and packages are installed on the target:

AVAHI mDNS

Bluez5 + hcidump

uDHCP daemon

bash

hostapd

bridge-utilsiperf

Hiawatha web server

tcpdump

procps

ppp

socat

The layer also includes following configuration settings:

Network setup

fstab for mounting file systems

o Used by USB gadget to populate Ethernet-Over-USB and USB to Serial

BusyBox config

USB gadget drivers

6.3.3 Yocto, OpenEmbedded, and TI layers

The Yocto, OpenEmbedded, and TI layers contain the key information on which the u-blox layers are created upon. The u-blox layers require a specific revision of the layers and are managed by the setup script.

6.4 Working with the meta layers

Sometimes, it is necessary to modify or override the settings in a layer. The default way to modify the layers is by

creating an override layer with a high priority. Bitbake will parse all layers specified in the bblayers.conf and

resolve the dependencies and priorities.

6.4.1 Creating a new meta layer

Yocto provides a script that assists in creating new meta layers.

Goto the poky directory and source the ublox-init-build-env file and then start the Yocto layer setup script. Choose default priority and create an example recipe named bar. Skip creating a bbappend file.

$ cd poky

$ source ublox-init-build-env

$ cd ..

$ yocto-layer create foobar

yocto-layer create foobar

Please enter the layer priority you'd like to use for the layer: [default: 6] 6

Would you like to have an example recipe created? (y/n) [default: n] y

Please enter the name you'd like to use for your example recipe: [default: example] bar

Would you like to have an example bbappend file created? (y/n) [default: n] n

New layer created in meta-foobar.

Don't forget to add it to your BBLAYERS (for details see meta-foobar\README).

Page 32: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Overview of Yocto meta layers

Page 32 of 38

Find below is a snapshot of the newly created folder meta-foobar:

The configuration file for the new meta layer is created by the script. The script also adds a hello_world example

program and a bitbake recipe to build the program.

$ cat meta-foobar/recipes-example/example/bar_0.1.bb

#

# This file was derived from the 'Hello World!' example recipe in the

# Yocto Project Development Manual.

#

DESCRIPTION = "Simple helloworld application"

SECTION = "examples"

LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

PR = "r0"

SRC_URI = "file://helloworld.c"

S = "${WORKDIR}"

do_compile() {

${CC} helloworld.c -o helloworld

}

do_install() {

install -d ${D}${bindir}

install -m 0755 helloworld ${D}${bindir}

}

meta-foobar/

├── conf

│ └── layer.conf

├── COPYING.MIT

├── README

└── recipes-example

└── example

├── bar-0.1

│ ├── example.patch

│ └── helloworld.c

└── bar_0.1.bb

Page 33: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Overview of Yocto meta layers

Page 33 of 38

To build the program run:

Yocto will now index the new meta layer, find the bar recipe, and build the application. It is not included in the

final image though as it was not listed to be included. To add the program to the image, you need to add it to

the default image.

6.4.2 Overriding or modifying a meta layer or an image

To add a new application to the image, you can use overrides or modify an existing layer. If you are not the

maintainer of the layer, you should use an override layer.

To add the application bar from the example specified in the previous chapter, create and bbappend recipe to

include the application in the final image.

$ source ublox-init-build-env

$ bitbake bar

$ cat meta-foobar/recipes-example/example/bar-0.1/helloworld.c

#include <stdio.h>

int main(int argc, char **argv)

{

printf("Hello World!\n");

return 0;

}

To build the new recipe, add the meta layer to the bblayers.conf:

$ vi build/conf/bblayers.conf

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf

# changes incompatibly

LCONF_VERSION = "6"

BBPATH = "${TOPDIR}"

BBFILES ?= ""

BBLAYERS ?= " \

/home/martin/projects/yocto/poky/meta \

/home/martin/projects/yocto/poky/meta-yocto \

/home/martin/projects/yocto/poky/meta-ti \

/home/martin/projects/yocto/poky/meta-openembedded/meta-oe \

/home/martin/projects/yocto/poky/meta-openembedded/meta-webserver \

/home/martin/projects/yocto/poky/meta-ublox \

/home/martin/projects/yocto/poky/meta-ublox-extras \

/home/martin/projects/yocto/poky/meta-foobar \ # << Add me

"

BBLAYERS_NON_REMOVABLE ?= " \

/home/martin/projects/yocto/poky/meta \

/home/martin/projects/yocto/poky/meta-yocto \

"

Page 34: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Overview of Yocto meta layers

Page 34 of 38

Bitbake should now regenerate the rootfs with the package bar installed.

For more information regarding overriding settings in the meta layers, refer to the Yocto project documentation.

$ cd meta-foobar

$ mkdir -p recipes-core/image

$ cd recipes-core/image

$ echo 'CORE_IMAGE_EXTRA_INSTALL += "bar"' > ublox-image-dev.bbappend

$ cd ../../../build

$ bitbake core-image-ublox-dev

Loading cache: 100% |############################################################################################| ETA: 00:00:00

Loaded 1834 entries from dependency cache.

NOTE: Resolving any missing task queue dependencies

Build Configuration:

BB_VERSION = "1.26.0"

BUILD_SYS = "x86_64-linux"

NATIVELSBSTRING = "Debian-7.4"

TARGET_SYS = "arm-poky-linux-gnueabi"

MACHINE = "elin-w160-evk"

DISTRO = "poky"

DISTRO_VERSION = "1.8.1"

TUNE_FEATURES = "armv7a vfp thumb neon callconvention-hard cortexa8"

TARGET_FPU = "vfp-neon"

meta

meta-yocto = "daisy:240da756168b58eb05300a23c8282942f913db2d"

meta-ublox = "daisy:d69d5d53a23e57893620d2705465aaeabdc060c0"

meta-ublox-extras = "daisy:c1650f641257d9487fb5aef75f66f3f423433a3a"

meta-networking

meta-oe

meta-webserver = "daisy:d3d14d3fcca7fcde362cf0b31411dc4eea6d20aa"

NOTE: Preparing runqueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

NOTE: Tasks Summary: Attempted 2867 tasks of which 2863 didn't need to be rerun and all succeeded.

Page 35: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Appendix

Page 35 of 38

Appendix

A Glossary Abbreviation / Term Explanation / Definition

ACM Abstract Control Model

CPU Central Processing Unit

CTS Clear To Send

DFU Device Firmware Upgrade

DHCP Dynamic Host Configuration Protocol

EVK Evaluation Kit

GPIO General-Purpose Input/Output

LED Light-Emitting Diode

NFS Network File System

OEM Original equipment manufacturer

OPKG Open PacKaGe Management

OTG On-The-Go

PHY Physical Layer

RAM Random-Access Memory

RTS Request To Send

SPP Serial Port Profile

UART Universal Asynchronous Receiver-Transmitter serial interface

UBI Unsorted block images

UDP User Datagram Protocol

USB Universal Serial Bus

WLAN Wireless Local Area Network

Table 4: Explanation of abbreviations used

Page 36: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Appendix

Page 36 of 38

B Policies and configuration Interface/Service Package/Policy Comment

Console UART0 115200 8N1, via FTDI chip

Shell ash

Device Manager udev

Logging daemon syslog

Services

hiawatha web server /etc/hiawatha/hiawatha.conf

Avahi mDNS /etc/

uDHCP client

uDHCP server /etc/udhcpd.conf (used for USB0)

wpa_supplicant /etc/wpa_supplicant.conf

Bluetooth Bluez5 /etc/init.d/bluetooth

Network interfaces

eth0, DHCP

eth1, DHCP

wlan0, off, DHCP

usb0, static ip 192.168.32.1

USB

USB0 Device USB Gadget via configfs:

USB CDC/NCM (Ethernet Over USB)

USB ACM (USB serial port)

USB1 Host

opkg /etc/opkg/opkg.conf

No default package feeds.

Table 5: Policies and configuration

Page 37: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Related documents and links

Page 37 of 38

Related documents and links [1] ELIN-W1 System Integration Manual, Document Number UBX-15011162

[2] ELIN-W1 Data Sheet, Document Number UBX-15011161

[3] u-blox Package Information Guide, Document Number UBX-14001652

[4] Yocto project quick start - http://www.yoctoproject.org/docs/2.0/yocto-project-qs/yocto-project-

qs.html

[5] Yocto project cookbook item that explains how to add startup scripts to a Yocto image -

https://wiki.yoctoproject.org/wiki/Cookbook:Appliance:Startup_Scripts

[6] Help section on GitHub - https://help.github.com/.

Revision history Revision Date Name Status / Comments

R01 5-Jun-2015 mjer Initial release.

R02 1-Mar-2016 mjer,fbro,msen, kgom

Document status updated to Advance Information. Updated the instructions. Applied u-blox word template. Updated to ELIN FW rev 2.0.0.0. Editorial updates.

Page 38: EVK-W16 User Guide - U-bloxUBX... · ODIN-W160 modules User Guide Abstract ... EVK-W16 - User Guide UBX-15017061 - R02 Advance Information Contents Page 2 of 38 Document Information

EVK-W16 - User Guide

UBX-15017061 - R02 Advance Information Contact

Page 38 of 38

Contact For complete contact information visit us at www.u-blox.com.

u-blox Offices

North, Central and South America

u-blox America, Inc.

Phone: +1 703 483 3180 E-mail: [email protected]

Regional Office West Coast:

Phone: +1 408 573 3640 E-mail: [email protected]

Technical Support:

Phone: +1 703 483 3185 E-mail: [email protected]

Headquarters Europe, Middle East, Africa

u-blox AG

Phone: +41 44 722 74 44

E-mail: [email protected]

Support: [email protected]

Asia, Australia, Pacific

u-blox Singapore Pte. Ltd.

Phone: +65 6734 3811 E-mail: [email protected]

Support: [email protected]

Regional Office Australia:

Phone: +61 2 8448 2016

E-mail: [email protected]

Support: [email protected]

Regional Office China (Beijing):

Phone: +86 10 68 133 545

E-mail: [email protected] Support: [email protected]

Regional Office China (Chongqing):

Phone: +86 23 6815 1588 E-mail: [email protected]

Support: [email protected]

Regional Office China (Shanghai):

Phone: +86 21 6090 4832 E-mail: [email protected]

Support: [email protected]

Regional Office China (Shenzhen):

Phone: +86 755 8627 1083

E-mail: [email protected]

Support: [email protected]

Regional Office India:

Phone: +91 80 4050 9200 E-mail: [email protected]

Support: [email protected]

Regional Office Japan (Osaka):

Phone: +81 6 6941 3660 E-mail: [email protected]

Support: [email protected]

Regional Office Japan (Tokyo):

Phone: +81 3 5775 3850 E-mail: [email protected]

Support: [email protected]

Regional Office Korea:

Phone: +82 2 542 0861

E-mail: [email protected] Support: [email protected]

Regional Office Taiwan:

Phone: +886 2 2657 1090 E-mail: [email protected]

Support: [email protected]