Archive

Posts Tagged ‘power’

Linaro Connect Hong Kong 2015 Schedule and Demos

January 27th, 2015 No comments

Linaro Connect Hong Kong 2015 will take place on February 9 – 13,2015 in Hong Kong, and the organization has released the schedule for the five days events with keynotes, sessions, and demos.

Linaro_Connect_Hong_Kong_2015Each day will start with the keynote including speakers such as:

  • George Grey, Linaro CEO, who will welcome attendees to Linaro Connect, and provide an update on the latest Linaro developments
  • Jon Masters, Chief ARM Architect, Redhat, who will present Red Hat update and latest ARMv8-A demonstrations
  • Dejan Milojicic, Senior Researcher & Manager, HP Labs
  • Bob Monkman, Enterprise Segment Marketing Manager, ARM, will discuss about  the impact of ARM in next generation cloud and communication network infrastructure
  • Greg Kroah-Hartman, Linux Foundation Fellow, will introduce the Greybus Project (Linux for Project Ara modular phones)
  • Warren Rehman,  Android Partner Engineering Manager, Google

The agenda also features sessions covering Android, ARMv8-A, Automation & Validation, Digital Home, Enterprise Servers, LAVA, Linux Kernel, Networking, Power Management, Security, Toolchain, Virtualization and multiple training sessions. I’ve gone through the full schedule to make my own virtual list of sessions.

Monday 9th

  • 14:00 – 14:50 – maddog: ARMv8 Optimization (No abstract)
  • 15:00 – 15:50 – ACPI Power Management on ARM64 Servers (No abstract)
  • 16:10 – 17:00 – Standardizing Linux Kernel Power Management on ARM 32/64-bit

The 32-bit ARM kernel supports a wide variety of processors harking back to ARM v4 architecture up to the latest v7 SMP processors. This huge legacy forced kernel developers to adapt the power management code for the newest processors (eg v7 multi-cluster systems) to an infrastructure that was developed to support simpler uniprocessor (UP) ARM architectures, resulting in code fragmentation and lack of unified drivers.

The brand new ARMv8 architecture provides kernel developers a clean slate to start developing new code, a nice opportunity to learn lessons from the past and bring about a kernel power management (PM) subsystem completely generic and up to the latest standards. This talk will provide details of the undergoing effort carried out at ARM to develop a kernel PM framework for ARM v8 systems, with kernel design details of the respective DT and ACPI implementations.

Tuesday 10th

  • 10:10 – 11:00 – UMEQ (User Mode Emulation Quest)

UMEQ (user-mode emulation quest) and has been developed to eliminate the functional deficiencies of qemu in user mode (multi-threaded applications, signal handling, etc). Umeq primarily targets ARM 64-bit. The presentation will focus on the architecture principles of umeq and on its implementation.

  • 11:15 – 12:05 – Solving the year 2038 problem in Linux

The concept of ‘time’ in Linux is encoded in many different ways, but the most common one is based on the ‘time_t’ type that counts the number of seconds that have passed since Jan 1, 1970. This type is currently defined as ‘long’, which on 32-bit systems is a signed 32-bit number that will overflow on Jan 19 2038 and likely cause all systems existing today to stop working.

In our presentation, we give an introduction to range of problems that we see across user space and kernel, and we talk about the work that we are doing to address some of these issues.

  • 12:10 – 13:00 – Browser Testing Framework for LHG

The purpose of this talk is to provide the audience with an introduction to the testing framework used in Web browser performance testing as implemented by LHG (Linaro Home Group). The browser test suite is used to compare browser performance and compliance by using a series of benchmarks in key test categories. Sample browser results for both Android and RDK will be presented.

  • 14:00 – 14:50 – Training 1 – FOSS
  • 15:00 – 15:50 – Training 2 – Upstreaming 101
  • 16:10 – 17:00 – Training 3 – Upstreaming 200

Wednesday 11th

  • 10:10 – 11:00 – Art’s Quick Compiler: An unofficial overview

One of the important technical novelties introduced with the recent release of Android Lollipop is the replacement of Dalvik, the VM which was used to execute the bytecode produced from Java apps, with ART, a new Android Run-Time. One interesting aspect in this upgrade is that the use of Just-In-Time compilation was abandoned in favour of Ahead-Of-Time compilation. This delivers better performance, also leaving a good margin for future improvements. ART was designed to support multiple compilers. The compiler that shipped with Android Lollipop is called the “Quick Compiler”. This is simple, fast, and is derived from Dalvik’s JIT compiler. In 2014 our team at ARM worked in collaboration with Google to extend ART and its Quick Compiler to add support for 64-bit and for the A64 instruction set. These efforts culminated with the recent release of the Nexus 9 tablet, the first 64-bit Android product to hit the market. Despite Google’s intention of replacing the Quick Compiler with the so-called “Optimizing Compiler”, the job for the the Quick Compiler is not yet over. Indeed, the Quick Compiler will remain the only usable compiler in Android Lollipop. Therefore, all competing parties in the Android ecosystem have a huge interest in investigating and improving this component, which will very likely be one of the battlegrounds in the Android benchmark wars of 2015. This talk aims to give an unofficial overview of ART’s Quick compiler. It will first focus on the internal organisation of the compiler, adopting the point of view of a developer who is interested in understanding its limitations and strengths. The talk will then move to exploring the output produced by the compiler, discussing possible strategies for improving the generated code, while keeping in mind that this component may have a limited life-span, and that any long-term work would be better directed towards the Optimizing Compiler.

  • 11:15 – 12:05 – Secure Media using DMA-buf

Secure data path for media streams involve lots of differents software and hardware elements and is very complexe. The goal of this talk is to expose an hardware independent proposition using open-TEE and dmabuf. Feedback from all SoC experts is more than welcome.

  • 12:10 –  13:00 – OP-TEE for Beginners and Porting Review

Explains the building blocks involved in Security including TrustZone, OP-TEE, Trusted Firmware etc. Goes into detail on how Secure Boot Works.. and Why. Explains how a simple secure Trusted Application interacts with OP-TEE and works. Brief overview on how to port OP-TEE to an ARM platform. Opens discussions for Potential Challenges and Hardware limitations and how they can be overcome.

  • 14:00 – 18:00 – Hacking sessions or training (no description provided)

Thursday 12th

  • 10:10 – 11:00 – Chromium Blink on Wayland with HW accelerated video playback using Gstreamer

Linaro and STM implemented an integration layer between Chromium and Wayland/Gstreamer. The solution allows HW accelerated video playback, high performance GPU accelerated HTML5 rendering. The approach uses hole punching mechanism to compose the UI layer on the top of the video content. The Gstreamer Chromium plugin is implemented trough the Pepper API. The presentation will provide implementation details on the Wayland/Chromium/Gstreamer integration.

  • 11:15 – 12:05 – EME implementation in Chromium: Linaro Clear Key

An example of a key system from a Clear Key point of view. Linaro implemented a sample CDM plugin for Chromium capable to exercise the EME implementation of the browser. The presentation gives an insight to the EME/CDM implementation in Chromium and the guidelines to integrating various DRM systems. We will present call flows with example classes, experiences learned, and example of things to watch out for.

  • 12:10 – 13:00 – ARM v8-A NEON optimization

With FFT optimization as an example, the following topics are discussed:

  1. Performance boost using ARM v8-A NEON
  2. NEON-optimization workflow for Ne10
  3. Some tips with example of Ne10 FFT and Android libraries
  4. Performance comparison between assembly and intrinsic
  • 14:00 – 18:00 – Hacking sessions or training (no description provided)

Friday 13th

  •  10:10 – 11:00 – Toolchain Performance Analysis and Investigations

This session will present a workflow of analyzing application or benchmark performance and ways investigate how performance can be increased by improving the toolchain. The session will cover use of profiling tools, reading of compiler optimization dumps, reducing optimization problems using compiler debug counters, and submitting optimization request/bug report to compiler developers

  • 11:15 – 12:05 – Power Management interactions with OP-TEE and Trusted Firmware

Understand what use cases related to Power Management have to interact with Trusted Firmware via Secure calls. Walk through some key use cases like CPU Suspend and explain how PM Linux drivers interacts with Trusted Firmware / PSCI (Power State Coordination Interface).

That’s it for the schedule, I find there are a lot of sessions about security, mainly OP-TEE, so this should become something important.

Linaro 2015 Demos

Beside keynotes, sessions, and training, there will be several demos during the event including:

  • Linaro Clear Key CDM
  • Chromium on Wayland with Gstreamer
  • Linaro Web Browser Test Framework
  • Demo of VLANd
  • l2fwd (See code on github)
  • OVS – x86 – ARM
  • ODP on Cavium platform
  • OpenJDK running on ARMv8 hardware
  • OpenStack running on ARMv8 hardware
  • Android support for clang 3.6 and gcc 5.0
  • Ceph on remote server cluster
  • UEFI on BeagleBone Black

If you want to attend Linaro Connect HK 2015, you can register online for £941.50 (~$1420 US). Live and recorded sessions should also be available for free via Linaro OnAir YouTube account.

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

CubieTruck Metal Case Kit Getting Started Guide and Review

December 21st, 2014 4 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

MT87 Digital Clamp Multimeter Hands On

October 11th, 2014 5 comments

When you want to measure power/current on electrical device, a kill-a-watt is the easiest method, but it’s not always possible for items like air conditioner, water pumps, etc… because they may simply be no plug to disconnect. Luckily, current clamps are made just for this purpose, where you simply place one of the two wires in a clamp / loop, and it magically measures the current.  You can’t put both wires inside the loop or measurement will not work at all. The good news is that such devices are very inexpensive, and I bought MT87 digital clamp multimeter, which is also a multimeter adding voltage and resistance measurement capability, for just $11.33 on DealExtreme.

MT87_Digital_Clamp_MultimeterMT87 comes with measurement leads (voltage/resistance only), and a user’s manual. The linked user’s manual is not exactly the same document, but very similar, and also refers to MT87C model which adds temperature measurement.

There are three ranges for alternative current (20A, 200A and 400A), 600V ranges for alternative and continuous voltages, a 200 kOhm range with 100k resolution, and a diode and continuity option with buzzer. So it’s pretty much for heavy duty measurements, and not useful for low power devices, but it’s not what it’s for. The button of the right on the device is used to hold data, so if it’s in location you can’t read the display during measurement, you can press the button, take out the clamp and read the measurement.

I haven’t tried the voltage and resistance measurement. After inserting two AAA battery in the device, the first challenge was to find an electric appliance with the two cables already separated, since I did not want to use a cutter on the power cords of my appliances. First I found I could do that with my water pump, measuring around 2A @ 230V, so 460W. But them I realize the cables from the street to my house were easily accessible, and properly insulated, so I should be able to measure the full power consumption of my house, but simply clamping the device to one of the cables.

MT_87_House_power_consumptionAnd I did get measurements which are consistent with the results I got for my computer and fridge using my now defunct kill-a-watt clone:

  • Computer only – 0.74 to 0.80 A (~ 180 Watts)
  • Computer + fridge – 1.18 A (~ 270 Watts)
  • Computer + 9,500 BTU aircon – 3.99 A (~ 920 Watts)

So based on these few results, it works nicely, and it can be a useful and affordable tool to evaluate how much power your household appliances consume.

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

Categories: Hardware, Testing Tags: power, review

DIY Power Measurement Board

July 23rd, 2014 6 comments

When I review media player or development boards, I’m often asked about power consumption figures. One way to measure power consumption is to use a Kill-a-Watt, but for low power devices it’s not always accurate enough, and it also includes the heat dissipation from the power adapter, which may or may not be useful depending on what you want to measure. For USB powered devices or boards, an easy way to measure power consumption is to use CHARGER Doctor, a small $5 USB dongle that displays both voltage and current alternatively. Unfortunately, most products I’ve received lately use barrel type connectors, so this little tool has not been as useful as I hoped. The only solution is then to measure voltage and current with a multimeter. Voltage is measured in parallel, so you just need to point the multimeter’s leads where you want to perform the measurements. However, the current is measure in series, so you need to insert the multimeter in the circuit somehow. A few possibilities:

  1. Unsoldering a component on the board to place the multimeter in series.
  2. Cut one wire of the power cable to insert the multimeter.
  3. Get and make a board to insert the multimeter.

Solutions 1 and 2 are not really desirable, so I decided to look into solution 1, and since I could not find any board that could match my requirements, I decided to work out a solution by myself allowing various power inputs and outputs.

Click to Enlarge

Click to Enlarge

The board can take power adapter using micro USB, mini USB or 5.5/2.1mm barrel connectors, 32 different output connectors thanks to two cables, and header pins are used to connect the multimeter’s leads.

Here’s the different components required for this solution:

  • 1x perfboard or veroboard
  • Some 2.54mm pin headers (straight and right angle)
  • micro USB breakout board – $1.50 on Adafruit, but shipping + insurance was $12, so instead I purchased 5x micro USB charging board for $4.24 on Ebay (asp_ezone)
  • mini USB breakout board – $1.95 on Sparkfun, but shipping killed it again, so I purchase 2x mini USB charging boards for $2.75 on asp_ezone shop.
  • 5.5/2.1mm DC power socket –  $4.18 for 10 pieces
  • USB Female DIP Socket Connector – $1.73 for 10 pieces
  • 6-in-1 Universal USB charging cable – $3.41
  • Universal 28-in-1 DC power socket / plug converter for laptop – $11.30

If you purchase everything from scratch the cost would be around $35.

In case the introduction is not clear, the board description below may help.

Power_Measurement_Board_Description

Iv’e also included the back of the board with the soldering for reference.

Power_Measurement_Board_BackAfter double checking I had made mistake inverting GND and VCC, which could be fatal, I tried it out by making some power measurements with Tronsmart Vega S89 Elite.

Tronsmart_Vega_S89_Elite_Power_Off_Power_ConsumptionIn power off mode, I get 115 mA (~ 575 mW @ 5V), so I’m confident it’s working just fine… Unfortunately, I quickly realized something is wrong as the boot does not complete most of the time, as it reaches 1A, the boot just simply stops, or I just get a blue screen. Only once or twice did I managed to get to the home screen (about 0.52A after most background tasks are done), but starting an app will hang the system most of the time. So  I’ve tried to replace the multimeter by a breadboard female to female cable, and everything works normally. So I suspect the contact surface with the leads is not large enough, or the multimeter introduces some noise that disturbs the device…. I’ll get some crocodile clips to see if things work out better…

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

Categories: Hardware Tags: how-to, power, tutorial

iFans EL-PB-17 is a 3-in-1 USB Wall Charger with a Battery and an SD Card Slot

May 27th, 2014 2 comments

I’ve noticed TYLT ENERGY 2K a USB wall charger with an internal 2,300 mAh battery, is currently on Kickstarter for $20, and received some press coverage. The main advantages of this system is that it saves space ,and you don’t need to remember charging your phone and your USB power bank separately, it will just charge both within 3 to 4 hours. However, since I’ve recently purchased a USB solar power bank with a 30,000 mAh battery (actual 8,000 to 10,000 mAh) for about $25, I thought there must be better options with a larger batter and similar price, or cheaper price with a similar battery size. It turns out there aren’t so many options, but I did find NewTrent Travelpak Plus with a 7,000 mAH battery that sells for about $40 on Amazon and even $19 on Ebay. But I’ve found a product even more original and versatile with E-link Technology’s iFans EL-PB-17 that can either be a simple USB wall charger, a standalone 3,000 mAh power bank, a USB wall charger with internal battery, or an SD card reader.

ifans_usb_wall_charger_with_batteryJust like TYLT charger it has a US-type foldable plug, but you can also use the power bank directly, if you wish to charge it from your PC or laptop for example. If you combine the AC adapter with the 3,000 mAh, you can charge your phone / tablet and power bank in one go, and it’s small enough to carry easily.

Here are the specifications listed on the company website:

  • Battery
    • Capacity – Lithium Ion 3,000 mAh
    • Input – DC 5V – 800 mAh
    • Battery Output – DC 5V – 1A
    • Misc – Power button, battery life indicators
  • USB Wall Charger
    • Input – AC 100~240 V ~50/60Hz, 0.15 A
    • Output – DC 5V – 1A

If you’re thinking it could do a neat ARM board / device UPS, it may not work as expected because there might be a delay while switching between AC power to battery (TBC). At least, this is the way TYLT charger works.

I could not find this exact model for sale anywhere yet, but the 2-in-1 model (also called EL-PB-17?), without an SD card reader, for $29.99 on Amazon or $36.99 on Aliexpress.

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

Categories: Hardware Tags: power, usb

USB Solar Power Bank Review

February 21st, 2014 10 comments

A few months ago, I won a $5 coupon for DealExtreme, and decided to buy a “Portable 5V (30,000mAh) Li-ion Battery Solar Power Bank w/ Dual USB + LED – Black + White” for just over $20. For the price, solar charging was a nice bonus, and the 30,000 mAh was probably a “mistake” but it did not really matter. The SKU is gone, but 1BA-2 Solar power bank ($23.97) appears to be a very similar product. I did not plan to write about this gadget, but a few things happened that made me change my mind.

First. it took over two months to reach me, instead of the usual 2 to 4 weeks. I ordered on the 9th of November 2013, and received the package on the 25th of January 2014. The reason being that the package got declined by Thai immigration (I live in Thailand). DealExtreme could not explain me why, but I assume it could be because of stricter regulations regarding batteries. They then sent the power bank via Sweden Post which usually takes an awful lot of time, as it goes to Sweden first, before coming back to Asia.

But let’s check the device itself which I received in the parcel below.

Solar_USB_Power_Bank
You’ll find the power bank, a USB cable, adapters (mini USB, micro USB, and proprietary crap for Samsung, Nokia, and Apple devices), a user’s manual entirely in Chinese mentioning the model is XHL-2000 or XHL-3000, and a pouch.

Solar_USB_power_Bank_Accesories
On the power bank, you’ll get 2 USB output (1A and 2A), a power button to start charging, or lit up the white LED (long press), a micro USB port to charge with a power adapter, and 4 blue LEDs to indicate charging status and current charge level.

Click to Enlarge

It came with a charge and I could charge my phone a couple of times. Then I decided to charge it outside, placing it on a location with good sun exposure (a roof) to see how fast it would charge, and after 6 days, the charge level showed 2 LEDs on (26% to 50% charge).

Chiang_Mai_Winter_Weather_SunIt’s winter here, so it might charge faster when temperature and day length rises. It got about 7 hours direct daily sun exposure. The weather during the test is shown on the right. The power bank will also charge when it’s cloudy or there are shadows, albeit probably at a slower rate.

I could charge my phone (1800 mAh battery) twice after 6 days of charge. That means a full charge would typically take between 10 and 20 days depending on conditions, and that you can’t expect to charge your phone daily with this device.

I should have known this at the time of purchase based on the specifications:

  • Solar Panel – 1.5W
  • Capacity – 30,000 mAh/111wh
  • Input – 5V/1A
  • Output – 5V/1A and 5V/2.1A
  • Dimensions – 120x75x26mm
  • Weight – 350g
  • Temperature range – -20 to 65 C

Under ideal & theoretical conditions charging at 1.5W for 10 hours day would take over 7 days to fully charge the power bank.

If instead of charging with solar power, I use a standard 5V/2A power adapter, the power bank can be fully charged within 9h30. I can then charge my phone about four times, which means the actual capacity is closer to 8,000 or 10,000 mAh instead of the 30,000 mAh advertised. Charging my phone from the power bank takes about 2h10 from the 5V/2A output (15% to 100%), and 2h55 from the 5V/1A (9% to 100%), which is only slightly longer than using directly a power adapter.

I’ve also tried to open this gadget, but failed to completely dissemble it.. I could however see it’s based on four 3.7V Lithium-ion batteries as found in mobile phones without being able to read the capacity. You may also want to remove the plastic protection for better efficiency.

Solar_Panel_Power_Bank

In any case, I got taught a few lessons, some of which I already knew:

  • Purchasing batteries overseas may be a problem with customs due to new regulations.
  • Specifications can be wrong or misleading (no kidding)
  • Some people sell products with virtually useless features (with regards to solar charging)
  • Sweden post can be terribly slow

I’ll still use this power bank, especially when traveling, but I’ll keep charging my phone the old-fashioned way, i.e. with a power adapter, for now.

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

Categories: Hardware Tags: power, review, smartphone, solar, usb

Linux Kernel 3.13 Release

January 20th, 2014 3 comments

Linus Torvalds announced the release of Linux Kernel 3.13 yesterday:

The release got delayed by a week due to travels, but I suspect that’s just as well. We had a few fixes come in, and while it wasn’t a lot, I think we’re better off for it. At least I hope so – I’ll be very disappointed if any of them cause more problems than they fix..

Anyway, the patch from rc8 is fairly small, with mainly some small arch updates (arm, mips, powerpc, s390, sparc, x86 all had some minor changes, some of them due to a networking fix for the bpf jit). And drivers (mainly gpu and networking). And some generic networking fixes. The appended shortlog gives more details.

Anyway, with this, the merge window for 3.14 is obviously open.

Kernel 3.12 brought new features to BTRFS and XFS file systems, PC’s GPU drivers improvements, better memory handling, and more. The key changes made in Linux 3.13 are as follows:

  • Scalable block layer for high performance SSD storage – This release includes a new design for the Linux block layer, based on two levels of queues: one level of per-CPU queues for submitting IO, which then funnel down into a second level of hardware submission queues. The mapping between submission queues and hardware queues might be 1:1 or N:M, depending on hardware support and configuration. Experiments shown that this design can achieve many millions of IOs per second, leveraging the new capabilities of NVM-Express or high-end PCI-E devices and multicore CPUs, while still providing the common interface and convenience features of the block layer. Read Linux Block IO: Introducing Multi-queue SSD Access on Multi-core Systems for details.
  • nftables, the successor of iptables – nftables is a new packet filtering framework that solves iptables problems and limitations, while providing backwards compatibility for current iptable users. A new user-space tool called nftables, and a new library (libnftables) are available. How-to of the new utility and syntax is available here. Video talk about nftables: http://youtu.be/P58CCi5Hhl4 (slides). Project page and utility source code: http://netfilter.org/projects/nftables/
  • Radeon: power management enabled by default, automatic GPU switching, R9 290X Hawaii support
  • Power capping framework – This release includes a framework that allow to set power consumption limits to devices that support it. It has been designed around the Intel RAPL (Running Average Power Limit) mechanism available in the latest Intel processors (Sandy Bridge and later, many devices will also be added RAPL support in the future). Documentation can be found here.
  • Support for the Intel Many Integrated Core Architecture – This release adds support for the Intel Many Integrated Core Architecture or MIC. Tianhe-2 at the National Supercomputing Center in Guangzhou, China, utilizes this architecture to achieve 33.86 PetaFLOPS.
  • Improved performance in NUMA systems – Modern multiprocessors (for example, x86) usually have non-uniform memory access (NUMA) memory designs. Linux 3.8 included a new NUMA foundation that would allow to build smarter NUMA policies in future releases, many of which are implemented in 3.13. Artcile: NUMA scheduling progress
  • Improved page table access scalability in hugepage workloads – The Linux kernels tracks information about each memory page in a data structure called page table. In workloads that use hugepages, the lock used to protect some parts of the table has become a lock contention. This release uses finer grained locking for these parts, improving the page table access scalability in threaded hugepage workloads.
  • Squashfs performance improvement – Squashfs, the read-only filesystem used by most live distributions, installers, and some embedded Linux distributions, has got important improvements that dramatically increase performance in workloads with multiple parallel reads. One of them is the direct decompression of data into the Linux page cache, which avoids a copy of the data and eliminates the single lock used to protect the intermediate buffer. The other one is multithreaded decompression.
  • TCP Fast Open enabled by default – TCP Fast Open is an optimization to the process of stablishing a TCP connection that allows the elimination of one round time trip from certain kinds of TCP conversation, which can improve the load speed of web pages. It was added in Linux 3.6, improved in  Linux 3.7, and Linux 3.13 enables TCP Fast Open by default.
  • NFC payments support –  This release implements support for the Secure Element. A netlink API is available to enable, disable and discover NFC attached (embedded or UICC ones) secure elements. With some userspace help, this allows to support NFC payments, used to implement financial transactions. Only the pn544 driver currently supports this API.
  • Support for the High-availability Seamless Redundancy protocol –  High-availability Seamless Redundancy (HSR) is a redundancy protocol for Ethernet. It provides instant failover redundancy for such networks. It requires a special network topology where all nodes are connected in a ring (each node having two physical network interfaces). It is suited for applications that demand high availability and very short reaction time.

Further details on Linux 3.13 are available on Kernelnewbies.org.

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

Categories: Linux, Linux 3.0 Tags: Linux, driver, gpu, intel, kernel, nfc, power, squashfs, ssd

$5.40 CHARGER Doctor Makes USB Power Measurements Easy

December 28th, 2013 12 comments

One way to make power measurement for USB powered devices is to make your own USB cable to allow for current measurement via a multimeter, but if you think it’s just too much hassle, I’ve found and purchased a small test device called CHARGER Doctor that shows voltage and current on a 4 digit display, and sells for $5.40 on DealExtreme.

CHARGER_Doctor_USB_Voltage_Current_TesterThe device features a USB female out port, and a USB male input port, that you can place between your USB power adapter, and the cable to your device to alternatively display voltage (4 seconds) and current (9 seconds). It can be used for power consumption measurements, to test if your charger is working normally, or finding out the power adapter that will charge your phone the fastest. It’s said to support measurement between 3.5 to 7V and 0 to 3 A, with an accuracy of +/- 1%.

I’ve shot a very short video showing the CHARGER Doctor attached to my phone charger.

Reviews on DealExtreme are mostly positive saying the device is accurate, however some people said it does not support data, whereas others don’t experience this issue. I’ve connected it between my hub and my camera, and I had no problem browsing the files. However, I would only get proper voltage readings, with current always showing as 0.00A, even when importing videos to my computer. Doing the same test with a USB thumbdrive worked apparently fine showing 5.15V and 0.08 A.

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

Categories: Hardware Tags: power, usb