Archive

Posts Tagged ‘tutorial’

CubieTruck Metal Case Kit Getting Started Guide and Review

December 21st, 2014 2 comments

I’ve received CubieTruck Metal Case kit just over a month ago, but just like for Ubuntu on ODROID-XU3 Lite, the board could not get HDMI EDID info from my Panasonic TV, which led to a crash at boot time. CubieTech has now fixed the issue, so I’ve finally been able to complete the review with Cubieez (Cubie Easy) distribution, pre-installed on the board, and based on Debian 7.6. You can get the full hardware specs on my previous post, but the kits is comprised of four parts: CubieTruck development based on Allwinner A20 dual core processor, a rugged metallic enclosure, a 128GB SSD, and a 5,300 mAh battery acting as a UPS. I’ll start by showing how to setup the board, test SATA and Gigabit Ethernet performance,  check if the battery acts as expected, try to use the board as a desktop replacement with LibreOffice, Chromium, and so on, and run Phoronix Benchmark. I’ll also explain how to mvoe the rootfs from NAND flash to SSD to extract more performance from the kit.

Getting Started with CubieTruck Board

Even though the board is pre-loaded with Cubieez 2.1, it’s still good to know how to flash the image by yourself, and do the initial setup.

There are some tutorials for CuebiTruck, but the one dedicated to Cubieez is completely empty at the time of writing.

But the important part is to know that the firmware can be found @ http://dl.cubieboard.org/model/cubietruck/Image/Cubieez/ with images for HDMI or VGA output, and NAND flash or SD card boot.

So this is what I had to do to reflash Cubieez (Cubieez 2.2 has been released since then, probably with a fix with my HDMI issue):

wget http://dl.cubieboard.org/model/cubietruck/Image/Cubieez/cubieez-hdmi-v2.1/cubieez-ct-nand-hdmi-v2.1.img.7z
7z x cubieez-ct-nand-hdmi-v2.1.img.7z

You’ll need LiveSuit (Linux or Mac), or PhoenixSuit (Windows) to flash the firmware, which you can download here. I’ve already explained how to install LiveSuit to flash firmware on A80 OptimusBoard, and the procedure is the same for all Allwinner devices. Once the installation is complete simply run:

~/Bin/LiveSuit/LiveSuit.sh

And load the uncompressed image (cubieez-ct-nand-hdmi-v2.1.img) as shown below:

LiveSuit_CubieTruck

Now connect a micro USB to USB cable between your computer, and CubieTruck OTG port, press the FEL button on the right side, power on the kit, and flash should complete automatically.

Then you can just reboot the board, and it should boot into LXDE, unfortunately for me, it did not work that way, and all I could see was the boot log on my HDMI TV.  So I asked some help on CubieBoard Google group, and got some help one or two days later pointing me in the right direction. However, it may have been better to ask on Cubieforums.com, these forums are more active than on Google group.

Nevertheless, the issue was a segfault reported in /var/log/Xorg.0.log:

[    47.423] (II) FBTURBO(0): using /dev/fb0
[    47.423] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    47.423] (**) FBTURBO(0): Depth 24, (–) framebuffer bpp 32
[    47.423] (==) FBTURBO(0): RGB weight 888
[    47.423] (==) FBTURBO(0): Default visual is TrueColor
[    47.423] (==) FBTURBO(0): Using gamma correction (1.0, 1.0, 1.0)
[    47.424] (II) FBTURBO(0): hardware:  (video memory: 16200kB)
[    47.424] (**) FBTURBO(0): Option “fbdev” “/dev/fb0″
[    47.424] (**) FBTURBO(0): Option “SwapbuffersWait” “true”
[    47.427] (II) FBTURBO(0): processor: ARM Cortex-A7
[    47.429] (EE) FBTURBO(0): Unknown EDID version 0
[    47.429]
[    47.430] Backtrace:
[    47.430]
[    47.431] Segmentation fault at address 0x8
[    47.432]
Fatal server error:
[    47.432] Caught signal 11 (Segmentation fault). Server aborting
[    47.432]

The bold line showed that my TV did not return EDID information, and fbturbo did not check for this case. So CubieTech sent me an updated fbturbo_drv.so, which I copied to  /usr/lib/xorg/modules/drivers/, and I was finally able to access the login prompt in LXDE. I believe this fix must be included in Cubieez 2.2 image.

You can login with cubie / cubieboard, or root / cubieboard. I normally prefer running the system as a user, and run sudo when needed, so I logged in with cubie user.

Cubieez

Cubieez LXDE Desktop (Click for Original Size)

Cubieez features LXDE running on top of Debian 7.6 with Linux 3.4.79, and the default resolution is set to 1080p50, but you can click on Monitor Settings to change the resolution as needed.

The README recommends to run cubie-config in LXTerminal the first time, so let’s do that.

Cubie_configExpand Filesystem is only used for SD card images. Internationalisation Options lets you change the locale, timezone, and keyboard layout, and you can change the hostname, and enable/disable SSH in Advanced Options. Once you;’re done, select Finish, and you may have to reboot.

You’ll probably want to install some packages with apt-get or the Software Center, but the repositories are set to Spanish mirror, and changing the mirrors to one in your country may speed up download a lot. Changing from Spain to Thailand, increased the download speed with apt-get by 10 times in my case.

You can find the list of mirrors @ https://www.debian.org/mirror/list, once you have found the right mirror for your country, edit the source list:

sudo vi /etc/apt/sources.list

And replace

deb http://ftp.es.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free

by your country’s mirror. For example:

deb http://ftp.th.debian.org/debian stable main contrib non-free
deb http://ftp.th.debian.org/debian/ wheezy-updates main contrib non-free

Finally refresh the system with:

sudo apt-get update

You may want to install your favorite programs, for example:

sudo apt-get install libreoffice gimp nautilus

I found some XMBC binaries for an earlier version of Cubieez, that you need to extract to the root of the system. You have to install some dependencies, then run XBMC as shown below:

sudo apt-get install libssh-4 libmicrohttpd10 libtinyxml2.6.2 libyajl2 liblzo2-2 libpython2.7 libpcrecpp0 libhal1 libhal-storage1
/allwinner/xbmc-pvr-binhf/lib/xbmc/xbmc.bin

But unfortunately XBMC will crash, so this version is not suitable for Cubieez 2.1/2.2.

Finally, the SSD included in the kit is not partitioned nor formatted, so it’s also something you’ll want to do, but I’ll explain that in the next section.

SSD SATA Performance and Gigabit Ethernet

CubieTruck is certainly not one of the fastest ARM Linux system currently available, but its SATA interface and Gigabit Ethernet port could make it one of the best platform for storing and moving data around.

First let’s prepare the SSD for testing. Most people will make a single partition, but since the SSD may be use for Android SATA testing as well in the future, I’ve create two partitions, one formatted with NTFS and the other with EXT-4. To create the partitions, start a Terminal windows in CubieTruck, and type:

sudo fdisk /dev/sda

Now create primary partition(s) with by selecting ‘n’,  and type the start and end of the partition. If you want a single partition, that’s easy as fdisk will select the start and end for you, and you can just press enter to confirm the choice. Finally press ‘w’ to write the partition table and exit.

Format your partitions are needed, and in my case:

sudo mkfs.ntfs /dev/sda1
sudo mkfs.ext4 /dev/sda2

The SSD is now ready. Let’s mount the partitions:

sudo mkdir -p /mnt/sda1
sudo mkdir -p /mnt/sda2
sudo mount -t ntfs /dev/sda1 /mnt/sda1
sudo mount -t ext4 /dev/sda2 /mnt/sda2

In Linux, I’m normally using Bonnie / Bonnie++ to benchmark storage device:

sudo apt-get install bonnie++

By default, bonnie will write a file with double the size of your RAM to perform its testing, which is a way to reduce the influence of the cache, and provide more accurate results.

bonnie++ -d /mnt/sda1
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
cubietruck       4G     3  13  8726  12  8640  14   424  99 50567  28 787.3  56
Latency              2352ms    1824ms    1807ms   21041us   17141us    2591ms
Version  1.96       ------Sequential Create------ --------Random Create--------
cubietruck          -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
16  1321  15  3549  19  1788  13  1344  16  3756  19  1769  14
Latency              5620us   10305us   49666us    8780us    8080us    5673us
1.96,1.96,cubietruck,1,1418961485,4G,,3,13,8726,12,8640,14,424,99,50567,28,787.3,56,16,,,,,1321,15,3549,19,1788,13,1344,16,3756,19,1769,14,2352ms,1824ms,1807ms,21041us,17141us,2591ms,5620us,10305us,49666us,8780us,8080us,5673us

bonnie++ -d /mnt/sda2
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
cubietruck 4G 85 99 36310 30 23916 26 464 98 179457 89 1199 115
Latency 164ms 1974ms 214ms 39690us 15721us 104ms
Version 1.96 ------Sequential Create------ --------Random Create--------
cubietruck -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 5738 56 +++++ +++ 10671 82 8671 84 +++++ +++ 10397 83
Latency 891us 2857us 3987us 4931us 125us 5187us
1.96,1.96,cubietruck,1,1418828957,4G,,85,99,36310,30,23916,26,464,98,179457,89,1199,115,16,,,,,5738,56,+++++,+++,10671,82,8671,84,+++++,+++,10397,83,164ms,1974ms,214ms,39690us,15721us,104ms,891us,2857us,3987us,4931us,125us,5187us

Since bonnie output is not always easy to read, I’ve run the last line with bon_csv2html to have prettier results in HTML, also including the results for the NAND flash (bonnie++ -d /) as comparison.

Cubietruck_SSD_NAND_BonnieYou can check the full Bonnie++ results including sequential and random create results.

Sequential Output is write speed, and Sequential Input is write speed. Most of the time, Block speed is the important metric here. So first we see a large difference in performance between NTFS and EXT4 read and write speed on the SSD with respectively 8.7 MB/s and 50.5 MB/s for NTFS versus 36.31 MB.s, and 179.45 MB/s for EXT-4. That means CubieTruck can read data at 180MB/s from the SSD, or about 6 times faster than the typical performance of a USB 2.0 drive, and faster than the USB 3.0 drive connected to my Ubuntu computer (AMD FX8350) which achieves 115 MB/s read speed in the same test on its EXT-4 partition. As a side note, the maximum performance I’ve ever got from another ARM device via USB 3.0 was about 48 MB/s with ODROID-XU3 Lite, but this was in Android, and an NTFS partition, and with another tool (A1SD).

The NAND flash used in CubieTruck is also much slower than the SSD, writing at 6.4 MB/s and reading at 19.46 MB/s, and that’s why if you purchase this kit, you should probably move the rootfs to the SSD.

I’ve also tested raw Ethernet performance with the command line: iperf -t 60 -c 192.168.0.104 -d. Unfortunately Cubieboard Gigabit Ethernet performance (full duplex) is not that good, albeit still faster then Fast Ethernet.

CubieTruck_Gigabit_Ethernet_iPerf

Throughput in Mbps

Battery Life, Monitoring and UPS Function

This kit comes with a 5,300 mAh battery that’s mainly used as a UPS. So I’ve tried to disconnect the power while in used, and the system runs as expected. Once the battery is depleted, and the system off, as soon as the power comes back the system will boot again, so that part is also good in most cases, but not all…

I always wanted to check the battery life, to see how long the board could run on batteries. In my Ubuntu computer, I can run “last” to check the last power on./off event, bit with this firmware, it won’t work, complaining that /var/log/wtmp is missing. So instead I installed uptimed:

sudo apt-get install uptimed

Once I left the battery discharge over night, and after 3 hours, I assumed it was fully charged, and in idle mode, the battery lasted two hours. I had only connected the HDMI cable, an Ethernet cable, and connected to the board with SSH.

We can check the record uptimes with uprecords:

uprecords
     #               Uptime | System                                     Boot up
----------------------------+---------------------------------------------------
     1     0 days, 03:20:26 | Linux 3.4.79              Fri Dec 19 09:59:28 2014
     2     0 days, 02:00:40 | Linux 3.4.79              Fri Dec 19 13:20:32 2014
->   3     0 days, 00:08:11 | Linux 3.4.79              Fri Dec 19 15:31:12 2014

However, afterwards I had a doubt whether I had a full charge or not, so let it run all day, and tested it again, and this time, the battery lasted for over four hours and 20 minutes, meaning the first time, the battery was not fully charged, and it might take many hours to charge the battery:

uprecords
     #               Uptime | System                                     Boot up
----------------------------+---------------------------------------------------
     1     0 days, 07:43:48 | Linux 3.4.79              Fri Dec 19 14:31:12 2014
     2     0 days, 04:26:36 | Linux 3.4.79              Sat Dec 20 11:51:35 2014
     3     0 days, 04:12:17 | Linux 3.4.79              Sat Dec 20 16:20:07 2014

LXDE desktop will not run the system run on batteries (or I missed that), but you can monitor the battery status, health, voltage and more with sysfs:

cat /sys/class/power_supply/battery/health
Good
cat /sys/class/power_supply/battery/status
Discharging
cat /sys/class/power_supply/battery/voltage_now
3729000

So that means your program, or a script, could detect when the battery is charging or discharging, check the health status and/or voltage, and decide to run in lower power mode, and cleanly turn off the system when the voltage drops too low.

More options can be found on power_supply_class.txt kernel documentation.

Installing Debian rootfs to the SSD

Have we’ve seen above the read speed of the SSD is about 9 times faster than the NAND flash, and the write speed nearly 6 times faster, so you should really move the rootfs to the SSD, unless you have specific reasons not to do so. Another advantage will be the increased space for programs.

Let’s check the rootfs usage n the NAND flash first:

cubie@cubietruck:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 6.9G 2.8G 3.9G 42% /
/dev/root 6.9G 2.8G 3.9G 42% /

So we have a 6.9GB rootfs out of the 8GB flash, with 3.9GB free after I installed a few programs.

The rootfs is located in /dev/nandb partition, and you’ll want to move it to /dev/sda1 (in my case /dev/sda2, but I’ll use sda1 in this section, as it’s what most people will do). I’ll assume here that you have already partitioned and formatted the SSD as specified in the SSD SATA performance section.

First we have to copy the rootfs in the NAND flash to the SSD partition:
sudo mkdir -p /mnt/nandb
sudo mount -t ext4 /dev/nandb /mnt/nandb
sudo mount -t ext4 /dev/sda1 /mnt/sda1
cd /mnt/nandb
sudo cp -a . /mnt/sda1

Then we have to tell the system the root filesystem is located in the SSD, by changing uEnv.txt located in nanda partition of the flash:

sudo mkdir -p /mnt/nanda
sudo mount /dev/nanda /mnt/nanda
cd /mnt/nanda

sudo vi /mnt/nanda/uEnv.txt

Where you’ll need to change:

nand_root=/dev/nandb

by

nand_root=/dev/sda1

Now unmount the partitions, sync, and reboot

umount /mnt/sda1
umount /mnt/nand*
sync
reboot

After login, you can check that the rootfs is now on the SSD with close a 120GB partition (in my case 60G since I have two partitions):

cubie@cubietruck:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 59G 2.9G 53G 6% /
/dev/root 59G 2.9G 53G 6% /

Using CubieTruck Metal Kit as a Desktop PC

Just like I did with ODROID-XU3 Lite and Ugoos UM3, I’ve tried to use this Linux computer as a desktop computer, and shot a video with:

  1. Boot time from SSD: 42 seconds. Note that the LED on the front panel take about 10 seconds to lit up.
  2. Checking UPS function by disconnecting the power
  3. cubie-config utility for setup
  4. List of installed applications
  5. LibreOffice (Writer)
  6. Chromium – Multi-tabs, YouTube (embedded / full screen; VP9 / H.264/AVC1), and Candy Crush Saga (Flash game) in Facebook
  7. Video Playback with GNOME Player
  8. Power off

CubieTruck (Cubieboard 3) can be used as a desktop computer for Office tasks, but web browsing may become an issue with high CPU usage in Chromium, and watching YouTube video amounts to torture. Video playback (software decode) appears to be relatively OK up to 720P using GNOME player, but 1080p/H.264 video are not watchable. There are now VPU driver for Allwinner A10/A20, but these do not seem to be in use in this image, same for Mali drivers for 2D/3D GPU acceleration.

Phoronix Benchmarks

I’ve also run some of Phoronix Test Suite benchmarks:

sudo apt-get install php5-cli php5-gd php5-gd libpcre3-dev
wget http://phoronix-test-suite.com/releases/repo/pts.debian/files/phoronix-test-suite_5.4.0_all.deb
sudo dpkg -i phoronix-test-suite_5.4.0_all.deb

After configuring batch test, I’ve run MP3 encode, 7-zip compression, and Apache server tests:

phoronix-test-suite batch-benchmark pts/encode-mp3 pts/compress-7zip pts/apache

Contraty to ODROID-XU3 Lite, where compress-7zip failed because of a lack of memory, all three tests could complete successfully. I find Openbenchmarking website very confusing to use, and I did not find a way to compare to old results. So I included CubieTruck NAND, CubieTruck SSD, and ODROID-XU3 Lite in the picture below.

Cubietruck (NAND / SSD) vs ODROID-XU3 Lite (Click to Enlarge)

Cubietruck (NAND / SSD) vs ODROID-XU3 Lite (Click to Enlarge)

You can also click on the pages on OpenBenchmarking for Cubietruck (NAND), CubieTruck (SSD), and ODROID-XU3 Lite (eMMC) for full details.

I was not expecting the SSD to make much difference with the MP3 encoding, and 7-zip compression benchmarks, but I though it would yield a significant increase in performance for the Apache test. I was wrong, as the Apache test only improved from 771.6 requests per second to 785.20 rps, so it must mean this benchmark is not a I/O bound test. As should be expected ODROID-XU3 Lite is much faster for both MP3 encoding (45 seconds vs 165 seconds), and Apache (2382 rps vs 785 rps).

CubieTruck Metal Case kit includes CubieTruck board, a 120GB SSD, a 5,300 mAh battery, a rugged metallic enclosure, a 5V/2.5A power, and relevant cables. It can be purchased for $169 on Seeedstudio, or 149 Euros exc. VAT on EmbeddedComputer.nl.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

ODROID-XU3 Lite Board Ubuntu Review – Setup, Usability, and Performance

December 14th, 2014 13 comments

After testing ODROID-XU3 Lite with Android 4.4, and finding a workaround to some HDMI issues, I could finally try out Ubuntu, or rather Lubuntu with LXDE instead of Unity, in Hardkernel low cost octa-core development board. I’ll start this review by explaining how to install and setup Lubuntu on the board, followed by running various program to test the system usability as a desktop computer with LibreOffice, Chromium, XBMC, and 3D graphics, and finally run some performance tests with Phoronix Test Suit, build the Linux kernel natively, and transcode a video with avconf.

Setting Up Ubuntu on ODROID-XU3 Lite

All firmware images for ODROID development boards, can be found on odroid.in website, and if you want Ubuntu 14.04 image, go to ubuntu_14.04lts folder, to select the latest firmware file for your board. The latest image for ODROID-XU3 (Lite) is currently ubuntu-14.04.1lts-lubuntu-odroid-xu3-20141105.img.xz, it’s the same for micro SD card or eMMC boot. You should have gotten a eMMC to micro SD adapter if you’ve purchased an eMMC module from Hardkernel.

You can download, extract, and flash the image with dd (Linux) or Win32DiskImager (Windows). For example. in a terminal in a Linux computer:

wget http://odroid.in/ubuntu_14.04lts/ubuntu-14.04.1lts-lubuntu-odroid-xu3-20141105.img.xz
sudo apt-get install xz pv
xz -d ubuntu-14.04.1lts-lubuntu-odroid-xu3-20141105.img.xz
dd if=ubuntu-14.04.1lts-lubuntu-odroid-xu3-20141105.img | pv | sudo dd of=/dev/sdX

Where X is the letter of your micro SD or eMMC module inserted into your computer. Check the value carefully with lsblk before running the dd command, or you may lose your data stored on other drives connected to your computer,. For extra safety, you could also consider doing this procedure in a virtual machine, for example by running Ubuntu in VirtualBox.

Now insert the micro SD card or connect the eMMC module to the board, and you configure the boot switch between the Ethernet and USB ports as shown below using a pen or tweezers. For eMMC both must be in high position, whereas for SD card boot one must be down.

ODROID-XU3_Lite_Boot_Switch

Left: eMMC Boot; Right: Micro SD Card Boot

Now connect a keyboard, mouse, the HDMI cable, Ethernet, and/or other peripherals you may want to connect and power up the board by connecting the provided 5V/4A power supply. A typical boot should complete in around 22 seconds, although the first boot might take a little longer.

Lubuntu Desktop in ODROID-XU3 Lite

Lubuntu Desktop in ODROID-XU3 Lite

A this stage, the installation is nearly complete, and you should already have a usable system, however, if you’ll see that the rootfs partition is only 4.9GB with 310 MB available (that’s after installing LibreOffice):

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p2  4.9G  4.4G  310M  94% /

Since my eMMC module has a capacity of 16GB, it would be nice to use all of it. Normally, you’d use fdisk/parted, and resize2fs  to get the full size, but Hardkernel provides ODROID Utility that can do just that among others. So click on the icon on the top right to launch the program, input the password (odroid), and after running apt-get update automatically, the following interface should appear.

ODROID_UtilityClick on Resize your root partition, and after making sure the root partition is in /dev/mmcblkp2, click <Yes> to continue and resize the root partition on your micro SD card or eMMC module. After a reboot, you can check all the available storage in a terminal:

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p2   15G  4.4G  9.4G  32% /

9.4GB available out of a 15GB partition. Perfect! The setup is now complete.

Using ODROID-XU3 Lite as a Desktop Computer / Media Player

The Ubuntu image comes pre-loaded with Firefox, Chromium, Transmission, Arduino IDE, Abiword, PacmanFM, XBMC and a few others programs. Since they probably wanted to keep the image reasonably small, they did not install large program, but I install LibreOffice for a better office suite, and Nautilus for a file manager with Network Shares access:

sudo apt-get install libreoffice nautilus

The system is extremely responsive, and if you’re using a computer with a mechanical drive, ODROID-XU3 Lite will boot and load programs much faster than your full-blown Intel/AMD computer.

The best way to showcase ODROID-XU3 (Lite) capabilities is to shoot a video, so I’ve just done that showing:

  1. 20 seconds boot
  2. ODROID Utility options
  3. List of installed applications
  4. LibreOffice (Writer)
  5. Chromium – Multi-tabs, YouTube (embedded / full screen; VP9 / H.264/AVC1), and Candy Crush Saga (Flash game) in Facebook
  6. 3D hardware acceleration with es2gears
  7. XBMC Media Player with 2D/3D OpenGL ES and hardware video decoding.
  8. Power off

I’ve also opened a terminal running htop to show the eight cores CPU usage during these tests.

Side note: Since my camera (Canon Powershot A2300 HD) is pretty poor at shooting videos of screens, I’ve used SJ1000 action camera instead as the image is much sharper, but there’s a fisheye effect due to the wider angle of such camera. There are some tools in Linux including Python scripts and KDEnlive that can remove the fishing effect, but they introduce some aliasing, which does not look nice in this type of video, although it’s probably acceptable for content without text or thin lines.

Based on these tests, ODROID-XU3 Lite can be used as a desktop replacement or an XBMC media center, but you have to be aware of some limitations:

  • YouTube embedded videos play usually well, and 360p/480p full screen video play quite well, but the user experience is not very good with 1080p full screen videos, either with VP9 or H.264 codec.
  • Adobe Flash is not pre-installed, but in Chromium, it should be quite easy to install libpepperflash.so to enable Flash support. I have not tried, but normally, flash performance on ARM is rather subpar compared to x86.
  • The window manager may not be hardware accelerated with the GPU.

For all other uses, ODROID-XU3 Lite is clearly the best ARM Linux platform, I’ve tried so far, with a fast eMMC, 2D/3D hardware accelerated graphics (for apps that support OpenGL ES only), and hardware video decoding.

Other Use Cases and Performance

Before starting some benchmarks, I’ll check what type of Exynos 5422 I have in my system:

root@odroid:~# dmesg | grep BIN                                                 
[    0.355271] [c6] CPU Info : Samsung Exynos5422 Soc is BIN2

BIN1 is for the Exynos 5422 processor clocked up to 2.2 GHz found in ODROID-XU3 board, and BIN2 is limited to 1.8 GHz, and normally found in the Lite version of the board which I’m reviewing right now.

Phoronix Suite Benchmarks

Antutu is the most famous benchmark in Android, but in Linux, Phoronix Test Suite is the reference. It’s a bit more complicated to use than Antutu, but more flexible, and throrough.

sudo apt-get install php5-cli php5-gd php5-gd
wget http://phoronix-test-suite.com/releases/repo/pts.debian/files/phoronix-test-suite_5.4.0_all.deb
sudo dpkg -i phoronix-test-suite_5.4.0_all.deb

After apt-get install,. I had to run “sudo apt-get install -f” to complete the installation.

Than I’ve followed the instructions here, and selected four tests from the suite to test audio encoding, multi-core file compression, server, and disk I/Os:

phoronix-test-suite batch-benchmark pts/encode-mp3 pts/compress-7zip pts/apache pts/iozone

It turns out the iozone test for disk I/O takes nearly five hours, and recently my computer tends to turn off randomly, and since I started the test from an ssh console, the test got interrupted, so I only ran encode-mp3, compress-7zip, and apache benchmarks which last only about 15 minutes in total.

Out of the three test, compress-7zip failed because of a lack of memory:

[c4] Out of memory: Kill process 9593 d
[16693.088181] [c4] Killed process 9593 (7za) total-vm:1844536kB, anon-rss:1509B

So the whole Phoronix benchmarks did not exactly work out as expected, but you can find the result for MP3 encoding and Apache tests @ http://openbenchmarking.org/result/1412146-LI-20141214131

ODROID-XU3-Lite_Phoronix_Intel_Core_i3_radxa_proI’ve compared the ODROID-XU3 Lite results to some recent results on Openbenchmarking website including an Intel Core i3-4150 quad core system (cpu-ubuntu), an older Intel Atom N570 system (2G), and Radxa Pro board powered by Rockchip RK3188 processor. So Exynos 5422 can’t match a recent Core i3 processor yet (which by itself costs more than ODROID-XU3 Lite board), but does well against N570 netbook processor, and is about twice as fast as Radxa Rock Pro board in these two tests.

Mainline kernel compilation

People may want to use this powerful low cost Octa core board in build farm, so I though it would be fun to try building Linux mainline kernel natively. Let’s installing dependencies, and get the source latest Linux release (3.18) first.

sudo apt-get install libncurses5-dev gcc make git exuberant-ctags
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
cd linux-stable
git checkout -b stable v3.18

Ubuntu 14.04 comes with gcc 4.8.2 only, but this compiler will break Linux mainline build, so I had to install gcc 4.9 instead:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9

You’ll also note some ODROID boards are already part of mainline, probably with partial support, but unfortunately ODROID-XU3 (Lite) kernel has not been upstreamed yet.

root@odroid:~/linux-stable# ls -l  arch/arm/boot/dts | grep odr                 
-rw-r--r-- 1 root root   8334 Dec 14 14:11 exynos4412-odroid-common.dtsi        
-rw-r--r-- 1 root root   1310 Dec 14 14:11 exynos4412-odroidu3.dts              
-rw-r--r-- 1 root root    829 Dec 14 14:11 exynos4412-odroidx2.dts              
-rw-r--r-- 1 root root   1691 Dec 14 14:11 exynos4412-odroidx.dts

Anyway, let’s build the kernel for Exynos processor, and see how fast the board can compile a Linux kernel:

make exynos_defconfig
time make -j8 CC=gcc-4.9
...
real    5m43.746s
user    31m25.235s
sys     4m11.130s

So it takes less than 6 minutes to build the kernel on ODROID-XU3 Lite, about 4 times longer than on a powerful, but much more power hungry (300W) AMD FX8350 based computer. In other words, it should be possible to achieve the same performance as my computer using 4 or 5 ODROID-XU3 Lite boards in a mini build farm using distcc compilation for about the same price, but only a fraction of the power consumption, and of course native compilation has advantages over cross-compilation, since some tests may have to be skipped for the latter.

Video Transcoding with avconv

Finally, one follower on G+ asked me to test MPEG2 to H.264 video transcoding with ffmpeg. The latter does not seem to be available, and as been replaced by avconc, so I installed libav-tools instead, and ran the transcoding.

sudo apt-get install libav-tools
time avconv -i big_buck_bunny_1080p_MPEG2_MP2_25fps_6600K.MPG \
-vcodec libx264 -minrate 300k -maxrate 300k -bufsize 1835k bbb-h.264.avi
avconv version 9.16-6:9.16-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav s
built on Aug 10 2014 18:32:09 with gcc 4.8 (Ubuntu/Linaro 4.8.2-19ubuntu1)
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mpeg, from 'big_buck_bunny_1080p_MPEG2_MP2_25fps_6600K.MPG':
Duration: 00:00:44.74, start: 0.240000, bitrate: 7159 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 1920x1080 [PAR 1:1 Dc
Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16p, 160 kb/s
[libx264 @ 0x6c9c0] using SAR=1/1
[libx264 @ 0x6c9c0] MB rate (734400000) > level limit (2073600)
[libx264 @ 0x6c9c0] using cpu capabilities: ARMv6 NEON
[libx264 @ 0x6c9c0] profile High, level 5.2
Output #0, avi, to 'bbb-h.264.avi':
Metadata:
ISFT            : Lavf54.20.4
Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=-1--1c
Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16p
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Stream #0:1 -> #0:1 (mp2 -> libmp3lame)
Press ctrl-c to stop encoding
frame= 1035 fps= 8 q=55.0 size= 30701kB time=40.52 bitrate=6206.7kbits/s

It took 2 minutes 31 seconds to encode a 44 seconds video, so real-time 1080p video transcoding is currently not feasible with avconv / ffmpeg.

Have said that, Exynos 5422 supports video decoding and encoding, so it should be possible to write a program using the MFC (Multi-Format Codec) driver for Exynos. I could not find any sample code, but having a look a XBMC source code for ODROID boards might be a start, since it’s using the MFC drivers for decoding.

ODROID-XU3 Lite can be purchased directly from Hardkernel for $99 + shipping, or through distributors like Ameridroid (USA) or Pollin Electronics (Germany). Adding an eMMC module, an HDMI cable, and the serial debug board to your order is recommended, although you could replace the eMMC with a fast micro SD card (class 10 or greater) for a still decent performance.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Boot Ubuntu (Linux) or Android from an SD Card on Rockchip RK3288 Devices

December 11th, 2014 7 comments

There’s already a method to boot Android from an SD Card on RK3188 devices, which should work with all Rockchip RK3188 devices. Ian Morrison (Linuxium) has now provided a instructions to boot Linux or Android from a (micro) SD Card in Rockchip RK3288 based devices, leveraging work from linux-rockchip community, and especially naobsd.

Android_Ubuntu_SD_Card_RK3288
The Android flashing method is slightly different between RK3188 and RK3288, because most Rockchip RK3288 devices make use of eMMC flash, while older Rockchip RK3188 products feature NAND flash, and it appears Rockchip RK3xxx boot priorities (in the BootROM stored in the SoC itself) are as follows: eMMC, SD card, and NAND flash. All that means is that an updated version of the bootloader is needed which looks for a bootable SD card, and although very unlikely, your device could end up being bricked during this procedure. This is not a problem for Open Hour Chameleon since there’s no internal storage at all, so it will always boot from SD card and is really unbrickable.

First, you’ll need to download create-sdcard.7z with the tools, and images required.

Updating the bootloader

Then may want to make sure your device is using RK3288Loader_uboot_V2.17.02.bin bootloader (or latter). You can do so by loading the firmware file (currently installed in your device)  in AndroidTool, flashing the firmware with upgrade_tool, running ‘cat /proc/cmdline’ in a terminal, or simply trying a bootable SD card with the method below.

If you are pretty sure you need to upgrade your bootloader, download RK3288Loader_uboot_V2.17.02.bin, and flash it to your device in Linux with:

sudo ./upgrade_tool ul RK3288Loader_uboot_V2.17.02.bin

If you prefer to use Windows, you can use AndroidTool v2.3 or greater instead using the “Loader” row.

Creating a Bootable Android SD Card

At this stage, flashing an Android SD card image is easy, as you just have to run:

./create-android-sdcard firmware_update.img

where firmware_update.img is your device Android firmware. The script default to /dev/sdc, but you’ll be asked to confirm the device path, and have the ability to change. Please run lsblk first to make sure you are using the right storage device, or you may wipe out important data on your PC. For extra safety, you may even consider doing this procedure from a virtual machine in VirtuaBox.

That’s it now, you can just insert the SD card into your device to boot Android.

Creating a Bootable Ubuntu SD Card

For a quick try, you could download one of Ubuntu 12.04 or Ubuntu 14.04 SD card images, uncompress it, and flash it to a SD card with dd (Linux) or  Win32DiskImager (Windows). Then just insert it in your device SD card slot, and it should boot Ubuntu. This is a generic image so things like Wi-Fi, and audio may not work properly. The username / password are linuxium / p.

You’ll probably want to expand the rootfs to make full use of your SD card capacity, with a command line:

echo -e "d\nn\np\n1\n139265\n\nw" | sudo fdisk /dev/mmcblk1

Then reboot, login, and type

sudo resize2fs /dev/mmcblk1p1

to complete the resizing.

If you want an image more suited to your hardware, you may have to use sd-create-linux script instead included in create-sdcard.7z previously downloaded together with relevant firmware files for  Firefly-RK3288 board, Rikomagic MK802V, and Tronsmart Orion R28, and other hardware based on the same hardware platforms. If your device is different, you may want to extract kernel.img and resource.img from your Android firmware, or build these yourself, and rename then as kernel-linux.img and resource-linux.img.

Before running the script you’ll also have to download the rootfs for Ubuntu 12.04 or Lubuntu/Xubuntu 14.10, unzip it, and rename the file as linux-rfs.img.

Finally insert the SD card into your Linux PC, and run the script to create the SD card:

./create-linux-sdcard

It will ask to confirm/change the SD card device path, and create a bootable Ubuntu SD card for your RK3288 device.

Boot from SD card with Rootfs on USB flash drive

Some SD card (class 4) can be pretty slow, and USB flash drives may even be faster than some Class 10 SD cards, so Linuxium published another short guide yesterday, booting from SD card, but with the rootfs on the USB flash for potentially better performance, and especially more flexibility.

After downloading and extracting create-linux-sdcard-usb.7z, run ./create-linux-sdcard-usb script  to generate a bootable SD card without rootfs, and flash one of the rootfs above or your own with dd / Win32DiskImager to a USB flash drive. Insert the bootable SD card and USB flash drive into your Rorkchip RK3288 mini PC, and enjoy!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Handbrake 0.10 Supports H.265 and VP8 Video Encoding

November 24th, 2014 No comments

HandBrake is an open-source video transcoding tool that I use each time I upload a video on YouTube, simply because it will let me crop the beginning or end of a video as needed, can make web optimized videos, has an easy to use user interface, and greatly reduces the size of the video shot with my camera. HandBrake 0.10 has now been released, and it adds H.265 and VP8 encoding support via respectively x265 v1.4 and linbpx, as well as QuickSync video support, but the latter only in Windows. There are also various other changes include OpenCL accelerated scaling.

Handbrake 0.10 Transcoding H.264 to H.265 in Ubuntu 14.04 (Click to Enlarge)

Handbrake 0.10 Transcoding H.264 to H.265 in Ubuntu 14.04 (Click to Enlarge)

Handbrake is available for Windows, Mac OS X, and Ubuntu operating systems. It’s part of Ubuntu repository, but if you want the latest version, and support for MPEG-4 (m4v), you’ll need to install it from a PPA:

sudo apt-add-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake-gtk

I’ve tested with the video I shot yesterday, to see if I could get half size by using H.265 codec instead of H.264. The original video is a 720p QuickTime video using H.264 codec at 25 fps, and that lasts 10 minutes and 20 seconds. I selected the default settings for both H.264 and H.265, as well as “web optimized” MPEG-4 (.m4v) video container. My computer is powered by an AMD FX8350 octa core processor running Ubuntu 14.04. Here are the results.

Original H.264 H.265
Size 1.6 GB 501.5 MB 461.9 MB
Encoding Time N/A 02:40 12:28

The good news is that I get a size reduction with H.265, but by only about 8%, and it take nearly five times longer to encode the video. Since the original video is about 10 minutes long that means H.265 is encoded at less than than real-time. So even if there’s been great progress compared to previous H.265 video encoding tools,  personally, I would not rush to transcode my video library (Handbrake supports batch processing) to H.265 yet, and wait for some more improvement to H.265 support in HandBrake, as the developers stated:

H.265 is now available through x265 1.4. While this encoder is still fairly new, we have seen some promising results come out of it. It’s still under heavy active development and is only going to improve over time!

If you prefer the command line, ffmpeg / avconv also supports H.265 encoding via the same x265 encoder, so performance should be the same.

Via Phoronix

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

ODROID-XU3 Lite Development Board – Android Setup and Benchmarks

November 21st, 2014 20 comments

It’s been nearly ten days since I make ODROID-XU3 Lite unboxing, and my plans to first test Linux on the board were thwarted due a problem with HDMI. Luckily, after several attempts I managed to boot the board with Android. So today, I’ll show how to install or update Android on the board, and run a few benchmarks. But since there’s always a silver lining, I’ll start buy writing a bit about the HDMI issue, as I learned a few things on the way.

HDMI Output Tribulations

ODROID-XU3 Lite looks like a nice and powerful kit, and it may be one of the most cost effective ARM board on the market since it comes to performance to price ratio, so I was excited to try it, but as you know if you’ve read my unboxing post I did not work quite as planned, as all I got was a black screen on my HDMI TV.

Here are some of the steps I followed to try to find out the cause or a workaround.

I usually connect the HDMI cable to an HDMI switcher as it’s more convenient to me. I got the connection light on the switcher but no image. Some devices won’t work with the switcher, so I decided to connect it directly to my Panasonic television instead, trying HDMI1 (DVI) and HDMI2 ports, but the result remained the same. I also connected the UART Debug board I got with ODROID-X board, and I could only see three lines related to HDMI in the log:

root@odroid:~# dmesg | grep -i hdmi                                             
[    0.417692] [c6] hdmi-en: no parameters                                      
[    2.753215] [c7] exynos-drm exynos-drm: bound 14530000.hdmi (ops hdmi_component_ops)                                                                         
[    4.787478] [c6] hdmi-en: disabling

So I tried with a Philips monitor, a slowly dying Samsung TV. Same results. So I decided to try with another micro HDMI cable, which I got with the older ODROID-X board. Still no luck. I was also instructed to try this Ubuntu image on a fast micro SD card, and after changing the boot switch position, the board booted from the micro SD “successfully”, but I still had a black screen. I also play around with boot.ini in the micro SD card to force various HDMI modes, but It did not work either.

Hardkernel decided to send me another ODROID-XU3 Lite board, and a few days later I tried again, and unfortunately I got the same issue. The company told me they sold several thousand ODROID-XU3 boards, and they did not get the same report before, so we even considered shipping my TV to Hardkernel office in South Korea. But, since I had troubles with three monitors/TVs, I thought it must have been another issue, and I wanted to try a few other things.

In the meantime, one reader informed me he had a similar issue with his ODROID board, the reason being the ground was not connected in the HDMI cable,and he fixed it by connecting one of the USB host port of the board to his TV. So I tried with both my ODROID-XU3 Lite board, but the problem persistently remained. Out of desperation I also tried a different power supply (SMPS), but it did not work.

Finally, I flashed Android 4.4.4 instead to the eMMC module, and using the “new” micro HDMI cable I got the same black screen, but switching to the “old” ODROID-X micro HDMI cable, I could finally get video output at 720p60, and see the Android home screen. Yeah!!! So finally, it looked like an HDMI cable issue, but there may also be a software issue, as Android works, but Ubuntu does not work (yet). It’s something I’ll have to check again.

I talked with one of Hardkernel’s developer on #odroid IRC channel, and they told me some HDMI cables lack a ground connection, and/or lines are mixed. They’ll check with their supplier(s) to make sure the problem does not occur again. There’s actually an interesting thread on odroid forum that explains various issues related to HDMI (cables).

Installing and Setting Up Android on ODROID-XU3 (Lite) Board

There are three images to install Android 4.4.4 Alpha on ODROID-XU3 (Lite), which can currently be downloaded @ http://dn.odroid.com/5422/ODROID-XU3/Android/:

  • android-4.4.4-alpha-1.3-emmc_installer-odroidxu3-20141105.img.zip – Zipped image to install Android from eMMC to eMMC
  • android-4.4.4-alpha-1.3-sd2emmc_installer-odroidxu3-20141105.img.zip – Zipped image to install Android from micro SD card to eMMC
  • android-4.4.4-alpha-1.3-sd_installer-odroidxu3-20141105.img.zip – Zipped image to install Android from micro SD card to micro SD card.

Since I have an eMMC pre-installed with Linux, and the microSD eMMC reader, eMMC I used the first image. I connected the eMMC reader to my PC using my USB card reader’s micro SD slot, and unzipped the image, and flashed it as follows:

unzip android-4.4.4-alpha-1.3-emmc_installer-odroidxu3-20141105.img.zip
dd if=android-4.4.4-alpha-1.3-emmc_installer-odroidxu3-20141105.img | pv | sudo of=/dev/sdX bs=1M
sync

where X is the letter for the eMMC drive. Check with lsblk command before you run dd, to make sure of the letter, or you may wipe out the data on your hard drive. Some system with built-in micro SD slot may show as /dev/mmcblk01 instead of /dev/sdX. If you want to boot from micro SD card, the procedure is the same, but use the “sd_installer” image instead. You can also do that in Windows using Win32DiskImager.

Now connect the eMMC to the board, and other item you may need. I’ve connected most ports with a USB 3.0 hard drive, a USB 2.0 webcam to the USB 3.0 OTG port via the blue adapter, HDMI to my TV, Ethernet, two USB RF dongle, a Bluetooth dongle, a USB flash drive, and the serial debug board to access the console.

ODROID-XU3_Lite_USB3_HarddriveFinally I connected the 5V/4A power supply to boot the board. In the console, it takes about 12 seconds to boot to the command line, but I had to wait a total of 1 minute 20 seconds for Android user interface to be displayed on my TV screen. I noticed in the console that between 12 and 65 seconds I did not get any message, and the first subsequent message was related to USB audio… My USB webcam comes with a built-in microphone, so I disconnected it, and boot time dropped to a more normal 29 seconds.

Android Home Screen (Click for Original Size)

Android Home Screen (Click for Original Size)

The default resolution is 1280×720, and my TV output resolution was also set to 720p60. So I went to Android Settings->Display, and… wait… nothing there to change the video output. You actually have to go to the list of apps.

odroid-utlityand start ODROID Utility app.

ODROID_Utility

There should can change the (framebuffer) resolution to 1280×800 (for ODROID-VU only?), 1280×720, or 1920×1080, and the HDMI phy, i.e. the actual video output mode. to 720p 50/60, 800p/59, 1080i 50/60, or 1080p 30/50/60. You can also select the orientation (portrait / landscape) which is very useful for digital signage applications. So I selected 1920×1080, and 1080p60, clicked on Save, and Apply and Reboot. The framebuffer resolution was properly changed, but for some unknown reasons, my TV will always fall back to 720p60. The Android image is currently in Alpha stage, so it still have a few bugs that will be fixed by Hardkernel and/or the community.

You may have noticed Google Play Store is not part of the pre-installed apps. That’s because in theory you need to have a certified device to install Google Mobile Services, and contrary to most Chinese vendors, Hardkernel rightly followed Google’s T&C. However, apparently nothing legally prevents the user from installing GMS by himself/herself. You could do so by downloading Gapps from goo.im, but there’s also GAppsInstaller_kitkat.apk that will easily and automatically do that for you. For full details read universal 1 click gapps installer for ODROID post.

ODROID-XU3_Apps_GappsAfter installation, we’ve got the Play Store, Hangout, Voice Search, Google, and so on.

So that’s all for the setup. Next time Hardkernel announces a new Android firmware update on their forums, you should not need to use an installer image, instead you can simply start ODROID Update app, which will automatically download and update the firmware.

ODROID_Updater

ODROID-XU3 Lite System, Storage, and Network Benchmarks

Before running actual benchmarks, I’ve started CPU-Z. The first surprised that is it can detect big.LITTLE configuration with four Cortex A7 cores @ 1.6 GHz, and four Cortex A15 cores @ 2.2 GHz. ODROID-XU3 Lite is supposed to have Exynos 5422 processor but clocked at a lower frequency (1.8 GHz) compared to ODROID-XU3 board (2.2 GHz). So maybe my processor is overclocked, or I got lucky. The GPU is also detected correcly as being an ARM Mali-T628. Internal storage is only shown to be 1.94 GB out of the 16GB eMMC, because there are two partitions with the other one having a 11GB+ capacity. ODROID-XU3_Lite_CPU-ZSo let’s get to the actual benchmark results, starting with Antutu 5.3.

Antutu 5.2 Score (Click to Enlarge)

Antutu 5.2 Score (Click to Enlarge)

As expected ODROID-XU3 Lite is a real beast with 45,815 points in Antutu, being one of the most powerful ARM Android platform currently available. It’s the highest verified score I’ve ever got on all the devices I tested. The only higher score was achieved by Tronsmart Draco AW80 mini PC with Allwinner A80 SoC (49,657 points), but it’s an unverified score.

Quadrant Score (Click to Enlarge)

Quadrant Score (Click to Enlarge)

ODROID-XU3 Lite got 9,256 points in Quadrant way ahead of last generation devices. It looks like Quadrant us not really up-to date so that’s probably the last time I use this benchmark.
ODROID-XU3_Lite_VellamoVellamo 3.1 scores are also very good. Metal score is 1,519 against 1,138 points for Allwinner A80 and 1,457 points for Rockchip RK3288, Multicore score is 1,449 against 1,352 points for Allwinner A80, and 2,003 points for RK3288, and the ODROID-XU3 Lite gets 2,868 points in the browser score against 2,109 points for Allwinner A80, and 2,549 points for RK3288. It does not make much sense for the quad core Cortex A12/A17 RK3288 to outperform the octa core Cortex A15 + A7 processor in the multi-core benchmark, and I’m not sure why that is. You can get comparison with other platform with the screenshots for Metal, Multicore, and Browser tests.

3Dmarks Ice Storm Unlimited (Click to Enlarge)

3Dmarks Ice Storm Unlimited (Click to Enlarge)

I’ve also tried to run 3DMarks Ice Storm Extreme to compare with A80 and RK3288, but unfortunately none of my three attempts could complete, either because of a kernel panic, or a problem with Mali driver (See log). So I switched to Ice Storm Unlimited test which runs at 720p, and could complete with a score of 15,184 points. That puts it close to flagship devices like  like the iPhone 6 Plus, Samsung Galaxy S5, which score between 16,000 and 18,000 points.

Beside standard benchmarks, I’ve also tested storage and network performance.

I used A1 SD benchmark to test the eMMC module, my class 10 SD card, and USB 3.0 + NTFS performance. The app also made the system unstable with kernel panic ensuing, but after a few tries I could complete all benchmarks.

USB NTFS Transfer rate in MB/S

USB NTFS Transfer rate in MB/S

ODROID-XU3 Lite is clearly ahead of the competition with its USB 3.0 port when it comes to NTFS read speed which reaches 47.90 MB/s. and that’s the only device that supports USB 3.0 type of performance, although not quite as good as as on my PC (100+ MB/s), but it was with another benchmark tool (Bonnie++) in Linux.

Transfer Rate in MB/s

Transfer Rate in MB/s

I’ve included both eMMC and a class 10 micro SD card used with ODROID-XU3 Lite in the chart above (ODROID results on right side), and for some reasons the eMMC 5.0 module only got 47.02MB/s read speed, which is very good but still far from the 180+MB/s advertised with another benchmark. Write speed (32.42 MB/s) however is much faster than any other platforms tested so far. The class 10 micro SD used as comparison reads at 34.26 MB/s and writes at 10.81 MB/s which is not too bad compared to most other solutions.

ODROID-XU3 is capable of great I/O performance as we’ve seen above, so it would be nice if we had a fast network interface to leverage fast I/Os. Hardfkernel does provide a USB 3.0 to Gigabit dongle, but it was not included in my kit, so I’m limited to the 10/100Mbit interface which is shown to provide a good transfer rate with iperf (Command line: iperf -t 60 -c 192.168.0.104 -d).

Throughput in MB/s

Throughput in Mbps

iperf log:

Client connecting to 192.168.0.106, TCP port 5001
TCP window size:  212 KByte (default)
------------------------------------------------------------
[  6] local 192.168.0.104 port 54914 connected with 192.168.0.106 port 5001
[ ID] Interval       Transfer     Bandwidth
[  6]  0.0-60.0 sec   656 MBytes  91.7 Mbits/sec
[  4]  0.0-60.0 sec   631 MBytes  88.2 Mbits/sec

So overall, ODROID-XU3 Lite has outstanding performance in almost all aspects, but Android 4.4.4, which is still considered Alpha, required some more work to make it stable. There’s also an Android 4.4.2 image which may be more stable (TBC).

Android SDK for ODROID-XU3 (Lite)

I haven’t tried the SDK this time, but with each firmware release, Hardkernel provides a BSP.

To get and build the latest source code, you simply need to type these four commands, provided you’ll already setup your build machine for Android development:

repo init -u https://github.com/hardkernel/android.git -b 5422_4.4.4_master
repo sync
repo start 5422_4.4.4_master --all
./build.sh odroidxu3

If you want the code for a specific release, for example November 5 release (Android 4.4.4 Alpha 1.3), the repo init command line would become:

repo init -u https://github.com/hardkernel/android.git -b 5422_4.4.4_master -m manifeset-5422_4.4.4_v1.3

With the other three commands remaining the same.

That’s all for today, and Android. The next step will be to check out Ubuntu / Linux. If you are interested in this board, you can purchase it directly from Hardkernel, or through distributors like Ameridroid (USA) or Pollin Electronics (Germany).

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

How-to Install Ubuntu on Allwinner A80 Powered pcDuino8 and A80 OptimusBoard

November 17th, 2014 8 comments

Last month, pcDuino released Android 4.4 and Ubuntu images for pcDuino8 board powered by Allwinner A80 octa core processor, and since it’s the same board layout as A80 OptimusBoard, I decided to try it out, but it failed as the update script would try to flash it to a partition that’s too small for the root file systems. But last week, Ian Morrison and Minidodes gave it another try, and successfully booted Ubuntu, or more exactly Lubuntu, on A80 OptimusBoard.

Lubuntu Screenshot in A80 OptimusBoard

Lubuntu Screenshot in A80 OptimusBoard

Both their screenshot reports sun9i platform in /proc/cpuinfo, so that’s definitely Allwinner A80, but only one core is shown. I’m not sure if it’s because the other are idled and don’t show, or for some reasons, the kernel only supports one core at this stage.

Anyway, here’s how they did to install Lubuntu:

  • Flash the kernel (pcduino8_kernel_livesuit_20141008.img) with PhoenixCard or Livesuit first. See instructions to use Livesuit with A80 OptimusBoard.
  • Extract the rootfs (pcduino8_ubuntu_20141008.rar) to an SD card or USB flash drive. There should be two files: pcduino8_ubuntu_20141008.img and update.sh.
  • Boot the board, but don’t insert the SD card or USB flash drive yet.
  • update.sh script will attempt to copy the rootfs to /dev/nandd, but there’s not even space, so it will fail. So instead login as root (no password) and kill update.sh: ps ax | grep update, kill “pid”.
  • Now connect the mass storage device to pcDuino3 / A80 Optimusboard, and mount it to /mnt
  • Flash the Ubuntu image to /dev/mmcblk0p1:
    dd if=pcduino8_ubuntu_20141008.img of=/dev/mmcblk0p1 bs=1M
    sync
  • Now reboot the board and interrupt the boot sequence to enter U-boot, and use ‘env’ to change the bootargs with mmc_root to /dev/mmcblk0p1 and init to /sbin/init.
  • Save the environment with env save, and boot the board to start Ubuntu.

I have not tried (yet), since I’m busy with other hardware, so let me know if the instructions above need improvement. [Update: the procedure may depend on the Android firmware / flash partition, as described in the comments section]

On a side note, Merrii released some new SDKs for A10, A20, A31, and A80.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Beyond Debug Key Enables JTAG & UART Debugging, Supports OpenOCD

November 3rd, 2014 1 comment

Beyond Semiconductor, a fabless semiconductor company based in Slovenia which develops their own 32-bit BA2x IP cores, has sent me one of their development tool, namely Beyond Debug Key supporting JTAG and UART interfaces either with BeyondStudio for the company’s BA2x processor, or the open source suite OpenOCD for other processors. Since I don’t have any Beyond Semi boards, I instead configured it, and quickly tried it with Atmel SAMA5D3 Xplained ARM Cortex A5 development board, and OpenOCD (Open On-Chip Debugger).

Beyong_JTAG_Debug_Key_PackageThe debug tool comes in the package above describing the key features of the kit:

  • Performance
    • Transfer rate in excess of 600 kB/s
    • 30 MHz maximum JTAG clock
    • Less than 20 μW power draw from target board
  • Compatibility
    • Fully compatible with Beyond BA2x processor family
    • Access any 8-bit, 16-bit, 32-bit or 64-bit processors via JTAG
    • Works with all JTAG compliant devices
  • Software Support
    • OpenOCD for access to a range of CPLD, FPGA, flash and processor devices
    • BeyondStudio for graphical debugging of Beyond BA2x processors
  • Diagnostics – 7 autonomous status LEDs for power and flow control diagnostics
  • Target Debugging Integrated in BeyondStudio
    • Eclipse-based integrated development environment
    • Simplified and straightforward setup of target connection in just few clicks
    • Modern source-level debugger with hardware breakpoint, watchpoint and single step features
    • Integrated target console
  • Interfaces
    • USB 2.0 Hi-speed 480Mbps connection to PC
    • IEEE 1149.1 and IEEE 1149.7 JTAG interface standard pinout
    • RS232/RS422/RS485 UART Transfer Data Rate up to 12Mbaud
    • Simultaneous JTAG and UART operation
    • IO voltage range from 1.2 V to 3.3 V and including 5V CMOS compliant signaling
    • Independently controlled SRST and TRST signals
    • One Wire Debug (OWD) and Two Wire Debug (TWD) protocols support

Beyong_Debug_Key_JTAG
The kit include the Debug Key, a mini USB to cable, and a user’s manual describing the kit, explaining how to configured it with Windows and Linux computers, and listing the seven LED behaviours to diagonalize the connection. The tool uses a 20-pin JTAG connector, so as I did not want to wire JTAG signals manually, I went through my boards trying to find one with 20-pin JTAG receptacle, and I ended-up connecting it to Atmel SAMA5D3 Xpained development board as shown below.

Atmel_SAMA5D3_Xplained_JTAG_Debugger
Beyond Debug Key Connected to Atmel SAMA5D3 Xplained Board (Click to Enlarge)

JTAG can be used for board bring-up and flashing firmware, so I initially thought I would show how to configure the debug tool, and flash a firmware image to the board, but since Atmel SAMA5D3 configuration are not available, and it was my first time with OpenOCD, it took a little longer than usual, and I’ll just show the configuration part, and successful (I think) connection to the board.

The Debug key support both Windows and Linux, but I did everything from a computer running Ubuntu 14.04 LTS. The first thing is to install OpenOCD which is part of Ubuntu repo:

sudo apt-get install openocd

So it’s very easy to install, but OpenOCD version in Ubuntu is 0.7.0, and depending on the board you are using, you may want to build latest release (0.8.0), or directly from the source code tree:

git clone http://git.code.sf.net/p/openocd/code openocd-code
cd openocd-code
sudo apt-get install libusb-dev libftdi-dev texinfo libtool autoconf libusb-1.0-0-dev
./bootstrap
./configure --enable-ftdi
make -j8
sudo make install

OpenOCD requires config scrips both the JTAG key, and the target board. Beyond Semi provided the configuration files for their Debug Key, so that part was easy, and all I had to do was to create beyond.cfg with:

#
# Beyond Semi Debug Key
#
#
interface ftdi
ftdi_device_desc "Debug Key"
ftdi_vid_pid 0x0403 0x6010
ftdi_channel 0

ftdi_layout_init 0x0f38 0xff3b
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800

adapter_khz 30000

You also need to create a udev rules to be able to access the JTAG debugger as a normal user. so I created 52-beyong-jtag.rules in /etc/udev/rules.d/ with the line:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ATTRS{product}=="Debug Key", MODE:="0666"

At this stage, if you run OpenOCD with beyond.cfg only, you get the following output:

openocd -f beyond.cfg
Open On-Chip Debugger 0.8.0 (2014-11-01-21:21)
Licensed under GNU GPL v2
For bug reports, read

http://openocd.sourceforge.net/doc/doxygen/bugs.html

Info : only one transport option; autoselect 'jtag'
adapter speed: 30000 kHz
Info : clock speed 30000 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x974008ef ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined

At this stage, I had to find or create the script for Atmel SAMA5D3 CPU, and you’ve got a list of scripts in /usr/share/openocd/scripts/ which can help. There’s also site claiming to support Atmel SAMA5D3 with OpenOCD, but checking out the code asked me for a password. So instead I read Atmel SAMA5D3 datasheet (Chip Identification section), where I found relevant information such as SRAM start address, and Cortex-A5 JTAG IDCODE (0x4BA00477). The SRAM address is exactly the same as SAM9G45 processor which has a config files in OpenOCD, namely at91sam9g45.cfg which also includes at91sam9.cfg, so I simply copied both files to create my own at91sama5d3.cfg,  by simply replacing set _CPUTAPID 0x0792603f by “set _CPUTAPID 0x4ba00477″.

Here’s the output if I use both the Debug Key and SAMA5 scripts:

openocd -f beyond.cfg -f at91sama5d3.cfg
Open On-Chip Debugger 0.8.0 (2014-11-01-21:21)
Licensed under GNU GPL v2
For bug reports, read

http://openocd.sourceforge.net/doc/doxygen/bugs.html

Info : only one transport option; autoselect 'jtag'
adapter speed: 30000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter_nsrst_delay: 300
jtag_ntrst_delay: 200
RCLK - adaptive
1
Info : RCLK (adaptive clock speed)
Info : JTAG tap: at91sama5d36.cpu tap/device found: 0x4ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x4)
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : at91sama5d36.cpu: hardware has 2 breakpoint/watchpoint units

So despite one error, the connection appears to be successful, and both TDO and TDO LEDs blinked on the debug key, which means both JTAG Tx and Rx were active. That’s all I have achieve so far with the amount of time I had.

If you are interested in getting such JTAG Debugger, you can purchase Beyond Debug Key for 90 Euros directly from Beyond Semiconductor.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Getting Started with WRTnode OpenWRT Development Board

September 18th, 2014 1 comment

Seeed Studio sent me two nice little boards that can be used for IoT development: WRTNode and LinkIt ONE. Today, I’ll show pictures of WRTNode and accessories, and go through the “starting guide“, and will test LinkIt ONE board a few days later.

WRTnode Unboxing

I’ve received WRTnode by Fedex, and the board is stored in a plastic box.
WRTnode_Package
Inside the box, you’ll find the board, a “special” USB used to power the board and as an OTG adapter, a piece of paper with useful links (Wiki), and some WRTnode stickers.

WRTnode, "special" USB cable, and Quick Start Card (Click to Enlarge)

WRTnode, “special” USB cable, and Quick Start Card (Click to Enlarge)

Any micro USB to USB cable can be used to power the board, but this cable is useless to connect USB devices such as flash drives, webcams (OpenCV is supported), Bluetooth dongles, and so on. You could even connect a USB hub to connect multiple USB devices as shown below.

WRTnode_Webcam_Flash_Drive_USB_Hub

I’ve also taken a picture of both sides of the board shown the antenna on-board antennas, Mediatek MT7620n WiSoC, Elixir N2TU51216DG-AC DDR2 chip (64MB @ 400 MHz), the 16 MB SPI flash, as well as the headers for connecting various peripherals via I2C, SPI, UART, USB, etc…

WRTnode Board (Click to Enlarge)

WRTnode Board (Click to Enlarge)

You can also add Ethernet easily by making your own Ethernet cable using T568B wiring standard. I’m not 100% sure it’s safe though, as there are usually some extra components for Ethernet. I’ve included the board pinout chart for your reference.

WRTnode_pinout

WRTnode Quick Start Guide

To start the board simply connect the USB cable to a power adapter or a USB port on your computer. After about 10 seconds, you should see a blue LED lit up, and shortly after, you should see WRTnodeXXXX ESSID, where XXXX are the last 4 digit of the board MAC address. Connect it with your computer, and input the password: 12345678.
WRTNode_Access_PointNormally the board will resolve as several URL, but at first none of them worked.

$ ping i.wrtno.de
ping: unknown host i.wrtno.de
$ ping openwrt.lan
ping: unknown host openwrt.lan
$ ping wrtnode.lan
ping: unknown host wrtnode.lan

But you can check the route to see which subnet is used by your Wi-Fi connection:

$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 1 0 0 eth0
192.168.8.0 * 255.255.255.0 U 9 0 0 wlan0

I could finally ping the board with:

$ ping 192.168.8.1
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
64 bytes from 192.168.8.1: icmp_seq=1 ttl=64 time=12.4 ms
64 bytes from 192.168.8.1: icmp_seq=2 ttl=64 time=2.37 ms
64 bytes from 192.168.8.1: icmp_seq=3 ttl=64 time=12.1 ms

Interestingly, ping openwrt.lan, and the other two URL also work afterwards, so maybe I was a little to impatient during my testing…

The first time you need to connect to the board via telnet in order to set the root password:

$ telnet 192.168.8.1

WRTNode_Telnet

Now change the root password using passwd as you would do in any other Linux machine, and exit the connection, in order to connect via SSH instead:

$ ssh [email protected]
The authenticity of host '192.168.8.1 (192.168.8.1)' can't be established.
RSA key fingerprint is bc:00:71:ac:b1:56:e7:7b:c7:7a:9b:6a:59:8e:da:82.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.8.1' (RSA) to the list of known hosts.
[email protected]'s password:
BusyBox v1.22.1 (2014-08-13 19:31:12 UTC) built-in shell (ash)
.....
root@OpenWrt:~#

At this point, you’ve got another Wi-Fi access point on your network, but it’s not connected to Internet, so let’s start by locating the Wi-Fi routers with aps command:

root@OpenWrt:~# aps
WRTnode AP scaner.
Begin scaning APs, pls wait...
Finished.
APs available are...
ra0 get_site_survey:
Ch SSID BSSID Security Siganl(%)W-Mode ExtCH NT WPS DPID
1 CNX-TRANSLATION 94:0c:6d:e6:5b:10 WPA1PSKWPA2PSK/TKIPAES 100 11b/g/n ABOVE In YES

I only have one ESSID here, but this will list all ESSID in your environment. With that data, you can configure WRTnode to connect to your Wi-Fi router using vw command (vi wireless?):

root@OpenWrt:~# vw
config wifi-device 'ra0'
 option type 'ralink'
 option mode '9'
 option channel '1'
 option txpower '100'
 option ht '20+40'
 option country 'US'
 option disabled '0'
config wifi-iface
 option device 'ra0'
 option network 'lan'
 option mode 'ap'
 option encryption 'psk2'
 option key '12345678'
 option ApCliEnable '1'
 option ApCliSsid 'CNX-TRANSLATION'
 option ApCliAuthMode 'WPA2PSK'
 option ApCliEncrypType 'AES'
 option ApCliPassWord 'router_password'
 option ssid 'WRTnode9A60'

You need to change the lines in bold above using the data from aps. The first line is the Channel (Ch) , and the four lines in the wifi-iface section are pretty much self-explanatory. Save the file with Esc + “:wq”.

aps and vw do not report security features in the same way. Here’s the conversion table in case you don’t use WPA2PSK/AES:

aps:Security           vw:ApCliAuthMode/ApCliEncrypType
=========================================================
WPA1PSKWPA2PSK/TKIPAES	WPA2PSK/AES
WPA2PSK/AES		WPA2PSK/AES
WPA2PSK/TKIP		WPA2PSK/TKIP
WPAPSK/TKIPAES		WPAPSK/TKIP
WPAPSK/AES		WPAPSK/AES
WPAPSK/TKIP		WPAPSK/TKIP
WEP			WEP/WEP

Finally, restart the network:

root@OpenWrt:~# nr

and verify WRTnode got an IP address from the Wi-Fi router using DHCP:

root@OpenWrt:~# ia
apcli0 Link encap:Ethernet HWaddr 66:51:7E:32:9A:60
inet addr:192.168.0.105 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::6451:7eff:fe32:9a60/64 Scope:Link
UP BROADCAST RUNNING 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)

Good 192.168.0.105 is an IP adress from local network. Let’s also check we can ping a site on the Internet:

root@OpenWrt:~# ping cnx-software.com
PING cnx-software.com (104.28.18.95): 56 data bytes
64 bytes from 104.28.18.95: seq=0 ttl=53 time=81.999 ms
64 bytes from 104.28.18.95: seq=1 ttl=53 time=87.759 ms
64 bytes from 104.28.18.95: seq=2 ttl=53 time=81.381 ms
^C
--- cnx-software.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 81.381/83.713/87.759 ms

All good!

Once I had a problem connecting to my Wi-Fi router, and it turned out my router was configured to automatically select the channel, and it had switched to Channel 4. Running vw again to change the configuration withoption channel ‘4’” made the connection work again. There’s probably an option in OpenWRT to automatically detect the channel, but I haven’t investigated.

You can also install packages for okpg. I tried to install luci, but it was pre-installed, so I added openvpn support instead:

root@OpenWrt:~# opkg update
Downloading http://d.wrtnode.com/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker.
root@OpenWrt:~# opkg install luci
Package luci (svn-r10457-1) installed in root is up to date.
root@OpenWrt:~# opkg install openvpn-easy-rsa
Installing openvpn-easy-rsa (2013-01-30-2) to root...
Downloading http://d.wrtnode.com/packages/openvpn-easy-rsa_2013-01-30-2_ramips_24kec.ipk.
Installing openssl-util (1.0.1h-1) to root...
Downloading http://d.wrtnode.com/packages/openssl-util_1.0.1h-1_ramips_24kec.ipk.
Configuring openssl-util.
Configuring openvpn-easy-rsa.
root@OpenWrt:~#

That’s it the quick start guide is completed.

I’ve also run some command to show memory and storage usage:

root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 7.3M 348.0K 7.0M 5% /
/dev/root 7.5M 7.5M 0 100% /rom
tmpfs 30.2M 80.0K 30.1M 0% /tmp
/dev/mtdblock5 7.3M 348.0K 7.0M 5% /overlay
overlayfs:/overlay 7.3M 348.0K 7.0M 5% /
tmpfs 512.0K 0 512.0K 0% /dev

root@OpenWrt:~# free -m
total used free shared buffers
Mem: 61852 29084 32768 0 3536
-/+ buffers: 25548 36304
Swap: 0 0 0

Out of the 16Mb SPI flash, only 7.3M available are available for OpenWRT, the  rest is probably used by the bootloader. There’s nearly 64MB RAM available, and 29MB free.

If you are interested in the board, you can purchase it from Seeed Studio ($25), which provided the board for this review, but it’s also available on other shops such as DFRobot or Eleduino for the same price, although shipping fees may vary. To go beyond this Quick Start Guide, visit WRTnode WiKi to access the source code, schematics, and various documentation including tutorials.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter