From Estone Technology Wiki
Revision as of 18:06, 30 April 2019 by Charles (Talk | contribs) (Setting up the Ubuntu development host)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Technical Specification

Compiling PPC-4207 Yocto Image

Setup Yocto Environment

  • Please follow these instructions to setup the yocto environment before compiling the ppc-4207 image

All the following steps have been tested on Ubuntu 16.04.6 LTS. An Internet connection is required to finish this tutorial.

  • Check and install update for Ubuntu by inputing the following commands to shell.
$ sudo apt-get update

Setting up the Ubuntu development host

Open a terminal on host machine(Ubuntu 16.04.6 LTS). Input the following commands to install the pre-required tools:

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

Installing and configuring Git

$ sudo apt-get update
$ sudo apt-get install git
$ git config --global user.name "First Last"
$ git config --global user.email "first.last@company.com"

Installing SDK

Download here


sh poky-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-2.1.3.sh

Compiling Kernel

git clone -b imx_3.14.52_1.1.0_ga https://github.com/estonetechnology/imx6qdl-linux-kernel.git
source /opt/poky/2.1.3/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
export ARCH=arm
export CROSS_COMPILE=arm-poky-linux-gnueabi-
make hio-imx6dl-ppc4207_defconfig 
make hio-imx6dl-ppc4207.dtb

Files require:

zImage (imx6qdl-linux-kernel/arch/arm/boot/zImage)
hio-imx6dl-ppc4207.dtb (imx6qdl-linux-kernel/arch/arm/boot/dts/hio-imx6dl-ppc4207.dtb)

Compiling U-boot

git clone -b imx_v2015.04_3.14.52_1.1.0_ga https://github.com/estonetechnology/ppc-4510-linux-uboot
source /opt/poky/2.1.3/environment-setup-cortexa9hf-neon-poky-linux-gnueabi 
export ARCH=arm 
export CROSS_COMPILE=arm-poky-linux-gnueabi- 
make hio-imx6dl-board_spl_defconfig 

Files require:


Compiling Rootfs

  • Repo utility installation:
$ mkdir ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
  • Getting source code:
$ PATH=${PATH}:~/bin
$ mkdir fsl-community-bsp
$ cd fsl-community-bsp
$ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b krogoth
$ repo sync
$ cd sources/
$ git clone -b krogoth https://github.com/meta-qt5/meta-qt5.git
$ git clone -b krogoth https://github.com/estonetechnology/meta-hio.git
$ git clone -b krogoth git://git.yoctoproject.org/meta-mono
$ cd fsl-community-bsp
$ . ./setup-environment build

Note: From the Build choose 1 set of these 3 configurations "bblayers.conf" & "local.conf" to move to conf/ directory depending on the desired configuration

$ mv ../sources/meta-hio/conf/hio-full-cmdline-example-local.conf conf/local.conf
$ mv ../sources/meta-hio/conf/hio-full-cmdline-example-bblayers.conf conf/bblayers.conf
$ mv ../sources/meta-hio/conf/hio-qt5-fb-example-local.conf conf/local.conf
$ mv ../sources/meta-hio/conf/hio-qt5-fb-example-bblayers.conf conf/bblayers.conf
$ mv ../sources/meta-hio/conf/hio-x11-example-local.conf conf/local.conf
$ mv ../sources/meta-hio/conf/hio-x11-example-bblayers.conf conf/bblayers.conf

bitbake image

$ bitbake core-image-full-cmdline

Compiled image: core-image-full-cmdline-hio-imx6dl-iob3200.tar.bz2 (fsl-community-bsp/build/tmp/deploy/images/hio-imx6dl-iob3200/core-image-full-cmdline-hio-imx6dl-iob3200.tar.bz2)

Flashing Image

  • Preparation:

Set the boot switch to "2"


Connect the board to a Windows OS host using OTG cable.


Extract the MFG file and run MfgTool2.exe. The device will be recognized as HID-compliant device.
Click Start to flash the image.
The flashing process is done once two processing bars turned to green.
Now, click Stop and Exit the tool.

  • Starting up:

Set the boot switch to "1"


Plug in the Ethernet cable and power on




Follow these below commands:

/home/brcm_patchram_plus -d --patchram /lib/firmware/bcm/bcm43438a1.hcd --baudrate 115200 --enable_lpm --enable_hci --no2bytes /dev/ttymxc4 & 
rfkill unblock all
hciconfig hci0 up
hciconfig -a

The screen will output a result as below


Perform a scan for Bluetooth devices

hcitool scan

Output result:


Connect to recognized device

hcitool cc 80:ED:2C:55:xx:xx; hcitool auth 80:ED:2C:55:xx:xx


  • Ethernet connection

Plug the network cable in, the unit will get an IP address from DHCP server.

Note: In case of failure, follow commands below:

# ifconfig eth0 up
# udhcpc

Check the IP address:

# ifconfig 

This command will show you what is the IP address.

Ex: IP address: (It is various depending on the DHCP server settings)

Check connection:

# ping (ping a host at the same network)
# ping www.habeyusa.com (It would be successful if the network connects to the Internet)
  • Wifi connection

Enable the Wifi interface:

# ifconfig wlan0 up

Scan wifi hotspots:

# iwlist wlan0 scan 

Modify the wifi configuration file according to Router Setting:

# cd /usr/share/wifi
# nano wpa_supplicant.conf

Input the SSID and the password of Router in the specified position:

  pairwise=TKIP CCMP
  group=CCMP TKIP WEP104 WEP40

Run the following command, then acquire the IP address dynamically from Router's DHCP service:

# wpa_supplicant –Dwext –iwlan0 –c ./wpa_supplicant.conf –B
# udhcpc –i wlan0

Check connection:

# ifconfig -a
# ping (an IP address from same local network)
  • Bandwidth:

From Terminal 1:

# ifconfig (Ex: IP address is
# iperf -s (to set up as a server)

From Terminal 2:

# iperf -c

The result will show the bandwidth as Mb/s as below.
Note: The bandwidth is various depending on the LAN bandwidth.

Modbus Test

Port configuration:

Emb2230 Modbus.png
Emb2230 Modbus1.png

For ports configured as picture below:



Devices need to be set up at the same settings:

Baud rate: 115200
Parity: None
Data bits: 8 bit
Stop bits: 1 bit

# stty -F /dev/ttymxc2 115200 cs8 -cstopb


# echo "transmit test" > /dev/ttymxc2


# cat /dev/ttymxc2


Read from ttymxc3

# stty -F /dev/ttymxc3 115200 raw -echo
# cat /dev/ttymxc3

Send from ttymxc3

# stty -F /dev/ttymxc3 115200 raw -echo
# echo Hello World > /dev/ttymxc3


Emb2230 gpio mod.png

Connect pin 1, 2:

Terminal 1:

# cd /sys/class/gpio
# echo 116 > export
# echo "out" > gpio116/direction
# echo 1 > gpio116/value
# echo 0 > gpio116/value

Terminal 2:

# cd /sys/class/gpio
# echo 114 > export
# echo "in" > gpio114/direction
# cat gpio114/value (read echo 1)
# cat gpio114/value (read echo 0)

40-pin Header Test

Emb2230 40pin.png


Emb2230 gpio.png

Loopback method is used to test these pins.

Pin 21, 22:

Terminal 1:

# cd /sys/class/gpio
# echo 117 > export
# echo "out" > gpio117/direction
# echo 1 > gpio117/value
# echo 0 > gpio117/value

Terminal 2:

# cd /sys/class/gpio
# echo 93 > export
# echo "in" > gpio93/direction
# cat gpio93/value (read the echo 1)
# cat gpio93/value (read the echo 0)

Pin 23, 24:

Terminal 1:

# cd /sys/class/gpio
# echo 118 > export
# echo "out" > gpio118/direction
# echo 1 > gpio118/value
# echo 0 > gpio118/value

Terminal 2:

# cd /sys/class/gpio
# echo 5 > export
# echo "in" > gpio5/direction
# cat gpio5/value (read the echo 1)
# cat gpio5/value (read the echo 0)

Pin 25, 26:

Terminal 1:

# cd /sys/class/gpio
# echo 119 > export
# echo "out" > gpio119/direction
# echo 1 > gpio119/value
# echo 0 > gpio119/value

Terminal 2:

# cd /sys/class/gpio
# echo 6 > export
# echo "in" > gpio6/direction
# cat gpio6/value (read the echo 1)
# cat gpio6/value (read the echo 0)

Pin 27, 28:

Terminal 1:

# cd /sys/class/gpio
# echo 120 > export
# echo "out" > gpio120/direction
# echo 1 > gpio120/value
# echo 0 > gpio120/value

Terminal 2:

# cd /sys/class/gpio
# echo 111 > export
# echo "in" > gpio111/direction
# cat gpio111/value (read the echo 1)
# cat gpio111/value (read the echo 0)

Pin 29, 30:

Terminal 1:

# cd /sys/class/gpio
# echo 92 > export
# echo "out" > gpio92/direction
# echo 1 > gpio92/value
# echo 0 > gpio92/value

Terminal 2:

# cd /sys/class/gpio
# echo 110 > export
# echo "in" > gpio110/direction
# cat gpio110/value (read the echo 1)
# cat gpio110/value (read the echo 0)


Connect pin 39, 40:

Send from ttymxc0:

Terminal 1:

# stty -F /dev/ttymxc0 115200 raw -echo
# echo "hello" > /dev/ttymxc0

Terminal 2:

Read from ttymxc0:

# stty -F /dev/ttymxc0 115200 raw -echo
# cat /dev/ttymxc0


When a USB is connected, it will be detected automatically and a message will be printed in the console screen.

Ex: Screen below is shown when a USB flash drive connected.


To access to the usb flash drive, it must firstly be mounted.

# mkdir /mnt/usb
# mount /dev/sda1 /mnt/usb

Now, access to the usb drive content:

# ls /mnt/usb


To unplug the usb flash drive, it should firstly be unmounted:

# umount /mnt/usb

Note: Repeat this method for another USB ports.

SD Card

When a SD card is inserted, it will be recognized automatically and a message will show in the console as below.


To test the card to see if it is usable:

# mkdir /mnt/sdcard
# mount /dev/mmcblk0p1 /mnt/sdcard

Check to see if it is mounted:


To see the content:

# ls /mnt/sdcard


Unmount the card before removing out:

# umount /mnt/sdcard

Creating Ubuntu Image

Creating Android Image