Archive

Posts Tagged ‘tutorial’

Install Ubuntu 14.10 on MeegoPad T01 with a Live ISO Image

January 19th, 2015 3 comments

MeegoPad T01 has recently been shown to boot Ubuntu and Android, but no installation disk had been provided so far. But thanks to deadhp1, there’s now a “beta” Ubuntu 14.10 image with MATE desktop environment available for download in order to try or install Ubuntu on MeegoPad T01, and other Intel Atom Bay Trail-T devices.

Ubuntu MATE 14.10 Live ISO (Click to Enlarge)

Ubuntu MATE 14.10 Live ISO (Click to Enlarge)

Before you decide to try or install the image, be aware that audio and Bluetooth are not working for now, but everything else should work, including hardware video decoding in Kodi. If your device is not using a Realtek rtl8723bs module, Wi-Fi won’t work, and you may need to use a USB Ethernet dongle to get IP connectivity. The instructions will keep your Windows 8.1 installation too, albeit I suppose you could also wipe out the Windows 8.1 partition completely and run Ubuntu only on the device. If the instructions are not followed carefully, you may brick your mini PC / HDMI Stick.

So if you’d still like to go ahead, you can download ubuntu_mate_1410_baytrail_hybrid_efi_test_17.iso, and burn the image to a USB flash drive using Rufus or  Unetbootin. Then insert the USB flash drive into your Bay Trail mini PC, turn it on, and press the F7 key to select boot. Your system should now be running Ubuntu from the USB flash drive (Username and password are both baytrail). So far, the procedure should be 100% safe.

If you want to install the image to the internal storage, and keep Windows too. You’ll first need to modify the partitions with Gparted first, then click on Applications->System Tools->Systemback to install Ubuntu. You can follow the instructions in the video made by deadhp1 to re-partition your system, and install Ubuntu MATE 14.10 to the eMMC flash. One very important point is:do NOT format your EFI partition (on meegopad-t01 /dev/mmcblk0p1), or you will lose your ability to boot if you do. Make sure to uncheck the format box.”

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

Downloading Files on Baidu, or via HTTP, Bittorrent or Metalink in Linux with BaiduExporter, Aria2 and YAAW

January 14th, 2015 4 comments

Most firmware files distributed by the manufacturers are uploaded to Baidu, but I’ve found the service not to be always reliable, especially for larger files. In Windows, people are recommended to use Baidu software (BaiduYunGuanjia), but there’s not such tool in Linux, so instead I investigate for command lines tools to download files from Baidu, and this lead me to two interesting tools called Aria2, a “lightweight multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, BitTorrent and Metalink”, and YAAW “Yet Another Aria2 Web Frontend” with allow to start and monitor download locally or remotely.

But let’s start with the first tool I found: pan-baidu-download, a Python script to download files from Baidu.

To install it:

git clone https://github.com/banbanchs/pan-baidu-download.git
cd pan-baidu-download

We also need to install some dependencies (assuming python 2.7.x is already installed):

sudo apt-get install python-pip aria2

and then you can start downloading files as follows:

./python bddown_cli.py download http://pan.baidu.com/s/somerandomcharacters

But after posting a bug about password-protected download, which was fixed in 2 minutes by the developers, I was informed the script does not support directories, and was recommended to use BaiduExporter add-on for Chrome or Firefox instead.

Everything is in Chinese, and after installing the add-on I was not clear how to use it but I figured it out eventually.

First you need to run aria2c:

aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all

01/14 11:01:42 [NOTICE] IPv4 RPC: listening on TCP port 6800

01/14 11:01:42 [NOTICE] IPv6 RPC: listening on TCP port 6800

The command line above is insecure if you plan to run it on a remote server, as anybody could access it, and start download on your server.  But for testing, and local download this will do. If you stop aria2c, the downloads won’t restart with this command, but there are options that support this, but again, I have not looked into details for this quick test.

Now go to the Baidu download link, select the files and/or folders you want to download, and provided you’ll already installed Baidu Exporter add-on, a new menu will be shown, and all you have to do is click on ARIA2 RPC to start the download in aria2. The last options with two Chinese ideogram is the option, where you can change the IP of the aria2 server (localhost:6800) by default as well as other settings.

BaiduExporter_Firefox

Baidu Download with BaiduExporter in Firefox (Click to Enlarge)

You can now close the Baidu window in your web browser. and should see the download as started in the terminal:

aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all
01/14 11:01:42 [NOTICE] IPv4 RPC: listening on TCP port 6800
01/14 11:01:42 [NOTICE] IPv6 RPC: listening on TCP port 6800
 *** Download Progress Summary as of Wed Jan 14 11:07:30 2015 ***
 ===============================================================================
 [#af540e 0B/0B CN:1 DL:0B]
 FILE: /media/hdd/edev/sandbox/yaaw/binux-yaaw-ab09f92/update1201-android/update.zip

This is all good, but in practise you’d probably want start aria2c when your computer boots and would not be able to monitor progress, especially if you use a remote server, and this is where YAAW comes into play.

To install it, check out the code from Github or download and extract the tar file. Now go to the directoty where you extract the file. and open index.html with your web browser. You can monitor download, or even add HTTP or Bittorrent Downloads. AFAIK, you can’t add Baidu links to YAAW directly, but you can monitor the downloads added via Baidu Exporter

Baidu and Bittorrent Downloads in YAAW

Baidu and Bittorrent Downloads in YAAW

The aria2c IP address and port can be changed in the settings directly from the main page. Some useful tips for YAAW:

  • All your settings on web is temporary. Settings will be lost after aria2 restarted.
  • Tasks (including those that are not finished) will be lost after aria2 is restarted. Use --save-session=SOME/WHERE and reload with --continue=true --input-file=SOME/WHERE to continue.
  • Use $HOME/.aria2/aria2.conf to save your options.

I haven’t gone into details, but Aria2 and YAAW could be used with a NAS, a cheap board with a USB harddrive, or even USB Wireless flash drive such a Zsun SD111 (which is now hackable even without serial debug board, as the default root password has just been cracked) to make a downloader to handle large downloads instead of leaving your PC on at night, or 24/7.

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 Upgrade Firmware in HiSilicon Hi3798M TV Boxes

January 13th, 2015 5 comments
HiSilicon based Android TV boxes are not that popular, at least outside of China, but I’ve got one with BFS 4KH featuring HiSilicon Hi3798M processor, and since we could not fix AC3 audio decoding after a factory reset in the firmware I have, the company provided me with a new firmware, and I’ll document the procedure I followed below.
  1. Download the firmware, the file should be update.zip. For BFS 4KH, I could get it @ http://pan.baidu.com/s/1kTrCcMr (password: xpef). It includes YouTube and Google Play, but not the Rainbow launcher, nor XBMC, but these can be side-loaded.
  2. Now copy update.zip on the root of a USB flash drive formatted with FAT32, and at least 1GB free storage.
  3. Connect the USB flash to the USB 2.0 port of the device, as the USB 3.0 port can’t be used for firmware upgrade.
  4. In the current firmware, go to Settings->System->Local Update, and select the drive letter for the USB drive (e.g. D), and you should be prompted with a window asking you want to go ahead with the upgrade.
    hisilicon_firmware_upgrade
  5. The box will then reboot, show the usual Android upgrade animation, and reboot automatically in the new firmware.
  6. Done

Overall the procedure is very similar what is done on Amlogic devices.

Now the test firmware I received did not include XBMC, nor the necessary codec. So I installed XBMC for HiSilicon (password: amaw) and MXPlayerCodec (works with BFS 4KH only), and I could run XBMC, and downmixed audio worked with AC3, and some other Dolby and DTS codec.

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

Easily Create an Android Bootable SD Card for Allwinner A80 Devices with PhoenixCard Tool

January 6th, 2015 1 comment

We’ve already seen how it was possible to boot Linux or Android on Rockchip RK3288 devices from an SD card, which involved getting the stock firmware and running some scripts in Linux. Today, Freaktab member no_spam_for_me found out how to create a bootable SD card for Tronsmart Draco AW80 Meta, and other Allwinner A80 devices using PhoenixCard 3.09 tools for Windows (The latest version should be available @ http://dl.cubieboard.org/model/cc-a80/Tools/Flash-firmware-tools/). There may also be a way to use LiveSuit tools for Linux, but this have not been tested.

PhoenixCard_3.09_SD_Card

Once you have installed the tools, start it, and  load the firmware by clicking on “Img File” button (Here Draco AW80 Finless 1.1 firmware was used). Then press DiskCheck to scan for storage devices, and select your SD card in the drop-down menu “disk” (not sure why it’s blank in the screenshot above), select “Startup !” write mode, and click on the “Burn” button.

Once it’s done, just insert the SD card into your Allwinner A80 device, power it your device and it should boot from SD card. The first boot is quite slow, allegedly because the system converts the FAT32 file system to EXT-3, but subsequent boots are relatively fast (one minute or so) depending on the SD card.

Draco_AW80_Meta_32_GB_SD_CardThe screenshot above have been taken in Draco AW80 Meta (with 16GB eMMC) booted from a 32GB SD card.  So booting from SD card is nice to get more storage, and trying out firmware before flashing a new one as it does not affect your current installation. Just make sure you use a fast SD card (Class 10 or greater) or the system may feel very slow.

This method should also work for other Allwinner processors (A31, A20, etc…). It looks like it might only work for Android firmware, and not Linux based distributions like Ubuntu/Lubuntu (TBC).

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 Take Screenshots and Record Videos in Android mini PCs without Root Access

January 6th, 2015 No comments

I’ve started to test BFS 4KH Android TB box featuring HiSilicon HI3798M processor. I’m also the first things I normally do is to check for built-in screenshot support, and if not, I simply install a screenshot app like Screenshot Ultimate. This normally works pretty well, but the firmware is not rooted, and the usual root method for HiSilicon devices does not work, as it fails at the adb root stage with the message: “aabd cannot run as root in production builds”. So I was out of luck, and people who sent the sample for review do not seem to check / answer their email in a timely manner. ScreenShot Ultimate provides “No Capture Method Help“, but I found the instructions long, and it required me to install download and install something extra. So instead I check if I could do something with adb instead.

adb can connect via USB or Wi-Fi, and for most device you’ll have a USB OTG port to connect it to your computer. If developers options are not enabled in Android Settings, go to “About Device”, and click on the build number of 7 times. You should now be able to go to “Developers Options”, and enable USB debugging, something I had to do even though I had to use Wi-Fi since my box does not come with a USB OTG port.

You’ll also need to install adb. In Linux, at least Ubuntu / Debian, it’s easy to install, and I already had this:

sudo apt-get install android-tools-adb

For other OS, you may need to install the Android SDK.

If you are using USB, the setup is done. If you need to use Wi-Fi instead, you’ll need to find your Ethernet or Wi-Fi IP address. After enabling USB debugging, port 5555 should be open:

sudo nmap -sS 192.168.0.107

Starting Nmap 6.40 ( http://nmap.org ) at 2015-01-06 12:19 ICT
Nmap scan report for 192.168.0.107
Host is up (0.045s latency).
Not shown: 988 closed ports
PORT      STATE SERVICE
139/tcp   open  netbios-ssn
445/tcp   open  microsoft-ds
5555/tcp  open  freeciv
7100/tcp  open  font-service
7777/tcp  open  cbt
8888/tcp  open  sun-answerbook
10000/tcp open  snet-sensor-mgmt
49152/tcp open  unknown
49153/tcp open  unknown
49154/tcp open  unknown
49155/tcp open  unknown
50006/tcp open  unknown
MAC Address: 00:11:22:36:45:C9 (Cimsys)

Nmap done: 1 IP address (1 host up) scanned in 19.21 seconds

and try to connection with adb.

adb connect ip_adress

The rest of the instructions are the same whether you connect via USB or Wi-Fi, For a screenshot, I followed the instructions here to capture an image in a single command:

adb shell screencap -p | sed 's/\r$//' > screen.png

The sed part is to get rid of the end of line character sent via adb. The image can be found in your PC as screen.png. In my case, the image capture and transfer over Wi-Fi is a little slow, as it usually take around 5 seconds. But at least it works, and it’s even more convenient than using a Screenshot app, at least for my use case.

Scrrenshot Taken with adb (Click for Original Size)

Scrrenshot Taken with adb (Click for Original Size)

While I was at it, I also checked about screen recording, and found some instructions on CNET which should work for Android 4.4 and greater.. Basically, you just have to run:

adb shell screenrecord /sdcard/video.mp4

I have not tried to use the redirection as with screencap command line, because I believe it would have been too slow. So once you are done with recording, press Ctrl+C, get back the video to your PC and optionally delete it on the device to reclaim storage space.

adb pull /sdcard/video.mp4
adb shell rm /sdcard/video.mp4

That’s the result I got.

No too bad. At first, I thought “Hey, it might be possible to record online video that way!”, but a closer inspection of the file property quickly changed my mind.

adb_video_property

It recorded at 12 frames per second (maybe a limitation of the hardware), and more importantly there’s no audio, so even if you could record a video at a decent framerate, you’d still have to record audio separately, and mix video and audio at a latter stage, not the most convenient way….

More options for screenrecord command can be found on Android Developers’ ADB page, or by running:

adb shell screenrecord --help
Usage: screenrecord [options] <filename>

Records the device's display to a .mp4 file.

Options:
--size WIDTHxHEIGHT
    Set the video size, e.g. "1280x720".  Default is the device's main
    display resolution (if supported), 1280x720 if not.  For best results,
    use a size supported by the AVC encoder.
--bit-rate RATE
    Set the video bit rate, in megabits per second.  Default 4Mbps.
--time-limit TIME
    Set the maximum recording time, in seconds.  Default / maximum is 180.
--rotate
    Rotate the output 90 degrees.
--verbose
    Display interesting information on stdout.
--help
    Show this message.

Recording continues until Ctrl-C is hit or the time limit is reached.
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

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

December 14th, 2014 15 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 8 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