Jump to content


Photo

Pre-Alpha 0.2 Ubuntu Linux for MK802 III / UG802 / MK808


  • Please log in to reply
231 replies to this topic

#1 AndrewDB

AndrewDB

    Developer

  • FW Developer
  • PipPipPip
  • 427 posts
  • LocationThe Hague, Netherlands

Posted 29 November 2012 - 03:11 AM

Title says it all. No hand holding at this stage as this is really for people who know what they are doing. In a few days I'll post a proper Alpha with more/some support!
Folks, I can't stress this enough: these pre-Alpha releases are only for people who have already cross-compiled the Linux kernel for an ARM device and are used to having things not working out-of-the-box.
And no, it won't play movies nor will it run XBMC at this stage, and you can't play any games with it yet (no OpenGL support).
Also, please at least read this first post COMPLETELY before asking any questions in this thread!

Present version is pre-Alpha 0.2
It has been tested on the UG802, Rikomagic MK802 III and the MK808.

These are the features for the pre-Alpha 0.2 release:
  • Ubuntu 12.10 Quantal armhf based.
  • Easy to install and dual-boot (does not erase your Android installation).
  • HDMI 1920x1080 60Hz aka 1080p.
  • XFCE desktop.
  • Linux framebuffer consoles.
  • HDMI sound support. USB sound support.
  • Full array of cpufreq governors (I suggest the interactive governor).
  • USB mouse, keyboard and USB storage tested. Webcam tested by Alok.
  • Kernel source code and full compiler toolchain suite included (gcc-4.7.2), so the RK3066 device becomes an autonomous mini development system.
  • nbench benchmark included (source code and binary) so you can check the real clock speed / performance of your Android stick.
  • OpenSSH server included and installed so you can use the Android stick headless.
  • Internal WiFi is not functional yet. You'll need a $4 Realtek or Ralink USB Wifi dongle or a $5 USB 2.0 10/100 ASIX or SR9700 Ethernet dongle to connect to your network.

Download links:

The kernel ug802recovkernel.img (<10MB) https://docs.google....ZjUwNzFjZ1lqMTg
The armhf Ubuntu 12.10 root filesystem linuxroot.tar.gz (<1GB) https://docs.google....UnM4RlllWGpScXc

PLEASE MIRROR THESE FILES AND POST A LINK BELOW!

Requirements:

To install:
- Rooted Android stick and SuperUser.apk installed.
- Terminal emulator in Android.
- microSD card (4GB, 8GB or 16GB) or USB key (4GB, 8GB, 16GB, 32GB).
- A Windows/Linux PC.
- RKAndroidTool v1.35 (Windows program to flash RK3066 devices). This is the program you need to flash the kernel!

If you have installed a Finless Android ROM on your Android stick using the Flash method then you already have everything you need to proceed with the installation.
The zip file that includes Bob's ROM also has the RKAndroidTools v1.35 and full, detailed installation instructions, so please get it!

To use Linux you'll probably need:
- USB 2.0 hub
- USB keyboard and mouse.
- HDMI monitor (Full HD capable i.e. 1920x1080@60Hz - 1080p).
- An inexpensive USB WiFi b/g/n or Ethernet 10/100 adapter dongle.

Kernel Installation
(there are many ways to do this, here is a simple one that should take less than a minute)
- Install RKAndroidTools v1.35 on your Windows PC following exactly the instructions provided by Bob Finless.
- Download the kernel.img file to your Windows PC. Rename it recovery.img.
- Connect Android stick to your PC and run RKAndroidTool v1.35.
- Open the terminal emulator and "su", then "reboot bootloader"
- RKAndroidTool should now detect Android stick.
- Flash only the new recovery.img to the recovery partition in the NAND. This takes 5 or 6 seconds, and your Android stick will immediately reboot into Android. THIS IS NORMAL.

Now that you have installed the Linux kernel in the recovery partition of your Android stick, you can dual boot Android or Linux.

To boot Linux, boot into Android, open the terminal emulator and "su", then "reboot recovery".

If you get the "dead Android bot" with red triangle, it means the Linux kernel image was not flashed correctly to the recovery partition. :nea:
Power off, power on, and repeat the procedure above paying attention to all details, and it should work.

Notes:
* There is only one user defined: user ubuntu password ubuntu. Needless to say, change the password ASAP!
* The kernel config is available in /proc/config.gz.
* The kernel source is in the home directory of user ubuntu.
* And you have the nbench benchmark in /root.

Rootfs Installation
(again there are many ways to do this, here is a simple one)
Requires a Linux PC.
If you don't have a Linux PC, you can use the GParted LiveCD: http://gparted.sourc....net/livecd.php

1. Use GParted to create an ext4 partition of at least 4GB on a USB key or a microSD card. Label the partition linuxroot.

2. As root, extract the tarball, and copy (using cp -a) all the files in the extracted directory to the partition labeled linuxroot. This will create a Ubuntu root filesystem on the USB key or microSD card with all the proper permissions.

If when you boot Linux, you don't get the LightDM login screen, it means you didn't copy the rootfs files properly (probably you weren't root) and they don't have the correct permissions. :nea: Repeat the two steps above paying attention to the instructions!

Changelog

- pre-Alpha 0.1: Initial release, requires microSD card.
- pre-Alpha 0.2: Simplified boot requirements. Can now boot from a root partition labeled linuxroot on any mass storage device accessible at boot time e.g. a 4GB USB key, a 8GB SD card in USB card reader plugged into the USB hub, or a microSD card in the microSD card slot of your Android stick. Should even boot from a USB hard disk, but I haven't tested this.

Sponsors

- Thank you Slatedroid user gsandiego for sponsoring a nifty Infrared Digital Thermometer that will allow me to take precise temperature measurements on the RK3066 running different loads at different clock frequencies!

Edited by AndrewDB, 04 December 2012 - 05:11 PM.

  • petronel and Galgofa like this

#2 Patola

Patola

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 70 posts

Posted 29 November 2012 - 05:12 AM

Thank you VERY VERY much, AndrewDB. I will try your recipe.

Sorry for that, but I have to ask: I need a rooted UG802 to install it, right? Is there any way to root it other than using a Windows machine? I don't have Windows.

#3 firechecking

firechecking

    Newbie

  • Jr. Member
  • Pip
  • 4 posts

Posted 29 November 2012 - 05:25 AM

It's amazing, you finally made it. It a great news.

I will translate to my own forum in Chinese to spread it. A pity that it's a new website, and little people knows it.

#4 AndrewDB

AndrewDB

    Developer

  • FW Developer
  • PipPipPip
  • 427 posts
  • LocationThe Hague, Netherlands

Posted 29 November 2012 - 05:34 AM

Hi Patola,
Sure, there are two ways:
1) Pure Linux way 1
Actually you need to root the UG802 for a single reason: to run the "reboot bootloader" and "reboot recovery" commands (which require root rights).
So if you are using Linux you can just enable USB debugging on the UG802 and then use adb from your Linux box to run these commands (adb is part of the Android SDK - I am assuming you have that installed).
Also you can flash the RK3066 recovery partition using Linux tools available on github.

2) Pure Linux way 2
First install a Finless ROM for the UG802 using the "update.img" method (does not require a Windows PC).
Now, again enable USB debugging on the UG802 and then use adb from your Linux box to simply dd kernel.img on to the recovery partition.
And now you can use the Reboot program included in Bob's ROM to reboot into Linux.

#5 AndrewDB

AndrewDB

    Developer

  • FW Developer
  • PipPipPip
  • 427 posts
  • LocationThe Hague, Netherlands

Posted 29 November 2012 - 05:36 AM

It's amazing, you finally made it. It a great news.

I will translate to my own forum in Chinese to spread it. A pity that it's a new website, and little people knows it.


Thank you firechecking. :good:

Also please could you mirror the files to make them available in China? I am not sure how fast Google Drive access is in China.

#6 bthoven

bthoven

    Newbie

  • Jr. Member
  • Pip
  • 6 posts

Posted 29 November 2012 - 06:08 AM

Wow, finally!. Thanks a lot for your great effort.

Btw, could I do it on my MK808 (Finless 1.5a)? Any negative consequence? I already own a rtl8191su usb wifi.

#7 AndrewDB

AndrewDB

    Developer

  • FW Developer
  • PipPipPip
  • 427 posts
  • LocationThe Hague, Netherlands

Posted 29 November 2012 - 06:24 AM

Wow, finally!. Thanks a lot for your great effort.

Btw, could I do it on my MK808 (Finless 1.5a)? Any negative consequence? I already own a rtl8191su usb wifi.


Hi,
I have to recompile this latest kernel for the MK808 with a very slightly different configuration file, I only had enough time to test it with the UG802. Could you wait another 24 hours? Then I'll release pre-Alpha 0.2 with two distinct kernels for the UG802 / MK802 III and the MK808 and hopefully no restriction on the mass storage medium to hold the rootfs.

#8 tatubias

tatubias

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 99 posts

Posted 29 November 2012 - 06:47 AM

Excelent news. im downloading it now. i will be testing today i hope.

#9 aloksinha2001

aloksinha2001

    Developer

  • FW Developer
  • PipPipPip
  • 247 posts

Posted 29 November 2012 - 07:11 AM

Hi,
I have to recompile this latest kernel for the MK808 with a very slightly different configuration file, I only had enough time to test it with the UG802. Could you wait another 24 hours? Then I'll release pre-Alpha 0.2 with two distinct kernels for the UG802 / MK802 III and the MK808 and hopefully no restriction on the mass storage medium to hold the rootfs.


Err... I have already flashed it on Mk808.... and linuxroot is now being processed... hope... it wud work on my MK808. :unsure:

Alok

#10 aloksinha2001

aloksinha2001

    Developer

  • FW Developer
  • PipPipPip
  • 247 posts

Posted 29 November 2012 - 07:33 AM

And the login password is

ubuntu

#11 AndrewDB

AndrewDB

    Developer

  • FW Developer
  • PipPipPip
  • 427 posts
  • LocationThe Hague, Netherlands

Posted 29 November 2012 - 08:36 AM

Ooops! Let me add a note about that in the OP!
:p

#12 Raymond Day

Raymond Day

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 185 posts

Posted 29 November 2012 - 09:13 AM

Been working on this about a hour now. Read your post how to install it over and over lots of times. Download "Moborodo" and "SuperOneClick" power on my UG802 by my computer USB port and set debugging on in the UG802 and USB as connect to the computer. Then SuperOneclick said it's rooted.

The next step is run "RKAndroidTool v1.35" But I can not find were to download that! So I am stuck there.

It seems hard to do this. I though it would just be one file you put on your SD card and dual boot it.

I think it will be super if can get this running on my UG802.

-Raymond Day

#13 janzun

janzun

    Newbie

  • Jr. Member
  • Pip
  • 8 posts

Posted 29 November 2012 - 09:16 AM

Thank you very mucho Andrew, Im going to install it ASAP :)

#14 ZONATAR

ZONATAR

    Newbie

  • Jr. Member
  • Pip
  • 4 posts

Posted 29 November 2012 - 09:25 AM

Er, i'm not a linux user, but i wanna try this.

I flash the recovery, and then?

I must copy the linuxroot.tar.gz on the microsd or i must unrar it on the card from my windows pc?

#15 aloksinha2001

aloksinha2001

    Developer

  • FW Developer
  • PipPipPip
  • 247 posts

Posted 29 November 2012 - 09:36 AM

Er, i'm not a linux user, but i wanna try this.

I flash the recovery, and then?

I must copy the linuxroot.tar.gz on the microsd or i must unrar it on the card from my windows pc?


Without Linux, you will not be able to make an ext4 file system

Alok

#16 Raymond Day

Raymond Day

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 185 posts

Posted 29 November 2012 - 09:40 AM

Been working on this about a hour now. Read your post how to install it over and over lots of times. Download "Moborodo" and "SuperOneClick" power on my UG802 by my computer USB port and set debugging on in the UG802 and USB as connect to the computer. Then SuperOneclick said it's rooted.

The next step is run "RKAndroidTool v1.35" But I can not find were to download that! So I am stuck there.

It seems hard to do this. I though it would just be one file you put on your SD card and dual boot it.

I think it will be super if can get this running on my UG802.

-Raymond Day


Wow I found it after about 1/2 hour looking on the web from here.

Here is the link on that link right to download the zip file.

Now I got to run it.

-Raymond Day
  • mrsburnout and alawadhi3000 like this

#17 ZONATAR

ZONATAR

    Newbie

  • Jr. Member
  • Pip
  • 4 posts

Posted 29 November 2012 - 09:50 AM

Without Linux, you will not be able to make an ext4 file system

Alok


I see, so it's pointless to have before a windows guide for the UG802 driver.

Too bad.

#18 Raymond Day

Raymond Day

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 185 posts

Posted 29 November 2012 - 10:01 AM

On my UG802 I go to the terminal emulator and type "su", then "reboot recovery" It just clear the screen right away and nothing. On the RKAndroidTool V1.35 it keeps flashing the "No Found RKAndroid Rock usb" I can unplug it from the computer USB and it will boot back up and I do the same su and reboot recovery but no good.

I guess I will have to download a live Linux CD and run Gparted on my SD card.

-Raymond Day

#19 tatubias

tatubias

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 99 posts

Posted 29 November 2012 - 10:04 AM

Im using windows xp. by the moment i was not able to make it boot but here is how you can do things under windows.


first:
follow all the steps in the main thread including the kernel / recovery installation.


now this is the part how to do the SD part under windows.

must have
1 - usb drive 4 or 8gb to copy the ubuntu img
2 - sd card 4 8 gb to install ubuntu on it.

1 - Download gparted (this is a boot iso) you can burn it on a cd or you can burn it into the Pendrive (this how i will explain).
http://sourceforge.n...table/0.14.0-1/

2 - Download Tuxbox http://tuxboot.org/download/


3 - run tuxbox and select the gparted-live-0.14.0-1.iso and the drive of the pen drive.

this will make your pen drive bootble.

4 - copy linuxroot.tar.gz into the root of the pendrive.

5 - boot your pc with the pen drive pluged and select to boot it from it. gdpart will start do the following.

Use GParted to create two partitions on the microSD card, partition 1 is a 63MB FAT32 partition STARTING ON SECTOR 2048 (i.e. leave 1MB space BEFORE the partition - GParted does that automatically btw), partition 2 is the rest of your SD card, ext4. DO NOT LABEL partition 1, DO LABEL partition2 linuxroot.


when you finish to do that there in the desktop you have a terminal icon. open it.


mount the ext4 partition

example: sudo mount /dev/sdc1 /mnt

now you can follow the other steps.
3. As root, extract the tarball, and copy (using cp -a) all the files in the extracted directory to partition 2. This will create a Ubuntu root filesystem on the microSD card with all the proper permissions.

to boot in linux mode you need first to boot in android if you have installed fillness rom go to the apps drawes ansselect the reboot icon.
select reboot recovery.

if you dont have that. open a terminal and run the following commands

su
reboot recovery


-----------------------------------------------
note: what i did my self and the device did not boot. was. i cp the linuxroot.tar.gz into the /mnt then

sudo gzip -d linuxroot.tar.gz
sudo tar xvf linuxroot.tar

then when i try to boot with the SD inserted into the device i got the following error.

Posted Image

Edited by tatubias, 29 November 2012 - 10:21 AM.


#20 aloksinha2001

aloksinha2001

    Developer

  • FW Developer
  • PipPipPip
  • 247 posts

Posted 29 November 2012 - 10:09 AM

I see, so it's pointless to have before a windows guide for the UG802 driver.

Too bad.


I suspect, you can use any live linux, and make partitions according to documentation above.

Alok