Archive

Posts Tagged ‘cross-compilation’

Wandboard Dual Unboxing and Quick Start Guide

February 21st, 2013 18 comments

I’ve just received Wanboard Dual development board together with an enclosure, and Wi-Fi antenna. This board is powered by Freescale i.MX6 Duallite Cortex A9 processor, and comes with 1GB RAM, HDMI output and Ethernet. There’s also a version based on Freescale i.MX6 Solo with 512 MB RAM. You can refer to my earlier post for more detailed specifications. I’ll start by showing some unboxing pictures of the board, and write a quick start guide (casing assembly, Ubuntu & Android boot, and development). I also planned to run some benchmarks and test videos, as according to a poll on Wandboard website many people want to use it as a media player, but I’ll do that a bit later since the current Android image is not up to the task yet.

Wandboard Dual Unboxing

The package I received contained 3 boxes: one for Wandboard Dual board, one for the enclosure, and one for the Antenna. The complete kit below should cost around $120, and Wandboard has distributors worldwide. Prices vary so make sure you shop around.

Wandboard_Dual_Casing_Wi-Fi_Antenna_Packages

Inside those packages, you’ll find the Wandboard Dual board, the casing and screws, and the Wi-Fi antenna with a cable to connect it to the Wandboard Dual SoM.
Wandboard_Dual_Casing_Wifi-Antenna

Let’s have a closer look at the board. The top of the board features all the ports (further described below). A SATA connector is included but none of the Freescale SoM (Solo and Duallite) provided with the Wandboard can support it.

Wandboard Top (Click to Enlarge)

Wandboard Top (Click to Enlarge)

At the bottom of the board, there’s an EDM compatible SoM with the Freescale Processor, the RAM chipsets, an internal microSD slot (for the OS), a camera connector, as well as the Wi-Fi module (Dual version only). There’s also a reset button and 4 expansion pin headers at the bottom of the baseboard.

Wandboard Dual Bottom (Click to Enlarge)

Wandboard Dual Bottom (Click to Enlarge)

I’ve take some pictures on the side of the board to have a close look at the ports accessible on the Wandboard.
Wandboard_Ports

From left to right, top to bottom we’ve got:

  • Serial connector (DB9), digital line OUT, digital line IN, microphone, and S/PDIF
  • HDMI, Gigabit Ethernet, and 5VDC Jack
  • USB OTG, microSD slot (for applications/data) and USB Host (USB 3.0 Connector, but only USB 2.0 is supported by Freescale SoM)

One of the advantage of the Wandboard is that it’s comprised of a baseboard and a system-on-module (SoM) which are based on the EDM standard. This means, at least in theory, that you could remove the SoM, and replace it by another EDM Compact SoM (85x60mm). I’ve seen some people interested in upgrading their board to “Wandboard Quad” by replacing the provided SoM with Technexion EDM1-CF-iMX6 Quad SoM.

Wandboard Baseboard with EDM Connector

Wandboard Baseboard with EDM Connector

I’ve removed the 4 screws to remove the EDM-IMX6 SoM.

Wandboard EDM-IMX6 SoM (Click to Enlarge)

Wandboard EDM-IMX6 SoM (Click to Enlarge)

On the back of the module, you’ve got 2 more RAM Chips, Atheros AR8031 (Gb Ethernet), and lots of markings. If you want to connect the Wi-Fi antenna, the (golden) connector is just on top of the Wi-Fi module, and right of the microSD slot in the picture above.

Wandboard Quick Start Guides

Casing Assembly

Putting the enclosure and the board together, is extremely easy. Align the board with the top of the case, cover it with the bottom, insert and tighten the 4 screws and you’re done.

Wandboard_Casing2
You’ve got yourself a nice looking box. There are 2 issues however. The first and most important is that the connector for the Wi-Fi antenna faced the bottom of the enclosure, so it’s impossible to connect the Wi-Fi antenna and use the enclosure at the same time (Wi-Fi should still work without antenna though), unless you drill a small hole at the bottom of the casing. [Update: Wandboard posted the instructions to assemble the enclosure with the Wi-Fi antenna. This involves using a cutter, but it still looks neat]. The second, which is less a problem, is that the OS is stored in the internal microSD, so each time you need to update the OS, you’ll have to open the casing. It would have been a bit more convenient to be able to use the external microSD as well.
Wandboard_Dual_Casing

Installing and Running Android in Wandboard

I’ll provide the instructions for a Linux PC, but it’s also possible to do with Windows, and Win32DiskImager (Included in the images). First Download and unzip Android Jelly Bean (Early Preview) for the Wandboard Dual in your PC:

wget http://www.wandboard.org/images/downloads/android-4.1.2-wand-dual-20130207.zip
unzip android-4.1.2-wand-dual-20130207.zip

You’ll get three files:

  • android-4.1.2-wand-dual-20130207.img – Android Jelly Bean Image for Wanboard Dual
  • android-4.1.2-wand-dual-20130207.txt – Release notes
  • win32diskimager.zip – Disk imager utility for Windows.

Now insert a 4GB (or more) microSD card into your PC, and copy the image with dd or dd.sh:

sudo dd.sh if=android-4.1.2-wand-dual-20130207.img of=/dev/sdc

You’ll have to replace “/dev/sdc” by your microSD card device. You can check by running  sudo blkid.

Insert the microSD card in the internal microSD slot, connect the HDMI connector to your TV, connect Ethernet, a keyboard and mouse via a USB hub, and power the board with a 5V/2A power adapter. After about 2 minutes the boot should be complete, and you should get to the lock screen.

Wandboard_Android

According to the release notes files, wifi, bluetooth, adb, usb gadget and uvc cam are not working in Android yet. HDMI might fail to setup audio rate, and there’s no Setup menu for Ethernet (only dhcp will work). Ethernet works, but there’s no Google Play or file manager, and copying apks into /system/app did not install them automatically. I’ll do more testing once another Android image is available.

Installing and Running Ubuntu 11.10 in Wandboard

Thep rocedure for Ubuntu is very much similar to the one for Android. Get the image, uncompress it, and copy it to a 4GB (or greater) microSD card.

wget http://www.wandboard.org/images/downloads/ubuntu-11.10-wand-dual-20130208.zip
 unzip ubuntu-11.10-wand-dual-20130208.zip
 sudo dd.sh if=ubuntu-11.10-wand-dual-20130208.img of=/dev/sdc

Insert the microSD in the Wandboard, make sure everything is connected, and power on the board. The boot will take a while, and the screen will stay black for about 1m20, then you’ll see a gray background and the mouse pointer, but it will only become usable after 3 minutes (From power on to Unity desktop).

Ubuntu 11.10 in Wandboard (Click to Enlarge)

Ubuntu 11.10 in Wandboard (Click to Enlarge)

As with most other ARM systems, Ubuntu feels really slow to use, mostly because of the I/O on the microSD card, and I suppose Unity is also part of the sluggishness, so using another desktop environment (e..g LXDE) should help with performance. I’ve also tried es2gears just in case GPU acceleration would magically work, but it’s still using software rendering, which is the same issue as with other Freescale i.MX6 devices at the moment. VPU should work, but since there appears to be a lot of fancy things to do with gstreamer, I’ll write a separate post about video playback on Freescale i.MX6 platforms. If you’re planning to use the board as an embedded platform (e.g. for automation), a Yocto Project build is in the work.

Wandboard SDK and Kernel Build

Wandboard developers eventually intend to release the source code in a public repository, but in the meantime, u-boot and linux source code is available as a tar file, which also contains binaries (precompiled kernel, kernel modules, u-boots and patchram util), firmware (for VPU, Bluetooth and WiFi), tools and documentation like SD card layout.

Download and extract the SDK:

wget http://www.wandboard.org/images/downloads/wandboard-sdk-20130208.tar.xz
tar xvf wandboard-sdk-20130208.tar.xz

You can build the kernel and modules (for Linux/Ubuntu) by following the steps below, assuming the toolchain is already installed:

cd wandboard-sdk-20130208/linux-3.0.35-imx6-wand
cp wandboard_ubuntu_defconfig arch/arm/configs/
make ARCH=arm wandboard_ubuntu_defconfig
make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules
make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=../modules

Now that the build is complete, copy uImage and the modules to the microSD card with

Ubuntu, and umount it: sudo dd if=arch/arm/boot/uImage of=/dev/sdc bs=1M seek=1
cp ../modules/lib/modules/3.0.35/ /media/<rootfs_mount_point>/lib/modules -rf
sudo umount /dev/sdc1

Insert the microSD card in the Wandboard, it should boot Ubuntu, and can verify the kernel is the one just you built by displaying the build date with uname:

linaro@wandboard:~$ uname -a
Linux wandboard 3.0.35 #3 SMP PREEMPT Thu Feb 21 18:41:10 ICT 2013 armv7l armv7l armv7l GNU/Linux

Ideally you should connect a null modem cable or DB9 serial to USB cable to access the serial console for bootloader and kernel debugging, but since I don’t have one of those, I haven’t tried.

If you have any questions or technical issues with the Wandboard, you can get support on Wandboard Google Group. Header pins description and schematics are available in Wandboard User’s Manual.

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

U-boot, Linux Kernel, and Android Patches for Freescale i.MX6 HDMI TV Dongles

February 6th, 2013 32 comments

We can now get some quad core Android mini PCs (e.g. Hi802, GK802) featuring Freescale i.MX6Q processor, Freescale has released full documentation and source code its development platforms, Hi802 / GK802 HDMI TV dongles are easily hackable, and there’s even an Ubuntu image for the devices. So it looks pretty good ,right? Well almost.. there are some patches and config for GK802 that have not been released by Richtechie, so we can’t modify the  bootloader and Linux kernel. But this may change, as ARMTvTech forum user hste noticed some Freescale i.MX6 HDMI dongle patches om IMX Community website. Even though I’m not sure those are fully compatible with Hi802 / GK802, this could be a starting point. Today, I’ll provide the instructions to build u-boot, the linux kernel and Android ICS with those patches in a machine running Linux 12.04 64-bit.

Patch Sets Descriptions

There are two set of patches that can be applied to R13.4-GA release:

  • hdmidongle_REVB_R13.4_patch-20121115.tgz -  Adds HDMI dongle support in U-boot, the Linux kernel and customize Android 4.0.4 for mini PCs.
  • hdmidongle_REVB_R13.4_patch-20130201.tgz -   Adds support for ldo bypass , uboot fastboot, ntfs, Bluetooth A2DP, fakes an alway full battery, removed the screen locker, and check the video mode. There are also patches for bug fixes for WifiDirect, Wi-Fi performance, uboot mmu, and system stability

A script (revb_dongle_patch_install.sh) is provided to apply 20121115 patches.

Getting Freescale i.MX6 U-boot, Linux kernel and Android source code (R13.4-GA)

Since those patches need to be applied against R13.4-GA, so we need to get the code first. The instructions are explained in section 5 “Get Android Source Code (Android/Kernel/U-Boot)” of R13.4-GA.01_Android_User_Guide.pdf.

First download IMX6_R13.4_ANDROID_SOURCE_CODE (171 MB). After download, you should get a file named imx-android-r13.4-ga.01.tar.gz that includes the documentation, patches, and Mfgtool for Android 4.0.4.

Let’s extract it, extract the (default) patches:

mkdir -p ~/edev/Freescale
tar xzvf imx-android-r13.4-ga.01.tar.gz
cd imx-android-r13.4-ga/code
tar xzvf r13.4-ga.tar.gz

If you don’t have it the repo tool yet download it, and add it to your path:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod 755 ~/bin/repo
export PATH=$PATH:~/bin

Now let’s create a working directory (myandroid) and get Android 4.0.4 r1.1 AOSP source code:

cd ~/edev/Freescale/imx-android-r13.4-ga
mkdir myandroid
cd myandroid

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.4_r1.1
cp ../code/r13.4-ga/default.xml .repo/manifests/default.xml
repo sync

This will take a little while, after or while it’s progressing you can (also) get imx kernel and U-boot source code:

git clone git://git.freescale.com/imx/linux-2.6-imx.git kernel_imx
cd kernel_imx
git checkout imx-android-r13.4-ga
cd ../bootable/
mkdir bootloader
cd bootloader
git clone git://git.freescale.com/imx/uboot-imx.git uboot-imx
cd uboot-imx
git checkout imx-android-r13.4-ga
cd ../..

When checking out imx-android-r13.4 branch for the kernel and U-boot, you’ll get messages like:
HEAD is now at c9dfae3… ENGR00224938 HDMI audio: clear HDMI dma done bit before start
HEAD is now at 097643f… ENGR00224313:i.MX6 general:enable CONFIG_CMD_IMXOTP to fix the build error

It just shows the latest commit, so there’s no issue here.

After repo sync is complete, you’ll also need to get some more code:

cd external
git clone git://android.git.linaro.org/platform/external/alsa-lib.git
git clone git://android.git.linaro.org/platform/external/alsa-utils.git
cd ../hardware
git clone git://android.git.linaro.org/platform/hardware/alsa_sound.git
cd ..

Now patch all those with R13.4-GA patches:

source ../code/r13.4-ga/and_patch.sh
c_patch ../code/r13.4-ga imx_r13.4-ga

After a lot of debug output (and warnings), you should see the following message to indicate patching was successful:
**************************************************************
Success: Now you can build the Android code for FSL i.MX platform
**************************************************************

We’re done for this part we now have all source for R13.4-GA release.

Patching R13.4-GA with HDMI dongle patches

We can now patch the code to add HDMI dongle support. I’ll assume you’ve downloaded all 3 files describe at the top of this post to ~/edev/Freescale/imx-android-r13.4-ga directory:

chmod a+x revb_dongle_patch_install.sh
tar xzvf hdmidongle_REVB_R13.4_patch-20121115.tgz
cd hdmidongle_REVB_R13.4_patch
../revb_dongle_patch_install.sh ~/edev/Freescale/imx-android-r13.4-ga/myandroid
cd ..
tar xzvf hdmidongle_REVB_R13.4_patch-20130131.tgz
cd ../myandroid
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0001-uboot_fastboot.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0002-LDOBYPASS.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0003-WifiDirect.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0004-ntfs_support.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0005-BT_enable.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0006-1G_boot_stable.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0007-battery_always_full.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0009-uboot-enable-mmu-fix.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0010-boot_disable_screenlocker.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0011-wm8326-DC_CONTROL_RATE.patch --verbose
git apply  ../hdmidongle_REVB_R13.4_patch-20130131/0012-Added-default-video-mode-check-make-sur.patch --verbose
rm -rf kernel_imx/drivers/net/wireless/rtl8192ce
tar xzvf ../hdmidongle_REVB_R13.4_patch-20130131/rtl8192ce_v4.0.0_6239.20121226_TPIOT1.tgz
tar xzvf ../hdmidongle_REVB_R13.4_patch-20130131/ntfs-3g.tar.gz -C external

For the second set of patches, you’ll noticed patches 0001 to 0012 have been applied, except 0008 since it’s not needed anymore.

One more step completed. Have a tea break, or drink a beer, since there’s still a bit more work to do.

Building U-Boot, the kernel and Android for Freescale i.MX6 HDMI TV Dongles

I’m probably missing some per-requisites in this part, and most required dependencies were already installed in my PC. You may want to have a look at the post “How to compile Android on Ubuntu 12.04“, and in particular the part about install Sun Java 6 JDK, where you need to download Sun Java 6 JDK, install it, and run update-alternatives:

chmod +x jdk-6u38-linux-x64.bin
sudo ./jdk-6u38-linux-x64.bin
sudo mv jdk1.6.0_38 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

Now we should be ready to build:

source build/envsetup.sh
lunch

Build Freescale imx6 hdmidongle lunch menu

We can select either hdmidongle_6dq-eng or hdmidongle_6dq-user for the build. The “eng(ineering)” build is a debug build, and the “user” build is a release version. I’ve gone with hdmidongle_6dq-user (15) to try it out.

In theory, we now just need to run make:

make -j8

However “in theory, there is no difference between theory and practice; In practice, there is”, and I’ve come across a few issues during the build, and if you build in Ubuntu 12.04 64-bit, you may want to perform the following steps before running make.

Some directories are duplicates in the source tree, and the build ends with error such as:

build/core/base_rules.mk:166: *** external/mtd-utils/mtd-utils/mkfs.ubifs: MODULE.HOST.EXECUTABLES.mkfs.ubifs already defined by external/mtd-utils/mkfs.ubifs.  Stop

I fixed it by deleting one of the duplicate in the source:

rm -rf bootable/bootloader/uboot-imx/mtd-utils
rm -rf external/mtd-utils/mtd-utils/
rm -rf bootable/bootloader/uboot-imx/wpa_supplicant_8_rtl/
rm -rf external/wpa_supplicant_8_rtl/wpa_supplicant_8_rtl/
rm bootable/bootloader/uboot-imx/realtek/wlan/ -rf
rm -rf  hardware/realtek/realtek/

I found some dependencies missing, so you may have to install:

sudo apt-get install uuid-dev liblzo2-dev lib32ncurses5-dev uuid:i386 liblzo2-2:i386

But the build still failed, so here’s an ugly hack:

pushd /usr/lib
sudo ln -s /lib/i386-linux-gnu/libuuid.so.1 libuuid.so
sudo ln -s /usr/lib/i386-linux-gnu/liblzo2.so.2 liblzo2.so
popd

Then I got several errors:

error: “_FORTIFY_SOURCE” redefined [-Werror]
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1

The solution is to edit vi build/core/combo/HOST_linux-x86.mk and edit the corresponding line as follows:

HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

Source: http://code.google.com/p/android/issues/detail?id=20795

External/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scope make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1

Edit external/mesa3d/src/glsl/linker.cpp and add #include <stddef.h>
Source: http://code.google.com/p/android/issues/detail?id=23206

host C++: liboprofile_pp <= external/oprofile/libpp/arrange_profiles.cpp In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0: external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive] make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1

Edit external/oprofile/libpp/format_output.h and Remove ‘mutable’ from ‘mutable counts_t & counts;’ on line 94 => counts_t & counts;
Source: https://groups.google.com/forum/?fromgroups=#!msg/android-building/2EwtWQTqjdI/eBl1bK-KNM8J

external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: error: ‘ptrdiff_t’ does not name a type

Edit external/gtest/include/gtest/internal/gtest-param-util.h and add one line:

#include <vector>
+#include <cstddef>
#include <gtest/internal/gtest-port.h>

Source: http://code.google.com/p/android/issues/detail?id=22005

/home/jaufranc/edev/Freescale/imx-android-r13.4-ga/myandroid/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock’
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] Error 1

Edit vi frameworks/compile/linkloader/Android.mk and rename LOCAL_LDFLAGS to LOCAL_LDLIBS.
Source: https://bugs.launchpad.net/linaro-android/+bug/1018832/comments/6

frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach.o] Error 1

Edit frameworks/compile/slang/Android.mk and remove -Werror
Source: http://code.google.com/p/android/issues/detail?id=22006

After all those changes, I was finally able to complete the build with the output in out/target/product/hdmidongle_6dq including the following directories and files:

  • root/ – Root file system (including init, init.rc, etc). Mounted at /
  • system/ – Android system binary/libraries. Mounted at /system.
  • data/ – Android data area. Mounted at /data.
  • recovery/ – Root file system when booting in “recovery” mode.
  • boot.img – Image which includes the kernel zImage, ramdisk, and boot parameters.
  • ramdisk.img – Ramdisk image generated from “root/”.
  • system.img – EXT4 image generated from “system/”. It can be programmed to “SYSTEM” partition on SD/eMMC card with “dd”.
  • userdata.img – EXT4 image generated from “data/”.
  • recovery.img – EXT4 image generated from “recovery/”. It can be programmed to “RECOVERY” partition on SD/eMMC card with “dd”.
  • u-boot-6q.bin – U-Boot image with padding for i.MX 6Quad version of the HDMI dongle.
  • u-boot-6dl.bin – U-Boot image with padding for i.MX 6Dual version of the HDMI dongle.
  • uImage – Kernel image

If you just want to build U-boot and/or the Kernel follow section 5.3 and 5.4 in R13.4-GA.01_Android_User_Guide.pdf. For the kernel there are 5 configs which all seem quite different from GK802 config:

  • imx6_android_defconfig – Android kernel config
  • imx6_defconfig – Linux kernel config
  • imx6_nand_android_defconfig
  • imx6_nand_updater_defconfig
  • imx6_updater_defconfig

To build U-boot for Freescale HDMI dongles, there are over 12 config (6 for i.MX6 dual, 6 for i.MX6 Quad), but the most interesting appear to be mx6q_hdmidongle_android_config and mx6q_hdmidongle_nand_android_config.

That’s all for today, I’ll post more if I, or somebody else, make progress trying it or/and building it for GK802 / Hi802 mini PC.

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

Raspberry Pi Now Has Experimental Support for VP6, VP8, MJPEG and Ogg Theora Video Codecs

January 26th, 2013 5 comments

The guys working on the Raspberry Pi (mainly dom) have added preliminary support for VP6, VP8, MJPEG, and Ogg Theora free video codecs, as well as Ogg Vorbis audio codec. Unlike H.264, MPEG-2 and VC1, those are not handled by the hardware video decoder in Broadcom BCM2835 processor, but are accelerated by the Videocore GPU. This means that only SD (and possibly 720p) videos are supported for those codecs.

480p VP8 Video Playback in the Raspberry Pi

480p VP8 Video Playback in the Raspberry Pi

The best way to get support is probably to patiently wait for the Raspberry Pi foundation to release a new Raspbian image, but in case you couldn’t possibly wait, here are the steps to follow:

  1. Download and run Hexxeh’s rpi-update script in the Raspberry Pi in order to get the very latest build:
    wget https://github.com/Hexxeh/rpi-update/raw/master/rpi-update
    chmod 755 rpi-update
    sudo ./rpi-update
  2. Add the following two lines to /boot/config.txt:
    start_file=start_x.elf
    fixup_file=fixup_x.elf
  3. Reboot the Raspberry Pi
  4. The GPU firmware is now updated, but you still need the latest version of omxplayer. You  have two choices:
    1. Wait for the next build to be available on http://omxplayer.sconde.net/ (should be there in a few days).
    2. Build it yourself.
  5. I chose number 2 :) . We’ll cross-compile omxplayer since we don’t have all day (and maybe more). First get the Rpi toolchain in a Linux build machine (Ubuntu 12.04 64-bit in my case):

    mkdir -p /usr/local/bcm-gcc
    pushd /usr/local/bcm-gcc
    sudo git clone git://github.com/raspberrypi/tools.git
    export PATH=$PATH:/usr/local/bcm-gcc/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
    popd

  6. We need a root file system for the build. Since we may need to install missing packages, I’ll run an NFS server in the Raspberry Pi and access the rootfs via NFS. So let’s configure the Raspberry Pi as a NFS server first:
    sudo apt-get install nfs-kernel-server nfs-common rpcbind
    sudo dpkg-reconfigure rpcbind
    sudo /etc/init.d/rpcbind restart

    Then edit /etc/exports as root (sudo) and add the line:

    / 192.168.0.0/24(rw,no_root_squash,async,no_subtree_check)

    Then restart the NFS server

    sudo /etc/init.d/nfs-kernel-server restart
    sudo exportfs -a
  7. Now let’s mount the NFS share in the build machine:
    mkdir ~/edev/rpi/nfs
    sudo apt-get install nfs-client
    sudo mount -t nfs 192.168.0.107/ ~/edev/rpi/nfs
  8. Let’s retrieve omxplayer source code:
    git clone git://github.com/huceke/omxplayer.git
    cd omxplayer
  9. Modify Makefile.include as follows:
    USE_NFS=1
    FLOAT=hard
    ifeq ($(USE_NFS), 1)
    NFSROOT :=/home/jaufranc/edev/rpi/nfs
    SDKSTAGE :=$(NFSROOT)
    TARGETFS :=$(NFSROOT)
    TOOLCHAIN :=/usr/local/bcm-gcc/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian
    HOST :=arm-linux-gnueabihf
    SYSROOT :=$(NFSROOT)
    else
    BUILDROOT :=/home/jaufranc/edev/rpi/bcm-rootfs
    SDKSTAGE :=/home/jaufranc/edev/rpi/bcm-rootfs
    TARGETFS :=/home/jaufranc/edev/rpi/bcm-rootfs
    TOOLCHAIN :=/usr/local/bcm-gcc/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi
    HOST :=arm-bcm2708hardfp-linux-gnueabi
    SYSROOT :=$(TOOLCHAIN)/tools/arm-bcm2708hardfp-linux-gnueabi/sysroot/
    endifJOBS=8CFLAGS := -isystem$(PREFIX)/include
    CXXFLAGS := $(CFLAGS)
    CPPFLAGS := $(CFLAGS)
    LDFLAGS := -L$(BUILDROOT)/lib
    LD := $(TOOLCHAIN)/bin/$(HOST)-ld –sysroot=$(SYSROOT)
    CC := $(TOOLCHAIN)/bin/$(HOST)-gcc –sysroot=$(SYSROOT)
    CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ –sysroot=$(SYSROOT)
    OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
    RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
    STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
    AR := $(TOOLCHAIN)/bin/$(HOST)-ar
    CXXCP := $(CXX) -E

    PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
    CFLAGS += -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -O3 -mstructure-size-boundary=32 -mno-sched-prolog
    LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/
    INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/usr/include/arm-linux-gnueabihf -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2

    You’ll need to change NFSROOT variable to where you mounted the NFS share.

  10. We’re now ready to cross-compile omxplayer:
    make ffmpeg
    make -j8
    make dist

    This will create a omxplayer-dist.tar.gz that you can copy in the Raspberry Pi:

    sudo cp omxplayer-dist.tar.gz ~/edev/rpi/nfs/

    There may be missing dependencies during the build. If it’s the case, you need to install some development package in the Raspberry Pi. Refer to my “How-to fix common build error tutorials“, if the build fails.

  11. Back to the Raspberry Pi, let’s install it:
    cd /
    tar xzvf omxplayer-dist.tar.gz
    cd omxplayer-dist
    sudo cp * / -rf

That’s all. Now we can try the files tested by dom:

e.g.: omxplayer big_buck_bunny_trailer_480p

The VP8 and Ogg Theora videos played very smoothly, but I just got a black screen for VP6 and MJPEG videos. since it could not detect the video stream. The firmware has been fixed for VP6 support, and omxplayer for MJPEG support, so all 4 files can now play.

If you don’t want to build omxplayer by yourself, you can download the binary I’ve built: omxplayer-dist.tar.gz.

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

FFSB and IOzone: File System Benchmarking Tools, Features and Internals – ELCE 2012

January 16th, 2013 No comments

Keshava Munegowda and Sourav Poddar, software engineers at Texas Instruments, give a presentation about 2 relatively new file system benchmarks: The Flexible Filesystem Benchmark (FFSB ) and IOzone at the Embedded Linux Conference Europe 2012.

Abstract:

The IOzone is widely used File System Bench-marking tool in both linux and windows systems. The Flexible Filesystem Benchmark (FFSB) is a new cross-platform file-system performance measurement tool. It uses custom profiles as input to measure multiple file systems read/write performances. This paper identifies and compares these file system benchmarking tools in terms of the optimal usage techniques such as buffer size, number of threads, number of write blocks etc. Internals and features of these tools , and the necessary steps involved in the porting of benchmarking tools to different platforms are also discussed. The depicted file system benchmarking performance numbers, in this paper, are measured in both x86 PCs and ARM based SOC platforms.The audience for this presentation are the System Architects and Software Developers working on file systems,storage device drivers and Bench-marking tools.

IOzone and FFSB Benchmark Results on Intel Core i7 PC running Linux 3.2

IOzone and FFSB Benchnmark Results on Intel Core i7 PC running Linux 3.2

Agenda of the talk:

  • FFSB overview
  • FFSB profile files
  • FFSB internals
  • IOzone overview
  • IOzone internals
  • Porting of FFSB to ARM based platforms
  • Porting of IOzone to ARM based platforms
  • Example Results
  • FFSB v/s Iozone Summary
  • References

You can download the slides for this presentation, and download IOZone and/or FFSB to give it a try.

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

AMLogic Releases U-Boot and Updated Linux Kernel Source Code

November 22nd, 2012 11 comments

AMLogic released kernel 3.0.8 source code for AML8726-MX a few months ago, and yesterday they provided an updated tarballs with the kernel, and for the first time, AFAIK, released the source code for U-Boot.

There are 4 new files apparently generated from the (internal) git repository in AMLogic:

  • common-2012-11-20-git-b687495906.tar.gz  (108M) – This is the same kernel 3.0.8 release has last time, but with updated code.
  • m1-kernel-android-2012-11-20-git-5d0f6b8e93.tar.gz (103M) – This looks like an older kernel 2.6 for AML8726-M1 only.
  • uboot-master-2012-11-20-git-9b50e9a295.tar.gz (16M) – U-Boot 2010.06 possibly to use with the older 2.6 kernel. Only for M1 & M3 platforms.
  • uboot-next-2012-11-20-git-b0e532795a.tar.gz (40M) – U-Boot 2011.03 for use with M3 and M6 platforms.

I’ve already explained how to build the kernel in the previous post, so I’ll focus on U-Boot this time.

Ubuntu 12.04 arm-linux-gnueabi- toolchain fails to build U-Boot (uboot-next), so you’ll have to install Sourcery toolchain instead:

wget http://openlinux.amlogic.com/download/linux/ARM/gnutools/arm-2010q1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
tar xjvf arm-2010q1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2

You’ll also need the ARC toolchain, and you’ll have to build it from source (Unless you still use Ubuntu 9.04) since there are no binary packages. First download the source code:

wget http://sourceforge.net/projects/arc-linux/files/ARC%20GNU%20Toolchain/ARC%20GNU%204.4/arc_gcc_rel4.4.tar.gz/download -O arc_gcc_rel4.4.tar.gz
tar xzvf arc_gcc_rel4.4.tar.gz
cd arc_gcc_rel4.4

Install some dependencies:

sudo apt-get install libgmp-dev  libmpfr-dev

Build the ARC elf32 toolchain:

export ARC_GNU=~/edev/amlogic/arc_gcc_rel4.4
export INSTALLDIR=~/edev/amlogic/arc-4.4-elf32
export DISABLE_MULTILIB=--enable-multilib
./build-elf32.sh --force

Where ARC_GNU is the path where you extract the ARC toolchain source code, and INSTALLDIR your chosen installation directory. After a while, the ARC toolchain should be installed in ~/edev/amlogic/arc-4.4-elf32 (INSTALLDIR). Add both Sourcery and ARC elf32toolchains to your path:

export PATH=$PATH:~/edev/amlogic/arm-2010q1/bin:~/edev/amlogic/arc-4.4-elf32/bin

Extract the source code, and get a list of supported platform:

tar xzvf uboot-next-2012-11-20-git-b0e532795a.tar.gz
cd uboot-next
ls board/amlogic
boards.cfg  m3_wa_ref_v1  m6_skt_v1         Mesonboard_AML8726-M_V1.1
configs     m6_ref_v1     m6tv_skt_v1       Readme.mk
m3_skt_v1   m6_ref_v2     mbox_8626m1_v1.0

The listed directories correspond to the list of supported platforms. I used uboot-next in the example above, but the method is the same for uboot-master. I haven’t looked into the details and differences of each platform.

Finally select one platform to start the build, for example:

make m6_ref_v2

After a few minutes, U-Boot binary should be in build/u-boot.bin. To find out how to use it with the board, further reading in Amlogic U-Boot page should be helpful.

Via: J1nx Hackable Gadgets

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

Getting Started with 64-bit ARM Development: Hello World and Linux on ARMv8 Fast Models

November 6th, 2012 18 comments

At the end of last year, ARM announced ARMv8, the first ARM 64-bit ARM archtecture, and last week at ARM Techcon 2012, ARM announced the first ARMv8 cores: Cortex A53 and A57. But since there’s no silicon at the moment, what if you wanted to develop code running on ARMv8 before the hardware is available? The answer is: Fast Models, a Virtual Platform (VP) to accelerate software development. This is especially important for ARMv8 since hardware is not expected to be available for another year. In this post, I’ll first show how to run “Hello World!” in ARMv8 fast models, then we’ll run ARM Linux 64-Bit (Aarch64) in the virtual platform.

ARMv8 Foundation Model

In order allow the developer’s community to program for ARMv8 (Cortex A53/A57 cores), ARM has made ARMv8 Foundation Model, a virtual platform, available free of charge.

This v8 Foundation model provides a basic ARMv8 platform environment suitable for running bare metal semi-hosted applications, and Linux OS booting. The platform provides:

  • An ARMv8 processor cluster with 1-4 CPUs
  • Up to 8GB of RAM
  • An optional 128MB of secure RAM
  • 4 PL011 UARTs exposed as host TCP sockets
  •  A network device model connected to host network resources
  • A block storage device implemented as a file on the host
  •  A small system register block

The V8 processor model implements:

  • AArch64 at all exception levels
  • AArch32 support at EL0/EL1
  • Little and big endian at all exception levels
  • Generic timers
  • Self-hosted debug
  • GIC v2 memory mapped CPU interfaces and distributor
  • No support for Thumb2EE
  • No support for Crypto extensions

The models require an x86 64-bit Linux machine running Red Hat Enterprise Linux version 5.x for 64-bit architectures, Red Hat Enterprise Linux version 6.x for 64-bit architectures, Ubuntu 10.04 (64-bit) or later. However, any x86 64-bit Linux distributions with glibc v2.3.2 (or greater) and libstdc++ 6.0.0 (or greater), should be able to run the models. I used a machine running Ubuntu Desktop 12.04 LTS 64-bit with the instructions below.

Hello Word! for ARMv8

To get started, visit the page linked above, and click on “Download Now” at the bottom of the page. You’ll need to login or register (It’s free), and then on the top right of the screen click on “Download Now” again to start downloading the V8 Foundation Model.  You’ll a get a 8 MB file called FM000-KT-00035-r0p8-44rel23.tgz.

Let’s work in a terminal window, uncompress the file and run the “Hello World!” application.

tar xzvf FM000-KT-00035-r0p8-44rel23.tgz
cd ~/Foundation_v8pkg
./Foundation_v8 --image examples/hello.axf
 terminal_0: Listening for serial connection on port 5000
 terminal_1: Listening for serial connection on port 5001
 terminal_2: Listening for serial connection on port 5002
 terminal_3: Listening for serial connection on port 5003
 Simulation is started
 Hello, 64-bit world!

That’s it! Details are in in the document: DUI0677A_foundation_fast_model_ug.pdf, including instructions to access a web interface to monitor the machine, access to UART and more. hello.axf is a file based on “ARM Executable Format” that contains executable binary code generated with armlink linker part of the Keil ARM Compilation Tools. You can check the Makefile in the examples directory to see how armcc and armlink are used for the ARMv8 architecture.

Run ARMv8 Linux in the Virtual Platform

Now let’s do something a bit more interesting by running Linux (OpenEmbedded) in the v8 foundation model. The instructions I followed are available at http://www.linaro.org/engineering/armv8.

Prepare a working directory:

mkdir ~/linaro-armv8
cd ~/linaro-armv8

Download boot image:

wget http://releases.linaro.org/12.10/openembedded/aarch64/rc3/img-foundation.axf

Download and extract disk image:

wget http://releases.linaro.org/12.10/openembedded/aarch64/rc3/vexpress64-openembedded_sdk-armv8_20121019-22.img.gz
gunzip vexpress64-openembedded_sdk-armv8_20121019-22.img.gz

Run OpenEmbedded in the virtual platform:

~/Foundation_v8pkg/Foundation_v8 --image ~/linaro-armv8/img-foundation.axf --block-device ~/linaro-armv8/vexpress64-openembedded_sdk-armv8_20121019-22.img --network=nat

After a few seconds, a terminal window (Telnet attached to UART) with the kernel output should pop-up:

Linux boot on Cortex A57 virtual platformBe patient, and after several minutes (12 minutes on a PC based on Intel Core 2 processor @ 1.8 GHz), you should see the command prompt.
Let’s see if we really run on ARMv8:

uname -a
Linux genericarmv8 3.6.0-1-linaro-vexpress64 #1~ci+121019044339 SMP Fri Oct 19 05:03:44 UTC 2012 aarch64 GNU/Linux

cat /proc/cpuinfo
Processor       : AArch64 Processor rev 0 (aarch64)
processor       : 0
BogoMIPS        : 200.00

Features        : fp asimd
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant     : 0x0
CPU part        : 0xd00
CPU revision    : 0

Hardware        : V2P-AARCH64

All good!

Building for ARMv8

Running Linux in ARMv8 is nice, but what you really want to do is write and build programs for the platform. Natively build programs inside the foundation models is probably not a good idea for most programs, since it would be quite slow, so you’ll have to cross-compile for Aarch64. I’ll build the “Hello World!” application as explained in https://wiki.linaro.org/HowTo/HelloAarch64.

First download and install aarch64-toolchain:

mkdir ~/aarch64-toolchain
cd ~/aarch64-toolchain
wget http://releases.linaro.org/12.10/components/toolchain/gcc-linaro/aarch64/rc1/gcc-linaro-aarch64-linux-gnu-4.7+svn191987-20120925+bzr2498_linux.tar.xz
tar xf gcc-linaro-aarch64-linux-gnu-4.7+svn191987-20120925+bzr2498_linux.tar.xz
export PATH=$PATH:$PWD/gcc-linaro-aarch64-linux-gnu-4.7+svn191987-20120925+bzr2498_linux/bin

Install some dependencies:

apt-get install build-essential ia32-libs

Then write an  “Hello World!” program, and cross-compile it:

aarch64-linux-gnu-gcc -o hello hello.c

Let’s check the file is really a 64-bit binary:

file hello
hello: ELF 64-bit LSB executable, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.39, BuildID[sha1]=0xf99cedfc98f57956a6de9c1c04beba2acf32dfee, not stripped

Now copy it to the virtual platform, either by updating the rootfs, or via NFS or http, and run the program:

./hello
Hello World! cnxsoft is in the 64-bit ARM house!

Success!

For more, there are other very useful ARM Linux 64-bit tutorials on Linaro website, such as:

And you could also try the minimal, LAMP or SDK Aarch64 images.

It’s also possible to run Android (32-bit) in the V8 models as shown in the video below (mainly an interview), but instructions do not appear available, and it’s not something I would want to try in my (slow) machine…

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

Rockchip RK3066/RK30xx Processors Documentation, Source Code and Tools

November 4th, 2012 23 comments

Rockchip RK3066 (part of RK30xx family) is a Chinese dual ARM Cortex A9 SoC targeting multimedia products such as tablets (e.g. Cube U30GT), mini PC (e.g UG802, MK808) and in theory set-top boxes, but I can’t find any products based on this Rockchip processor. It seems mini PCs/ HDMI TV sticks have taken over this market.

RK3066 Processor

The processor features two ARM Cortex A9 clocked at up to 1.6 Ghz with a quad core Mali-400MP GPU. It can support 1080p (3D) encoding/decoding, provides HDMI 1.4a, VGA, composite, component and LVDS video outputs (Dual display support),  USB 2.0 Host and OTG ports, a MAC interface (Ethernet), and much more…

RK3066: Dual core Cortex A9, Video encoder/decoder, JPEG decoder/encoder, Peripherals

Rockchip RK3066 Block Diagram (Click to Enlarge)

Here are the key features of Rockchip RK3066 processor:

  • Dual Core A9 + Quad Core Mali-400MP GPU
  • 2 banks, 8/16 bit Nor flash / SRAM interface
  • 8 banks, 8/16 bit async NAND flash, LBA NAND flash and 8-bit sync ONFI NAND flash, all up to 60-bit hardware ECC
  • 2 GB space for 2 ranks, 16-bit / 32-bit DDR3-800, LPDDR2-800 and LVDDR3-800
  • 3 channels SD/MMC interface to support MMC 4.1 and SD3.0
  • 2 channels TFT LCD interface with 5 layers and 3D display with resolution up to 1920×1080
  • HDMI 1.4 to support 1080p@30 3D video
  • 2 channels 8-bit CCiR656 interface and 10-bit/12-bit raw data interface
  • Audio interfaces: 2 x 2ch  I2S/PCM, 1 x 8ch I2S/PCM interface and SPDIF interface
  • 1x USB OTG 2.0 interface and 1x USB 2.0 Host interface
  • 10/100M RMII interface
  • High-speed ADC interface and TS stream interface
  • Peripheral I/F: 5x I2C, 4x UART, 2x SPI and 4x PWM.
  • Video decoder supporting MPEG-1, MPEG-2, MPEG-4,H.263, H.264, AVS, VC-1, RV8/RV9/RV10, VP6/VP8, Sorenson Spark and MVC codecs.
  • Video encoder supporting H.264 ([email protected], [email protected], [email protected]), MVC and VP8
  • JPEG decoder/encoder

The chip contains a 10 KB internal bootROM that support system boot from 8bits/16bits Async Nand Flash, SPI0 interface and eMMC interface. So if you were expecting to be able to boot from SD card like for AllWinner A10, you’re out of luck. The ROM also supports system code download by USB OTG and  UART0 in CPU system.

Rockchip usually provides close to zero information about their processors on their website, so most of the information must be gathered from videos, blog articles or leaked documents.

RK3066 Development Boards and Documentation

Rockchip does appear to have some development boards, but I could not find any information apart from the picture below (Source) which shows RK3066 set-top-box reference design board. There must also a MID (Tablet) reference design since the schematics (below) have been leaked ,as well as smartphone development boards as there are mentioned in the source code.

rk3066_box_v1.0 development board

Rockchip RK3066 Set-top Box Reference Design

Documentation is sparse by there’s at least 3 interesting documents that have been leaked (found via ArmTvTech Forums):

  • RK30xx_TRM_Rev2_0_p25_38.pdf – Page 25 to 38 extracted from RK3066 Technical Reference Manual (TRM) revision 2.0 just showing the detailed features of the processor. Better use RK3066 datasheet brief below that contains the same information (and more) and is searchable.
  • RK3066_MID.pdf – Schematics for RK3066 reference tablet (RK3066_REF_2CELL). See block diagram below.
  • RK3066_datasheet_brief.pdf – RK3066 “datasheet” (46 pages) giving a detailed description of the processor processor features,  pinout and electrical characteristic. Don’t expect to find any information about registers in this document.

RK3066 MID Block Diagram (Click to Enlarge)

This documentation is good if you want to better understand the features of the processor, find the connection on the boards (e.g. UART), but unfortunately they do not help much when it comes to software development.

RK3066 Linux Kernel Source Code

Rockchip and the companies developing products based on their processors usually drag their feet to release the GPL source code. bq, a Spanish company, appears to be the first company to release the GPL source with RK3066 devices, more exactly their bq Edison and Edison 3G tablets.

They released the source as a tarball (GPL_Edison.tar.gz), but omegamoon imported the code to his github account, and added what’s necessary to build the kernel for MK808 mini PC. Please note that only the Linux kernel source code was released, and apparently the bootloader and no part of Android fall under the GPL license…

As the .config in the root directory is for MK808 at the time of writing, I gave it a try as follows:

git clone https://github.com/omegamoon/rockchip-rk30xx-mk808.git
cd rockchip-rk30xx-mk808
make -j 12 CROSS_COMPILE=arm-linux-gnueabihf- uImage
make -j 12 CROSS_COMPILE=arm-linux-gnueabihf- modules

and was able to build the code successfully on a Debian Wheezy 64-bit build machine. The first time it actually failed because uuencode utility was missing. If you encounter the same issue you can install it with apt-get:

sudo apt-get install sharutils

I did not try the kernel since I don’t have RK3066 hardware, but the guys at ArmTvTech appeared to be successful.

I always interesting to look in arch/arm/configs to see what configs are available for a given platform:

  • rk30_sdk_defconfig – RK30 SDK board (Apparently a tablet board)
  • rk3066_sdk_defconfig – RK3066 SDK board. Basically the same as above except a different gyroscope and a different WiFi (memory?) option are used.
  • bqEdison_defconfig – This is the configuration file for bq Edison tablet

In the KConfig we can also find some other hardware (mobile phone boards), but no defconfig files are using those in the source code released:

  • RK30 smart phone board (MACH_RK30_PHONE)
  • RK30 smart phone loquat board (MACH_RK30_PHONE_LOQUAT)
  • RK30 smart phone a22 board (MACH_RK30_PHONE_A22)

Since we now have the source code, and some people have started to work on a Linux port, but this will certainly take some, and don’t expect GPU acceleration ever on RK30xx Linux. And the lack of SD card boot capability really makes it a pain, since you’ll have to choose Linux over Android and vice versa. However, this kernel has already been useful for Android as some kernel modules have been build for MK802/UG802 (e.g. Bluetooth)

RK3066 Tools

There are also some tools available for RK29xx & RK3066 (rktools) mainly to modify ROMs which you can retrieve and build as follows:

git clone https://github.com/rk3066/rk-tools.git
cd rk-tools
sudo apt-get install libssl-dev libcrypto++-dev
make

This will generate 4 tools:

  • afptool – Tool to unpack and pack the firmware files
    Command line:

    • afptool -pack xxx update.img
    • afptool -unpack update.img xxx
  • img_maker – Tool to create rkimage files (and it seems to convert the old firmware format to the new firmware format)
    Command line: img_maker [-rk30|-rk29] [loader] [major version] [minor version] [subversion] [old image] [out image]
  • img_unpack – A tool to unpack (new format) firmware images
    Command line: ./img_unpack <source> <destination>
  • mkkrnlimg – Tool to pack and unpack Kernel images (Also part of omegamoon github account in binary form).
    Command line: ./mkkrnlimg [-a|-r] <input> <output>

Another tools call rkflashtool can be used to reflash the NAND. The source code is here, and it’s for RK29xx / RK28xx processor, but RK3066 modding instructions are available. “This tool uses a low level protocol supported by the internal bootloader of the RK processor. Because of that, this tool doesn’t need anything to be present on NAND flash, and can be used to successfully reflash bricked tablets”. See Arctablet for details.

Finally Romdump allows you to dump RK3066 ROM to an SD card, check Vondroid for details.

Sorry, if the usage for each tool is not very clear, but it’s just not obvious to me either, and I could not find a wiki or tutorial to use them. So if any reader has already worked with those, better descriptions or links to tutorials/wikis are welcome.

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