Sunday 10 March 2013

GK802 - Ubuntu oneiric preview image


For those of you waiting for a pre-built image, here goes!

If you want to find out more about our development efforts or want to contribute 

1. irc channel  #imx6-dongle on freenode
2. Kernel/Uboot Source 
3. Wiki Page
4. Google Group

I've called this a preview image because it's still work in progress. What's working:

1. New uboot - based on abrasive's (aka James Laids) excellent work.
2. GPU and VPU h/w acceleration
3. Working wifi (although performance can be below par)
4. Working internal/external SD slots.
5. Working usb ports.

Instructions:

1. Download image (thanks to miniand.com for hosting).

2. Unzip image and dd to an SD card. This image is for a 8GB SD card, however the ext4 file partition is only 3GB therefore should work on a 4GB card. Fix the partition (by expanding it) after completing the dd.

3. Download a new uboot and 'dd' to your sd card (replace <drive> with the correct value):

    sudo dd if=u-boot.imx bs=1k seek=1 of=/dev/<drive> && sync

Update: To fix the problem of sound not working, down a pre-built kernel with the fix or compile your own using the our latest kernel source. To use pre-built follow instructions below:

3a. Down the pre-built kernel with cpu frequency scaling enabled or without it and 'dd' to sd card. Replace <cpu_freq_option> with cpu_freq or no_cpu_freq depending on which file you downloaded :

    sudo dd if=uImage_3.0.35-0269_<cpu_freq_option> of=/dev/<drive> bs=1048576 seek=1 && sudo sync 
                                                   
3b. Download the kernel modules for the prebuilt kernel and copy to the sd card (replace <sd card> with mount point of your sd card:

 tar xvf modules_3.0.35-02695.tar
 cp -r modules/3.0.35-02695-ga09806b-dirty <sd card>/lib/modules

4. Place image in the internal sd card slot (you need to remove the casing to access the internal sd slot) and fingers crossed it should boot (useful to have a serial console open). The image defaults to 1280x720 screen resolution, once the desktop appears, plug-in a keboard/mouse via the usb port.

5. Next configure wifi, and it may be useful to reboot after setting wifi so that the correct time is picked up.

6. Then enjoy the desktop experience!

Unfortunately shutting down from the desktop just takes you back to the logon screen. To force a  proper shut down open a command shell and issue "sudo shutdown -P now", wait a minute or so to ensure shut down is complete and then remove the usb power cable.

To verify GPU acceleration you can run glmark2-es or es2gears. To verfiy VPU run totem with a file of your choice.

68 comments:

  1. Hi... Thanks for your efforts. Makes me want to buy some hardware just to tryout. Just a little clarity (and pardon my ignorance here), when you say GPU accelerated are you talking about X11 windows itself? or is this still something thats being worked on? TIA Huddleston.greg@gmail.com

    ReplyDelete
  2. Neat! I also have a few questions:

    1) Is the 'below par' wifi performance software-related and theoretically will be improved over time, or a hardware limitation that will have to be tolerated?

    2) Some benchmarkers have concluded that this device is slower than, say, the MK808. Does the new ability of 'GPU and VPU h/w acceleration' totally change that perspective? Is this now the 'fastest guy on the block'? Is this now the #1 choice for those wanting to run a 'regular' Linux device?

    ReplyDelete
    Replies
    1. Best to check this thread for feedback http://www.armtvtech.com/armtvtechforum/viewtopic.php?f=50&t=1762

      Delete
    2. I think is fast and cheap but the fastest you must look a development board either Odroid X2/U2 (Samsung exynos 4412 quad core 1.7-2.0 Ghz ,GPU Mali 400 ) or
      Arndale board (Exynos 5 Dual Cortex-A15 core 1.7 GHz,Mali T-604 GPU )

      Delete
    3. Odroid X2/U2 are not in any better shape the ubuntu X11 driver current only support 16bpp colour depth and there is no VPU support.

      Delete
    4. I bought the Zeal and i install Oneiric is very slow compare to U2 i had (i fried it ,snif) i hope new versions will be faster,i have so far 2 issues no sound through my hdmi > vga converter i have and the issue with the heat i am afraid that i can not use the zeal for long is like a oven.

      Delete
  3. Just wondering:
    - is there any reason why you choose ubuntu 11.10 instead of a more recent version?
    - does it mean that after I installed the image, I can benefit from a remote (possibly 'official') ubuntu repository to install new software?
    - does it mean also that I can update the distrib to a more recent one?
    - should I wait a little bit considering that you said it is still a WIP? (I may also try to install it to discover any problem that you may consider)

    Anyway, thank you _very_ much for your hard work!

    ReplyDelete
    Replies
    1. That's because Freescale has only released the GPU and VPU drivers compatible with Ubuntu 11.10.

      Delete
  4. What should the partition table of the sd card look like? I've tried creating card from the image and building from script and neither one seems to work. Thanks

    ReplyDelete
    Replies
    1. Hi, There should be an unformatted partition of around 15MB followed the ext4 rootfs partition of 3GB.

      Delete
  5. This image http://dl.miniand.com/jas-hacks/gk802/ubuntu_gk802.img.gz simply does NOT work.....it's corrupted!!
    Please give us a new link/location to download correct image.

    ReplyDelete
    Replies
    1. Today, after a 7 retry download finally have on my desktop a correct image you creted. Now I'll put on my 32 Gb microsd with dd and than install u-boot as you described.
      My gk802 seems arrive this weekend and I am very courious to see how work your image with ubuntu.
      Is it possible to have an image with Debian instead in future?

      Thanks and congratulation for your precious job!!

      Delete
    2. Gooooooooodd work!

      GK802 arrived yesterday, I disassembly it an put a 32GB micro SD in internal SD SLOT.
      All work fine!! Nice job guys!
      After a huge update the system seems to be very reactive (sd class 6 only), lxde rulez! and goes warmer..
      I put a heatsink scrapped on a old motherboard at the other side of the case and i think the problem is solved.
      Now I must put correct resolution (1600x1200) as post on march,22 but where is mx6q_hdmidongle file? I must modify only this as you described or something else?

      Delete
  6. Jasbir great job getting ubuntu working! Thank you so much for sharing it. I've successfully loaded your image and it boots great and wifi is working wonderfully. I was trying to chmod some files to get droidmote working but admin is Linaro and I don't know what the password is. Can you provide the password that was setup with the build?

    ReplyDelete
  7. Yeah, kind of in the same boat.

    I've tried booting from the accessible SD card slot, and it boots to Android. When taking the thing apart and using the internal card slot, it doesn't appear to boot at all.

    Of course, stupid me wasn't paying attention and bought a slow class 4 16GB card, not the faster class 10 dealy...

    ReplyDelete
  8. My bad. Forgot the bs=1k on the dd for the u-boot image. Dumb!

    ReplyDelete
  9. Any way to image this with the boot options as well using Windows? I mean, I know of the win32 disk imager, however, what about the boot options? Sorry if this is a silly question!

    ReplyDelete
  10. Hi,
    how i can do "3b" point if i can't see the sdcard and also i can't mount?

    Thanks

    ReplyDelete
    Replies
    1. Hi, if you remove the SD card from the machine and re-insert then the drive should appear as a mount.

      Delete
    2. unfortunately no, i have 16gb card formatted in ext4...after the u-boot dd the the sd card disappear, i see only the device path using this command: sudo dmesg | tail -20

      [ 2335.757521] sd 6:0:0:0: [sdb] Assuming drive cache: write through
      [ 2335.758905] sd 6:0:0:0: [sdb] Assuming drive cache: write through
      [ 2335.758912] sdb: sdb1

      I do something wrong?

      Thanks again

      Delete
  11. Hello Jas,
    can you please suggest how do i change output resolution to 1920x1080? ubuntu's Settings->Display doesnt allow anything else other than 1280x720.
    Do i need u-boot's serial terminal access to change the display resolution? I was looking for a simple solution instead of soldering the serial lines.

    ReplyDelete
    Replies
    1. Hi, if you can comiple the latest kernel sources, it includes code (board-mx6q_hdmidongle.c) to detected the monitor resolution.

      Delete
    2. I built latest kernel and tried with GK802, still i am unable to set any other resolution. I even tried with different monitor but this didnt help.

      is there anything specific I need to enable in kernel config? what is the output resolution of your GK802?

      Delete
    3. You can force the resolution to 1080 by changing the code in mx6q_hdmidongle to something like this:

      static struct ipuv3_fb_platform_data hdmidongle_fb_data[] = {
      {/*fb0*/
      .disp_dev = "hdmi",
      //.interface_pix_fmt = IPU_PIX_FMT_RGB24,
      .interface_pix_fmt = IPU_PIX_FMT_RGB32,
      .mode_str = "1920x1080M@60",,
      .default_bpp = 32,
      .int_clk = false,
      },
      };

      Delete
    4. btw: I just connected serial terminal and changed u-boot env variable of bootcmd to 1920x1080, now it works.
      But the solution given by you should be easier than serial terminal access. Anyway thanks for your suggestion.

      BTW: i tried playing 1080p50fps H264(hi profile, level 4.2), this seems to play smooth, but after a minute, cpu shuts down due to over temperature.
      How are you dealing with heat? are you using fan to cool GK802?

      Delete
    5. For cooling, best is a gpu heatsink. See this discussion http://www.armtvtech.com/armtvtechforum/viewtopic.php?f=52&t=1112.

      Delete
    6. @ADAV or @Jas

      could you please provide us with the exact steps to follow to setup a new resolution?
      I have a Dell U2410 1920x1200, but the resolution defaults to 640x480...
      I managed to get something like 1024x768 using randr, but a higher resolution would only give me a virtual resolution...

      thx!

      Delete
    7. The last kernel patch contained a fix for EDID which doesn't work, so you need to use this kernel version (https://github.com/imx6-dongle/linux-imx/commit/a1242f79bb9dbcb2dfbd748ddc4be4a6b7f69f7c). As mentioned in the previous post you can hard code the default resolution in mx6q_hdmidongle.c or pass it to uboot eg. dev=hdmi,1920x1080M@60. In either case you are limited to HD resolutions eg 1920x1080 or 1280x720.

      Delete
    8. This comment has been removed by the author.

      Delete
    9. This comment has been removed by the author.

      Delete
  12. Hi,
    How is write “dd” to sdcard? Can i use winimage or android terminal or linux? If i use winimage i get a error. Where can i use “sudo dd if=u-boot.imx …….” command? And which is “sdcard” at this command, is the written to linux image sdcard, i mean same sdcard?

    ReplyDelete
    Replies
    1. Hi, dd is a linux command and my instructions for linux. Not sure if all the commands are possible in windows.

      Delete
    2. I tried win32diskImager, it works fine for step 1, but for second and other steps(uboot and kernel), it was easy for me to use dd. So here are the set of commands I run on my linux machine(ubuntu) to create the disk.

      1)wget http://dl.miniand.com/jas-hacks/gk802/ubuntu_gk802.img.gz
      2)wget http://dl.miniand.com/jas-hacks/gk802/u-boot.imx
      3)gunzip ubuntu_gk802.img.gz
      4)insert the sdcard, check for the device node using 'sudo /sbin/fdisk -l' (this will show ex: /dev/sdd, or /dev/sdc)
      5)unmount if this sdcard is already mounted(sudo umount /dev/)
      6)sudo dd if=ubuntu_gk802.img bs=4M of=/dev/ && sync
      7)sudo dd if=u-boot.imx bs=1k seek=1 of=/dev/ && sync
      8)remove and insert the card(ubuntu will automatically mount the SDCard)
      9)using Gparted, resize the 3GB partition to 4Gb.
      10)copy some video files to /home/linaro/Videos for testing purpose.

      these steps should get you going, further details are already given by JAS.

      Delete
    3. Hello Adav,
      using Gparted you generate a primary partition in ext4 and nothing more? if i have a 16gb sd card i don't need to resize the partition right?

      Thanks in advance

      Delete
    4. On existing ubuntu partition - you just have to re-size it from 3gb to 4gb. And then I created a new ext4 partition for remaining ~12GB of my 16gb card.
      (Some how for my ubuntu partition, I could not increase from 3GB to 16gb, gparted was complaining about an error, hence i created a new partition of ~12GB)

      Delete
    5. When i try your method on ubuntu linux i can't mount the sdcard and it's seen unavaliable or unknown in gparted. dd process has not any errors, it's completed without errors. But sdcard is unknown for all of programs. When i try to use win32diskimager, the sdcard is avaliable but uboot isn't writing. What can i do?

      Delete
  13. does xbmc work with hardware acceleration?

    ReplyDelete
  14. Great work! Because of your progress getting Desktop Ubuntu to work on the GK802, I will be ordering one shortly and be using your kernel drivers.

    Unfortunately, I am not qualified to contribute to the driver development.
    However, I am happy to provide detailed Q&A feedback.

    I do have one question. Why did you choose to use Oneric instead of Precise for your driver development? As a Linux user, I would much rather have Precise.

    ReplyDelete
    Replies
    1. Hi, The X11 GPU drivers currently are only functioning under Oneric.

      Delete
  15. Hi,
    Thanks for the great development :)

    ReplyDelete
  16. Hi, any plans of updating the kernel to the imx_3.0.35_1.1.1 based version? I have been working with the sabrelite imx6 board and can help in the upgrade process.

    ReplyDelete
    Replies
    1. Hi, the kernel should already have 1.1.1 patches if required. BTW the changes were minimal from 1.1.0 to 1.1.1.

      Delete
  17. Hi

    I tried ur solution but when i dd's the u-boot it nothing happen.

    Ubuntu is in the SD card but the u-boot partition is not created :S

    ReplyDelete
    Replies
    1. You won't see the u-boot partition because it is not a recognised file partition in Linux.

      Delete
    2. But in anyway it's not booting into ubuntu :(

      Delete
    3. Are you placing SD card in the INTERNAL sd card slot, not the external one!

      Delete
    4. What is internal sd card slot? :O

      I'm using the slot nearly t the audio jacks, that's slot?

      I tried it again, and no works :(

      I haven't serial cable to test

      Delete
    5. Are you sure you have the right device a GK802 with imx6q cpu?

      Delete
    6. Oh shit, i thought it's for Hackberry A10, sorry for mistake :S

      Delete
  18. When i try dd method on ubuntu linux i can't mount the sdcard and it's seen unavaliable or unknown in gparted. dd process has not any errors, it's completed without errors. But sdcard is unknown for all of programs. When i try to use win32diskimager, the sdcard is avaliable but uboot isn't writing. What can i do?

    ReplyDelete
    Replies
    1. Hi, are you sure you are dd'ing to the correct mount point. It should be something like /dev/sd[letter] where letter is a-z.

      Delete
  19. 1-Once sistem installed (and working perfecly) Ubuntu software center suggest 455 update pakages...Is is dangerous do upgrade?
    2-The internal bluetooth does not seems to work...I solve the problem with an usb external one.
    3- Configuration problem with screen resolution monitor...can you have a step-to-step guide for newbie users?

    ReplyDelete
    Replies
    1. If you upgrade you will lose gpu/vpu acceleration. You can try holding back on xorg and gstreamer and test.

      Delete
    2. hello,

      i also would like to get 1920x1080 resolution running, but don't know how. a little howto would be very helpful. :-)

      thanks

      Delete
  20. Yes..... I try to update and I lose gpu/vpu acceleration as you say... :-(
    then guys don'update!
    We are waitig the netxt snapshot image....there is the only way to upgrade the system with gpu acceleratiom?
    And what about the internal bluetooht?

    ReplyDelete
    Replies
    1. 12.04 image is available but just gpu acceleration as of now, no video acceleration.

      Regarding bluetooth - I'm the main developer working on this in my spare time, therefore you are welcome to fix to what is not working.

      Delete
  21. Hello All.

    Please somebody to make instruction how to install from windows???
    Any Help is appreciate.
    Thank You

    ReplyDelete
  22. hi

    i've got this 12.04 preview image running and tried to change the display resolution to 1920x1080 by this way:

    - compiled a new kernel following the instructions here https://github.com/imx6-dongle/wiki/wiki

    git clone https://github.com/imx6-dongle/linux-imx.git
    cd linux-imx

    - edit mx6q_hdmidongle.c and made the changes you described
    static struct ipuv3_fb_platform_data hdmidongle_fb_data[] = {
    {/*fb0*/
    .disp_dev = "hdmi",
    //.interface_pix_fmt = IPU_PIX_FMT_RGB24,
    .interface_pix_fmt = IPU_PIX_FMT_RGB32,
    .mode_str = "1920x1080M@60",,
    .default_bpp = 32,
    .int_clk = false,
    },
    };

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- imx6_gk802_defconfig
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 uImage
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 modules

    dd the new kernel to the sd card:

    dd if=arch/arm/boot/uImage of=/dev/sdb bs=1048576 seek=1 && sync

    put the sd card back to the internal slot and powered on. only 1280x720 is available again.
    something missing?

    ReplyDelete
    Replies
    1. Try using imx6_hdmidongle_defconfig

      make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- imx6_hdmidongle_defconfig

      Delete
    2. you made my day :-)
      this helped, now i got 1920x1080@60hz. :-)

      thanks a lot for your help.

      Delete
  23. I have tried my best to remove the internal uSD. there seems to be a small component in the way. Am I missing something? Can anyone help?

    ReplyDelete
    Replies
    1. There shouldn't be anything in the way it should look like this https://sites.google.com/a/danbrough.org/home/gk802/gk802.jpg

      Delete
  24. Thank You !!!!

    My 70 year old eyes needed a hand lens to see the 'open' on the micro SD mount.

    Please, one more question -- What is the best linux distro image to use with my newly liberated GK 802??

    Again thank you for your help.

    ReplyDelete
  25. Hello does anyone knows any other guide more detailed for noob with step by step?
    I followed all the steps, (all of them) put the sd back to the gk802 and no video came out -.-. I might misunderstood step 4

    "4. Place image in the internal sd card slot (you need to remove the casing to access the internal sd slot) and fingers crossed it should boot (useful to have a serial console open). The image defaults to 1280x720 screen resolution, once the desktop appears, plug-in a keboard/mouse via the usb port."

    What image are you talking about?

    Does anybody has a solution for no video?

    ReplyDelete
    Replies
    1. The image you need is this one ubuntu_gk802.img.gz as per step 1:

      1. Download image (thanks to miniand.com for hosting).

      Delete