Home > Linux, Programming, Telechips TCC89XX > Building the Linux Kernel 3.0.8 For Telechips TCC8925 mini PCs (CX-01, Z900, TizzBird N1…)

Building the Linux Kernel 3.0.8 For Telechips TCC8925 mini PCs (CX-01, Z900, TizzBird N1…)

Yesterday, we got Linux kernel 3.0.8 source code from Telechips, as well as some files related to Android 4.0 (Webkit + OMX). Today, I’ve had a look at the kernel source code and found a few very interesting things.

First let’s get the code from github:

git clone git://github.com/cnxsoft/telechips-linux.git

Good news! The code for the latest Telechips TCC892X is present in arch/arm/mach-tcc892x, and there is support for 3 types of boards:

  • board-m805_892x – TCC8923 M805 board
  • board-tcc8920 – TCC8920 evaluation board
  • board-tcc8920st – TCC8920 STB evaluation board

TCC8920 STB evaluation board appears to be relevant to products such as Diyomate A6, but if it’s also used for TCC8925 HDMI Dongle such as CX-01 mini PC, Zero Devices Z900 or ValuePlus TizzBird N1.

Now let’s have a look at the default config directory for arm (arch/arm/configs):

ls | grep tcc89
tcc8920st_defconfig
tcc8920st_hdb892s_defconfig
tcc8925st_dongle_defconfig
tcc8925st_donglehs_defconfig
tcc8925st_hdb892f_defconfig
tcc8925st_isdbt_module_defconfig
tcc892x_defconfig

Nice! tcc8925st_dongle_defconfig and tcc8925st_donglehs_defconfig look particularly interesting!

TCC892X Boards Selection

A quick comparison shows that the only difference is that tcc8925st_donglehs_defconfig sets CONFIG_HDMI_DONGLE_CLOCK_HIGH_SPEED=y.

Looking further in the source code:

#define TCC_CPU_FREQ_HIGH_SPEED         812500
#define TCC_CPU_FREQ_NORMAL_SPEED       716500

So tcc8925st_dongle_defconfig configuration file sets TCC8925 to run at 716.5 MHz and tcc8925st_donglehs_defconfig to 812.5 MHz.

The kernel configuration enables the Android stuff, so it’s probably the kernel we’ve got in the device running Android. Let’s try to build the kernel with TCC8925 clocked at 812.5 Mhz (High Speed config) assuming you’ve got the ARM toolchain already installed (run apt-get install gcc-arm-linux-gnueabihf in Ubuntu, if you don’t):

make ARCH=arm tcc8925st_donglehs_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 uImage
....
Image Name:   Linux-3.0.8+
Created:      Wed Jul 18 20:22:07 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3136392 Bytes = 3062.88 kB = 2.99 MB
Load Address: 10008000
Entry Point:  10008000
Image arch/arm/boot/uImage is ready

Good! It can build! We now have got the kernel (zImage and uImage) in arch/arm/boot. Let’s build the kernel modules:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 uImage INSTALL_MOD_PATH=build_modules modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 uImage INSTALL_MOD_PATH=build_modules modules_install

The kernel modules are located in build_modules directory. There are only 2 kernel modules: gspca_main.ko (video driver) and scsi_wait_scan.ko.

I cannot give it a try now, as I haven’t received the hardware yet. The other thing I would like to get before hacking CX-01 mini PC is a recovery firmware, and the eventual tools to recover the device when something bad happens. I’ve contacted PandaWill to try to get it. The bootloader code would also be nice, but not an absolute must. However, I believe it’s unlikely we’ll get the bootloader source code since Telechips does not appear to have released it for the older versions of its TCC processors.

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. max
    July 19th, 2012 at 12:32 | #1

    Great.
    Is this Linux kernel source code (+ android webkit tools etc) has been released for Allwinner A10 series processors or related boards also ?

    Or the development done by community on these has been done solely by hacking / cracking the modules?

  2. July 19th, 2012 at 12:37 | #2

    @ max
    I’m not exactly sure, but I think the AllWinner A10 kernel source has never been officially released. Instead, it has been made available through leaks, and lateron by manufacturers releasing the GPL part of the source. All tools and documentation have been either leaked or hacked/provided by the community.

  3. myxa78
    July 24th, 2012 at 14:35 | #3

    “I’ve contacted PandaWill to try to get it”
    Have you got an answer about firmware?

  4. July 24th, 2012 at 16:33 | #4

    @ myxa78
    This is where I asked: http://www.pandawillforum.com/showthread.php?11641-New-Arrival-CX-01-Mini-Android-TV-Box-Android-4-0-Cortex-A5-HDMI-USB-4GB&p=67330&viewfull=1#post67330

    I think you are there as well. We should try to get a firmware and a method to root it, or a rooted firmware.

  5. myxa78
    July 25th, 2012 at 14:33 | #5

    cnxsoft :@ myxa78 This is where I asked: http://www.pandawillforum.com/showthread.php?11641-New-Arrival-CX-01-Mini-Android-TV-Box-Android-4-0-Cortex-A5-HDMI-USB-4GB&p=67330&viewfull=1#post67330I think you are there as well. We should try to get a firmware and a method to root it, or a rooted firmware.

    i root it without trouble…it’s easy
    but i need to backup firmware and tools for reflash it, tommorow i’m chatting with PandaWill, and they said that asked manafacture again
    waiting…

  6. tatubias
    August 7th, 2012 at 01:38 | #7

    Can we add here the Bluetooth support and 3gdongles support?

  7. August 7th, 2012 at 09:09 | #8

    @tatubias
    Should be yes.

  8. Romfont
    August 8th, 2012 at 07:17 | #9

    What about wlan.ko?

  9. Romfont
    August 8th, 2012 at 07:31 | #10

    Oh, and if you want to test, just boot into fastboot (adb reboot-bootloader), and then you can simply boot the device with your custom kernel.

  10. groovey2k
    August 15th, 2012 at 02:58 | #11

    Hi did anyone test the kernel yet after the firmware is released? My device seems to be clocked at 1008Mhz according to Overclock tools and Antutu as opposed to other peoples posts, where it says 808Mhz (http://www.androidtablets.net/forum/mcbub-com/41411-new-arrival-cx-01-c77-mini-android-pc-android-tv-box-android-4-0-cortex-a5-hdmi.html).
    Anyway, I think this higher clock makes my device very unstable, so HDMI output is often lost 20 min after boot up, also my Antutu score isn’t really better.
    My Rom Version is the same as all the others V1.0 20120710
    So maybe I could use the kernel you compiled to make the device more stable or is there any other possibility to change the CPU frequency?

  11. Klaus
    August 15th, 2012 at 03:20 | #12

    Hi cnx,

    It would be awesome if you could try this Kernel on the CX-01. The Firmware is now awaliable :)

    Maybe there are some Performance benefits :)

    Regards
    Klaus

  12. August 15th, 2012 at 10:58 | #13

    @groovey2k
    You could try to build the kernel, root your device, and replace uImage (zImage?) in the NAND flash. Make sure you also download the firmware in case something goes wrong.

    @Klaus
    I’ve received 6 new devices/boards in the last 30 days, so I don’t know what to work on now, and end-up doing (almost) nothing :p. Just trying the kernel would probably not improve anything (I assume they use that one), but I (or somebody else) would have to look into it to see what can be improved. There seems to be a lot of interest about TCC8925 kernel, so maybe I should try it out.

  13. August 15th, 2012 at 11:01 | #14

    @groovey2k
    1008 MHz… Are you sure it’s not an A10 inside ?

  14. Klaus
    August 15th, 2012 at 13:12 | #15

    @cnxsoft

    Yeay, thanks a lot :)

  15. groovey2k
    August 15th, 2012 at 15:28 | #16

    @cnxsoft
    Yes absolutely sure, is exactly the same device as yours.

  16. groovey2k
    August 19th, 2012 at 05:07 | #17

    @cnxsoft
    Hi I tried to compile the kernel (716,5 Mhz version) unfortunately I don’t get a uimage after the process. There are a lot of warnings (functions and variables not used or wrong variable type) during the compilation. Did you have the same warnings during compilation?

    Also my compilation ends with:
    LD net/wireless/cfg80211.o
    LD net/wireless/built-in.o
    CC net/activity_stats.o
    LD net/built-in.o

    No mention of an ready image like in your post.

    Am I missing some packages? I’m running ubuntu 12.04 in virtualbox.

  17. August 19th, 2012 at 08:26 | #18

    @groovey2k
    That means the build failed. If you used the -j12 option, the error message should be way up.

    I’ve tried to locate the kernel in the Flash, and it appears to be in /dev/block/mtdblock0 (10MB partition), but it’s not in a file system, and this partition starts with “4e41 5244″ which seems related to fastboot, but I haven’t found a way to handle this. It might be possible to brick the device by changing this partition (not sure).

    If you just want a more stable device, try the firmware update first: http://www.cnx-software.com/2012/08/16/how-to-upgrade-firmware-for-cx-01-mini-pc/. It works for me.

  18. groovey2k
    August 20th, 2012 at 02:30 | #19

    I finally managed to build the kernel with another ubuntu version (but it might be that the path was to deep using “telechips-linux” as name).
    Anyway after building the zImage I tried to boot it using fastboot. “adb reboot bootloader” usually starts the fastboot mode where you could temporarily boot an zImage and try it and afterwards flash it permanent (you must have android sdk installed to do that).
    Anyway the “adb reboot bootloader” command did restart the device in a special mode and it asked for driver installation. I installed the adb drivers again. But after that the device doesn’t react to the fastboot commands.
    So I wasn’t able to flash the kernel. Maybe we need special fastboot drivers.
    Also if you send “adb reboot recovery” it boots in the recovery mode but I don’t know if this helps with anything. All adb commands work in this mode.
    I’m already on the newer firmware you mentioned. But for some reason quadrant still tells me that my device is clocked at 1008mhz amd it’s still unstable. I don’t know why, maybe it’s a hardware failure.

  19. groovey2k
    August 20th, 2012 at 02:33 | #20

    @cnxsoft
    also maybe this documentation has some useful info for us:
    http://wenku.baidu.com/view/e7bd54f79e314332396893c8.html

  20. August 20th, 2012 at 09:03 | #21

    @groovey2k
    Yes, this doc looks good, but to really be useful we would need the password to telechips git repo.

  21. myxa78
    August 20th, 2012 at 13:33 | #22

    @Klaus
    it’s antutu said?
    1008Mhz=808Mhz CPU + 200Mhz GPU
    TCC8925 by documention max.freg=833 Mhz so freq of CPU can’t be 1008

  22. Hairybiker
    September 17th, 2012 at 17:09 | #23

    We have been trying to compile a kernel with extra modules, or even just enable loading of extra modules, but even though it compiles it will NOT boot the device.

    Do you have any further info on this, we think it may need the lk.rom build as well, which isn’t in the current build instructions.

  23. September 17th, 2012 at 17:12 | #24

    @Hairybiker
    I’ve tried this kernel I built myself in CX-01 and it would not boot, but I haven’t had time to investigate the reason yet.

  1. July 24th, 2012 at 18:33 | #1
  2. August 22nd, 2012 at 23:08 | #2
  3. January 7th, 2013 at 11:15 | #3
  4. April 7th, 2013 at 10:36 | #4