Category Archives: development

Easy way to build Rock960 ARM64 system image.

Why need to do this?

96Board developing team only provides armhf ( arm 32bit ) pre-build images in officially. But some people as like me, are need to use AARCH64 for better performance. This article is for people who demands runs Rock960 board on AARCH64.


  • x86.64bit debian based Linux, recommends ‘Linux Mint 18.x’.
  • Make sure your linux ‘up to date’ by these
    • sudo apt-get update
    • sudo apt-get upgrade
  • These packages to be installed before start.
    • git related
      • repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted pv libssl-dev
    • some others
      • binfmt-support qemu-user-static python-dbus python-debian python-parted python-yaml
    • use  sudo apt-get install ... with above packages to be installed.
  • Some other tool binaries, ‘rkdeveloptool’ and ‘k3399_loader_v1.12.112.bin’.
    • Recommend to install ‘rkdeveloptool’ to your system – ‘/usr/local/bin’.
    • ‘rkdeveloptool’ is placed in ‘rkbin/tools’, or refer to my prebuilt image archive.

Clone Rock960 repositiory

There’s may many ways to getting source codes, but I recommend to do this way with your git client. And we before start, make a directory to identify where we are starting rock960 building work, so I recommend to make ‘rock960dev’ directory on your home ( ~, or ${HOME} ).

Then, let’s do these, remember – this work takes may long long waiting …

Build kernel and u-boot

You may waited for long time to be done, now we need keep moving to next step to build kernel and u-boot. these are important your board works to ARM64(AARCH64).

And remember, Rock960 board model name is ‘rock960ab’, or if you bought ‘C’ model ( no built-in eMMC model ) means ‘rock960c’ – it’s little bit different model but same platform of RK3399.

Our journey will be started in ~/rock960dev, and type like these.

This works generates each ‘.config’ files in kernel and u-boot directory with default ‘rock960ab’ model configurations. You can change kernel options with ‘menuconfig’ in kernel directory with make ARCH=arm64 menuconfig.

Build file system

All linux ( or Windows, or Android too ) need file system that contains many things like busybox and desktop ( X11 ) for doing something. So we need build file system.

First thing to do, is install some packages in local ( don’t need to consider failure while install these, just skip them if met failure screen ) in ‘rootfs’ directory.

Le’ts move to ‘rootfs’ and your current directory path will be ‘ ~/rockdev/rootfs’, then let’s do this for once.

Now, time to build desktop system !

Just a wait, you didn’t minded to build desktop (LXDE) build ? Just change TARGET to what you wnated – maybe server with ubuntu release ?

And it may takes really long waitness, drink a beer and fish&chips. Or a cup of coffee. Or continue to tomorrow.

Make a system.img

Everytime you done each work, all generated file copies to ‘rock960dev/out’ directory except root file system ( it generates linaro-rootfs.img in rootfs directory ). So when we reached to step for making file system done, now it need to make it a whole image as know as ‘system.img’.

Now let’s move to rock960dev directory, then proceed this.

A file ‘system.img’ will be generated in ‘out’ directory.

Flashing your image to Rock960 board !

Now it is left only for last step of flashing new image to eMMC.

Let’s make your datas backed up to somewhere in Rock960 board, then step inside to flash eMMC and new 64bit linux with ‘MASKROM’  and ‘RESET’ buttons on board. Press them together and release only ‘RESET’ to enter ROM writing mode.

Now flashing them all


Rock960 debian stretch prebuild system image for AARCH64

Currently 96rock’s (VAMRS) Rock960 board officially published for debian stretch image for 32bit ( they aren’t published for AARCH64 ), so I rebuilt their open source for supporting nvative AARCH64 at all with bundled LXDE.

Download link:!cp1wRSZS!Lg35IENdY7eyzCLT5PpYZc81b3XCZexUYq9n46YP_ig

This compressed binary contains many things: seperately kernel and u-boot image. But you don’t have to flash them in each, just use rkdeveloptool in toolbin.


  • Extract compressed file to somewhere to use them easily.
  • Move to extracted path.
  • Give permission “rkdeveloptool” binary to executive, use
  • Make your Rock960 board connected USB-C to your PC and turn to maskrom mode ( push both of maskrom and reset butttons, then release only reset )
  • Your host PC ( may Linux ) should detects new USB device, then it may allow to downloading mode with rkdeveloptool.
  • Then just write system.img to your board.
    Warning : all your datas in eMMC may deleted, back up your data before doing this !
  • It may takes for minutes, wait for done.
  • Then reset your board.

After boot up

You may see LXDE desktop within a minute, then connect to your WiFi, then make systems up to date with these.


How to know 64bit ?

Just make a C++ source and compile it, then run it for a test. ( before you may need get install g++ with this :  sudo apt-get install g++ )



Additional build info

My AARCH64 system image build in these options –

  • Default Rockchip configuration
  • Not supports SOC cameras ( a.k.a MIPI-CSI )
  • USB-C OTG supports as default option ( removable drive at host PC )

Recommended work to do after flashing image

  • Keep update your system via ‘apt-get’
  • Manage your power configuration – I don’t recommend to use power manager ( there’s many Rockchip DWM driver control errors )

Recommended for developers

  • Install ‘g++’ first.
  • LXDE’s X11 library is not much functional – need to consider non-acccelerated desktop graphics ( because MALi 8xx not suppors OpenGL ! – OpenGL|ES and OpenGL is not compatibled )

Create HBITMAP from Fl_RGB_Image

Here is a simple code for convert Fl_RGB_Image to HBITMAP.

It should be help to convert Fl_RGB_Image ( must have depth 4 for RGBA ) to HBITMAP. And it works for changing Fl_Window to Layered window easily like this.

And it may runs as this.

How to set debug mode easily for libusb and libuvc.

Here is a tip for programer for debug any application with using libusb(x) or libuvc.

There’s many way to debug what it going on with gbd when you are using gcc or MinGW (incl. MinGW-W64) , you may feels somehow difficult to control gdb to debug in deep call stacks without IDE like Code::Blocks.

You can use putenv() to set debug mode to print all messages to ‘stdout’ (aka. console, or terminal) .


Enable debugging message

Meaning of number appends LIBUSB_DEBUG is this level :

When you enabel this, you can see all debugging messages on your terminal or console.

Developing libuvc for MinGW-W64, day 1

Now I am trying to get YUV2 buffer from formal USB camera, but it doesn’t easy on Windows system. MS designed most of USB video devices need to use Direct media layer, but it occurs many different problems while using OpenGL or hardware accelerated surface at same instance of Windows application.

So I made it from starting understand UVC and common library of libuvc.

And I understood it depends on libusb that is well known libraray for multiple platforms except Windows. So I have to make it building ways as like Makefile on MSYS and for MinGW-W64, then it comes to Josh Blake’s libusbx to customized for build in MinGW-W64 and MSYS easily.

But it still has many problems, exactly same failure for -12 ( UNSUPPORTED ).

It belongs to failure of libusb_open() returns -12 through libuvc error result. Testing open USB HD Camera with libusb or libusbx always same.

It must be study for what different Windows USB drivers, and why UVC not able to open with formal libusb, further need to understand libusb-win32 or libusbk.

So I reached same position again, Windows is not my option, really.

Make your picture to bright ! MIOH(DR)

It was finally released beta build for Mac OS X (Tested with El Capitan and High Sierra) 64bit native application to my open source repository. You can download it here in totally free !

About MIOH

This program is an open source project as GPLv3. Everybody can use my prebuilt binary in totally free, but source code may open to use in commercial. Or make your own new program with my source codes, it should be avoid license, maybe 🙂

Make Image O’ HDR is based on 3 different algorithms to boost your image to has high dynamic range as we seeing everything on our eyes.

How to use ?

Here explains how could it be able enhancing my picture for better than before, as like Pro !

First at all, you may download latest version of application for your OS in here. MIOH now supporting two different OS, Windows 64 and Mac OS X 64. Specially Windows 64 binaries contained normal (SSE3 SIMD + OpenMP) and avx (AVX SIMD + OpenMP). Mac OS X not supporting OpenMP now because built in LLVM-GCC not able to use OpenMP.

When you had ran this application ( Mac OS X users may need open in CMD+click, or right mouse click with selecting Open in popup memu, then agree to open ), you can see just like this.

Don’t be worry, just drag your picture file to application or Open a file with icon that contins “+” as you can see. It may not hurts you !


MIOH supporting JPEG, PNG and windows-BMP formatted image now, Most of your picture may loaded to this application, and it will appeared what contains in file.

You can rotate your picture in each CW 90 or CCW 90 degrees by pressing Command(or Control) and left or right arrow key, or select rotating icon on toolbar. MIOH not automatically rotates your picture by reading EXiF meta information.

You can change each different filters ( Log mapping, Reinhard and eCLAHE ) with different parameters with get hint when your mouse pointer stay on each parameter input, and just click to a Check button to apply changes from your previous picture. It is easy way to get new picture with few clicks.

Okay, now you can save new picture with PNG formatted file, or copy to clipboard with Command(or Control) C. MIOH will copy processed picture to your clipboard to maximum long width or height of 2048px resized.

You can paste clipboard image to your own graphic editor, or any application.

Just download it and uses for your better picture! Make your picture to HDR now, it’s free.



MIOH(MIOHDR) used my open source libraries.


Now Removu S1 supports firmware upgrading for Mac OS X.

It’s been a long waiting, Ha!

Now Removu S1 supports Mac OS X with their new Mac OS X app. Sure it made with native codes with llvm-gcc and FLTK 1.3.4-1-ts of my git clone, thanks anyway.

It was started from their Windows based (actually made with M$VS C# and WTF… no! WPF ? whatever sucks strange GUI hmm … dot NET ?, you know what it is, actually I can not sure) but I couldn’t made anything with their Chinses commented source code, ever. Because it was only runs on Windows, and serial communicating not compatibled with any POSIX, ahh … what a beautiful situation, hugh ?

So I made it whole codes from my open sources, try to make communicate with S1 device on Mac OS X and Linux for while, and I need cold reboot MUCH times by goddam Silicon Labs’ MotherFather driver ( holy sheeeeet thanks to them ), And actually had success to match the argument of S1 packets, it was really hard way.

Now Mac OS X users may understand my previous blurred effect graphics, Just enjoy !


I was made it with Mint Linux, but Essel-T seems not planned to support Linux, that’s so sad news.

Making boosting image signal for stereographics…

There maybe many different ways to detect depth of object, but it depends on reflecting signal intense to indentifying the changing of trace.

So I am now making a new fast and ineffective algorithm with these steps, gamma, median and applying my own algorithm of edge enhancement, then muxing it’em all with source original signals to complete image. Testing was completed in integer world, and planned to step next for floating points.

How to know my gcc OpenMP version ?

Here’s some easy way to know my gcc support what version of OpenMP in compiling level.

First, type this to your shell ( not Windows )

echo | cpp -fopenmp -dM | grep -i open

You may see one of these.

  • 200505 = version 2.5
  • 200805 = version 3.0
  • 201107 = version 3.1
  • 201307 = version 4.0
  • 201511 = verison 4.5

Or trying to make a complete code with Makefile with my source: omptest

Extract to anywhere able to approach with bash (or MSYS, MinGW shell too), then move to position where you been extract.

Just type make. A test named executabled binary (or test.exe if your system is Windows) may genertated, then jsut run it.

You may see what version of OpenMP supported by your gcc compiler.


Now working on R* S1 FW Writer for Mac OS X.

For some people to waited for long, it will comes out soon what about firmware upgrading program for Mac OS X. Now I am working on it in Linux and Mac OS X by my multi-platform availed libraries.

Wait for more days, it will release on manuafacturer home page, and you will be happy.

Here’s old version of developing of GUI sequence, you may hope this graphics may exactly same on Mac OS X. (even more faster and smooth !)