Home > Android, Linux, Programming, Rockchip RK31xx, Ubuntu > Rockchip RK3188 Linux Source Code is Now Available

Rockchip RK3188 Linux Source Code is Now Available

Good news! I’ve just read Rockchip RK3188 Linux source code has just been released via Rikomagic, and Alok Sinha, the main maintainer of RK3066 source code, has already imported into github, and we should soon see a PicUntu image for RK3188 mini PCs.

RK3188_menuconfig

Let’s have a look:

git clone git://github.com/aloksinha2001/Linux3188.git
cd Linux3188

[Update: you may have to run “sudo apt-get install libc6-i386″ before running make_kernel_ruikemei.sh below, as mkkrnlimg is a 32-bit binary]

Usually, I immediately look into arch/arm/configs, but this time, there’s a “funny” script called make_kernel_ruikemei.sh, and .config already have some CONFIG_RK3188, so let’s run it:

export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
./make_kernel_ruikemei.sh

After just over a minute, success!:

  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  OBJCOPY arch/arm/boot/Image
  Kernel: arch/arm/boot/Image is ready

mkkrnlimg V20120220
cmd:/home/jaufranc/edev/sandbox/rk3188/Linux3188/arch/arm/boot/Image /home/jaufranc/edev/sandbox/rk3188/Linux3188/kernel.img [(null)]
kernel Image:/home/jaufranc/edev/sandbox/rk3188/Linux3188/kernel.img for mid is ready.
   Image:  kernel.img is ready

This kernel image is for Android only, and there’s a little work to modify it as a “pure” Linux kernel, so that it can be used to boot PicUnutu for RK3188.

Let’s go back to arch/arm/configs, and we’ll find several RK3188 configs:

  • rk3168_86v_defconfig
  • rk3188_dongle_defconfig
  • rk3188_ds1006h_defconfig
  • rk3188_ds1006h_v1_0_defconfig
  • rk3188_hotdog_defconfig
  • rk3188_LR097_defconfig
  • rk3188_magicwand_defconfig
  • rk3188_steak_defconfig

However, in arch/arm/mach, there are only board files for rk3188-box and rk3188-ds1006h.

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

  1. inter1965
    June 7th, 2013 at 00:53 | #1

    That’s great, i’m looking forward to a usable archlinux arm version.

  2. Galland
    June 7th, 2013 at 05:12 | #2

    The RK3168 boards (along with the latest for RK3066) are located in arch/arm/mach-rk30
    I guess this is due to their also being a dual-core.

  3. qwiqooq
    June 7th, 2013 at 17:23 | #3

    RK3066 please!

  4. tom
    June 7th, 2013 at 20:06 | #4

    Hi

    Which rk3118 device should I buy To get best community support ?

  5. June 7th, 2013 at 20:27 | #5

    @qwiqooq
    The source for RK3066 has been available for a while. The most active repo must be https://github.com/aloksinha2001/picuntu-3.0.8-alok

  6. June 7th, 2013 at 20:31 | #6

    @tom
    For Android support, check out http://www.armtvtech.com/armtvtechforum/viewforum.php?f=206 or http://www.freaktab.com/forumdisplay.php?134-RK3188-Devices. It seems now Tronmsart T428 is the device with most activity.

    For Linux support, you may want to wait a bit, probably one of the device with Realtek Wi-Fi.

  7. Raymond Day
    July 16th, 2013 at 16:03 | #7

    How did you get the screen of the installer or what ever it’s called.

    I did this on my MK808 that has picuntu on it. I love it to run on the MK908 or RK3188 what they call it.

    Here what my command lines look like:

    “root@small4:~/Linux3188# ./make_kernel_ruikemei.sh
    *************
    rm logo_linux_clut224
    *************
    ***********************
    copy logo_linux_clut224.ppm
    ***********************
    ***********************
    make kernel.img
    ***********************
    HOSTCC scripts/basic/fixdep
    HOSTCC scripts/kconfig/conf.o
    HOSTCC scripts/kconfig/zconf.tab.o
    HOSTLD scripts/kconfig/conf
    scripts/kconfig/conf –silentoldconfig Kconfig
    CHK include/linux/version.h
    UPD include/linux/version.h
    HOSTCC scripts/kallsyms
    HOSTCC scripts/bmptologo
    HOSTCC scripts/conmakehash
    CC scripts/mod/empty.o
    HOSTCC scripts/mod/mk_elfconfig
    scripts/bmptologo.c: In function âwrite_footerâ:
    scripts/bmptologo.c:247:3: warning: format â%ldâ expects argument of type âlong intâ, but argument 4 has type âunsigned intâ [-Wformat]
    MKELF scripts/mod/elfconfig.h
    HOSTCC scripts/mod/file2alias.o
    HOSTCC scripts/mod/modpost.o
    HOSTCC scripts/bin2c
    CHK include/generated/utsrelease.h
    UPD include/generated/utsrelease.h
    Generating include/generated/mach-types.h
    HOSTCC scripts/mod/sumversion.o
    CC kernel/bounds.s
    GEN include/generated/bounds.h
    CC arch/arm/kernel/asm-offsets.s
    GEN include/generated/asm-offsets.h
    CALL scripts/checksyscalls.sh
    HOSTLD scripts/mod/modpost
    CC init/main.o
    CHK include/generated/compile.h
    HOSTCC usr/gen_init_cpio
    CC arch/arm/vfp/vfpmodule.o
    UPD include/generated/compile.h
    AS arch/arm/vfp/entry.o
    CC arch/arm/kernel/elf.o
    AS arch/arm/kernel/entry-armv.o
    AS arch/arm/vfp/vfphw.o
    AS arch/arm/kernel/entry-common.o
    CC arch/arm/vfp/vfpsingle.o
    CC arch/arm/kernel/irq.o
    /root/Linux3188/scripts/gen_initramfs_list.sh: Cannot open ‘../initramfs/initramfs.cpio’
    make[1]: *** [usr/initramfs_data.cpio.gz] Error 1
    make: *** [usr] Error 2
    make: *** Waiting for unfinished jobs….
    CC init/do_mounts.o
    CC arch/arm/vfp/vfpdouble.o
    CC arch/arm/kernel/process.o
    CC init/do_mounts_initrd.o
    CC arch/arm/kernel/ptrace.o
    CC init/initramfs.o
    CC init/calibrate.o
    LD arch/arm/vfp/vfp.o
    LD arch/arm/vfp/built-in.o
    CC arch/arm/kernel/return_address.o
    CC init/version.o
    arch/arm/kernel/return_address.c:62:2: warning: #warning “TODO: return_address should use unwind tables” [-Wcpp]
    CC arch/arm/kernel/setup.o
    CC arch/arm/kernel/signal.o
    LD init/mounts.o
    CC arch/arm/kernel/sys_arm.o
    LD init/built-in.o
    CC arch/arm/kernel/stacktrace.o
    CC arch/arm/kernel/time.o
    CC arch/arm/kernel/traps.o
    CC arch/arm/kernel/armksyms.o
    CC arch/arm/kernel/module.o
    AS arch/arm/kernel/sleep.o
    CC arch/arm/kernel/sched_clock.o
    CC arch/arm/kernel/smp.o
    CC arch/arm/kernel/smp_tlb.o
    CC arch/arm/kernel/smp_scu.o
    CC arch/arm/kernel/sys_oabi-compat.o
    CC arch/arm/kernel/unwind.o
    CC arch/arm/kernel/swp_emulate.o
    CC arch/arm/kernel/pmu.o
    CC arch/arm/kernel/io.o
    AS arch/arm/kernel/head.o
    CC arch/arm/kernel/init_task.o
    LDS arch/arm/kernel/vmlinux.lds
    LD arch/arm/kernel/built-in.o
    root@small4:~/Linux3188# ls
    arch drivers Kconfig mkkrnlimg scripts
    block firmware kehu_ruikemei mm security
    config fs kernel net sound
    COPYING include lib README tools
    CREDITS init MAINTAINERS README.md usr
    crypto ipc Makefile REPORTING-BUGS virt
    Documentation Kbuild make_kernel_ruikemei.sh samples
    root@small4:~/Linux3188# cd arch
    root@small4:~/Linux3188/arch# ls
    alpha cris Kconfig mips s390 tile xtensa
    arm frv m32r mn10300 score um
    avr32 h8300 m68k parisc sh unicore32
    blackfin ia64 microblaze powerpc sparc x86
    root@small4:~/Linux3188/arch# cd ..
    root@small4:~/Linux3188# ls
    arch drivers Kconfig mkkrnlimg scripts
    block firmware kehu_ruikemei mm security
    config fs kernel net sound
    COPYING include lib README tools
    CREDITS init MAINTAINERS README.md usr
    crypto ipc Makefile REPORTING-BUGS virt
    Documentation Kbuild make_kernel_ruikemei.sh samples
    root@small4:~/Linux3188#”

    Don’t get what to do now?

    I guess some how put it on the 16GB SD card I have to reboot to recovery?

    -Raymond Day

  8. July 16th, 2013 at 16:32 | #8

    @Raymond Day
    You’d have to check what causes:
    “/root/Linux3188/scripts/gen_initramfs_list.sh: Cannot open ‘../initramfs/initramfs.cpio’”

    But if you just want to install Linux on RK3188, you don’t need to build it yourself unless you want to.
    http://www.cnx-software.com/2013/06/15/ubuntu-12-04-now-boots-on-rockchip-rk3188-mini-pcs-t428-mk908-rikomagic-mk802-iv/

    Yet, this is still working in progress, and AFAIK a Pictuntu RK3188 image has not been released yet.

  9. July 31st, 2013 at 07:01 | #9

    drink@alexander:~/Software/src/Linux3188$ ./make_kernel_ruikemei.sh
    *************
    rm logo_linux_clut224
    *************
    ***********************
    copy logo_linux_clut224.ppm
    ***********************
    ***********************
    make kernel.img
    ***********************
    CHK include/linux/version.h
    CHK include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h’ is up to date.
    CALL scripts/checksyscalls.sh
    CHK include/generated/compile.h
    /opt/src/Linux3188/scripts/gen_initramfs_list.sh: Cannot open ‘../initramfs/initramfs.cpio’
    make[1]: *** [usr/initramfs_data.cpio.gz] Error 1
    make: *** [usr] Error 2
    make: *** Waiting for unfinished jobs….

  10. July 31st, 2013 at 10:43 | #10

    @Martin Espinoza
    You need to check the full log for errors. It’s possible one dependency is not installed.

  11. enboig
    September 22nd, 2013 at 06:32 | #11

    @Martin Espinoza

    I solved this problem following http://www.sysresccd.org/forums/viewtopic.php?f=25&t=3165&start=0

    I removed the content in .config of CONFIG_INITRAMFS_SOURCE

  12. thehid
    February 14th, 2014 at 04:20 | #12

    Hey guys, what went wrong, if the output is like that:

    LD vmlinux
    SYSMAP System.map
    SYSMAP .tmp_System.map
    OBJCOPY arch/arm/boot/Image
    Kernel: arch/arm/boot/Image is ready
    make: *** [kernel.img] Fehler 127

    I have a Neo x7 and would like to compile a wheezy.

  13. February 14th, 2014 at 10:14 | #13

    @thehid
    Scroll up to find the error, or run “make”, not “make -jx” to see the error at the end.
    You would better use Minix SDK instead of the code here, as their kernel will exactly match their hardware.

    You should be able to use instructions adapted from to http://www.cnx-software.com/2014/01/27/getting-started-with-raxda-rock-how-to-generate-and-flash-ubuntu-saucy-server-and-desktop-images/ to run Debian Wheezy on Neo X7.

  14. thehid
    February 14th, 2014 at 22:26 | #14

    @cnxsoft

    Hi cnxsoft, thank you for the fast reply.

    Can I use the instructions for the raxda rock also for me neo x7? I’m not familiar with with kernel compiling and image construction. Do you know a good tutorial for building images for neo x7?

    The last lines of my make command, doesnt show error:

    LD [M] sound/core/seq/snd-seq.ko
    CC sound/usb/misc/snd-ua101.mod.o
    LD [M] sound/usb/misc/snd-ua101.ko
    HOSTCC firmware/ihex2fw
    IHEX2FW firmware/emi26/loader.fw
    IHEX2FW firmware/emi26/firmware.fw
    IHEX2FW firmware/emi26/bitstream.fw
    IHEX2FW firmware/emi62/loader.fw
    IHEX2FW firmware/emi62/bitstream.fw
    IHEX2FW firmware/emi62/spdif.fw
    IHEX2FW firmware/emi62/midi.fw
    IHEX firmware/ti_3410.fw
    IHEX firmware/ti_5052.fw
    IHEX firmware/mts_cdma.fw
    IHEX firmware/mts_gsm.fw
    IHEX firmware/mts_edge.fw
    H16TOFW firmware/edgeport/boot.fw
    H16TOFW firmware/edgeport/boot2.fw
    H16TOFW firmware/edgeport/down.fw
    H16TOFW firmware/edgeport/down2.fw
    IHEX firmware/edgeport/down3.bin
    root@note-linux:/home/neo_kernel/Linux3188#

  15. February 15th, 2014 at 10:47 | #15

    @thehid
    So the build managed to complete….

    Yes, the instructions for Radxa Rock and Neo X7 will be very similar because they both use RK3188, but you need to use the minix SDK (they’ve released it for the UI competition) to build the kernel (and boot.img), and the rest should be about the same.

  16. stefan
    March 8th, 2014 at 03:54 | #16

    @cnxsoft
    I needed to install libc6-i386 to get the 32-bit mkkrnlimg to work.
    Gave me the [kernel.img] error 127, before.

  17. March 8th, 2014 at 09:18 | #17

    @stefan
    Thanks. I’ll update the post.

  18. dhruv
    September 10th, 2014 at 01:36 | #18

    I get this error at the end when I compile the kernel. Could you please update me.
    SYSMAP .tmp_System.map
    OBJCOPY arch/arm/boot/Image
    Kernel: arch/arm/boot/Image is ready
    /mkkrnlimg: cannot execute binary file
    make: *** [kernel.img] Error 126

  19. September 10th, 2014 at 13:09 | #19

    @dhruv
    mkkrnimg cannot run… Are you building the kernel an x86/x86-64 machine or directly in a RK3188 development board ?
    The instructions above are for cross-compiling in a Linux PC.

  1. June 6th, 2013 at 22:25 | #1
  2. June 7th, 2013 at 19:39 | #2
  3. June 15th, 2013 at 10:25 | #3
  4. August 10th, 2013 at 15:55 | #4
  5. December 7th, 2013 at 22:14 | #5