Jump to content


Photo

Pre-Alpha 0.3 Ubuntu Linux for MK802 III / UG802 / MK808 / UG007 / iMito MX1


  • Please log in to reply
505 replies to this topic

#321 fkubi

fkubi

    Member

  • Jr. Member
  • PipPip
  • 20 posts

Posted 13 January 2013 - 06:43 PM

Do I miss an intermediate step between uImage and kernel.img?

Ok, just tried mkbootimage in various forms, but none of them working :(

I've tried to pack arch/arm/boot/(uImage | Image | zImage) with (initramfs.cpio | initramfs.cpio.gz | initrd.img) all combinations, where initrd.img is a tiny false ramdisk unpacked from the original kernel_03.img.

The strange is that the original kernel image from Andrew is smaller than 8MB. If I recompile the kernel even with the original config, it gets larger than 8MB and the Finless ROM Flash Tool gives an error.

I'd appreciate any help. I really need to recompile the kernel with LED support for my WiFi dongle.

#322 burchanie

burchanie

    Member

  • Jr. Member
  • PipPip
  • 26 posts

Posted 13 January 2013 - 07:42 PM

Here are my cpu infos

http://pastebin.com/Rp7kiF6v


Thanks for your efforts posting it, it really helps. Surprisingly, in your case it reports 2399.21 BogoMIPS while for me it says 1631.46. When I've been on original unrooted FW, it also reported 2399.21 BogoMIPS, but under rooted FW it lowered that value. I guess, BogoMIPS is related to CPU frequency that CPU boots up at. And later on, AndrewDB's linux kernel didn't update some CPU's internal value of frequency to boot from. Hm. Looks like I really need to flash new rooted Android FW clocked higher than current one. I'll do it later this week when I have an access to a monitor.

#323 burchanie

burchanie

    Member

  • Jr. Member
  • PipPip
  • 26 posts

Posted 13 January 2013 - 08:03 PM

@burchanie
I did exactly the same as you mentioned, but it is still not working... I added a picture of the screen where it hangs.

EDIT: I have a sainsmart ak809, just like you (for others who are interested this is actually a renamed kimdecent mk806)


Hi SV_25,

Looks like a kernel panic message. Since things went wrong, could you please post exact list of your steps in order, starting from scratch, assuming you have no linux flashed to recovery. This may help us finding a root of problem. At least Linux installation works on one sample (my AK802) made by SainSmart, hope yours will do the job too.

BTW, are you saying sainsmark ak802 = ak809? I'm completely lost in taxonomy of rk3066-based devices :( Everyone on this forum but me seems recognize which reference device (MK808 or UG802) his/her own device equivalent to.

#324 olegk0

olegk0

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 111 posts

Posted 14 January 2013 - 04:02 AM

I'd appreciate any help. I really need to recompile the kernel with LED support for my WiFi dongle.


I think that the problem here in the specific initramfs or need addition preparation
I was not able to solve it yet (need to ask Andrew original initramfs)
I still made for myself without initramfs in kernel (use only fake ramdisk), prescribing parameters CMD (root=/dev/mmcblk0p1) to boot from partition SDcard

Edited by olegk0, 14 January 2013 - 04:14 AM.


#325 fkubi

fkubi

    Member

  • Jr. Member
  • PipPip
  • 20 posts

Posted 14 January 2013 - 05:11 AM

I think that the problem here in the specific initramfs or need addition preparation
I was not able to solve it yet (need to ask Andrew original initramfs)
I still made for myself without initramfs in kernel (use only fake ramdisk), prescribing parameters CMD (root=/dev/mmcblk0p1) to boot from partition SDcard

Hi,

Can you describe the process how you did it?
Are you using zImage, how you give the command line parameters, what tools are used etc.

#326 nooy

nooy

    Newbie

  • Jr. Member
  • Pip
  • 3 posts

Posted 14 January 2013 - 05:34 AM

hi,

I have a mk802iii, running linux system.
How to recover factory android system?

I trying recover "RKAndroidTool 1.35" and "RKBatchTool v1.5" but fails recovery:


20:20:51 552 **********Restore Start Total<1>**********
20:20:51 562 <Layer 1-1-3-2-4> Download Boot Start
20:20:53 505 <Layer 1-1-3-2-4> Download Boot Success
20:20:53 512 <Layer 1-1-3-2-4> Wait For Maskrom Start
20:20:54 153 <Layer 1-1-3-2-4> Wait For Maskrom Success
20:20:54 158 <Layer 1-1-3-2-4> Test Device Start
20:20:54 165 <Layer 1-1-3-2-4> Test Device Success
20:20:54 170 <Layer 1-1-3-2-4> Check Chip Start
20:20:54 175 <Layer 1-1-3-2-4> Check Chip Success
20:20:54 179 <Layer 1-1-3-2-4> Get FlashInfo Start
20:20:54 182 <LAYER 1-1-3-2-4> INFO:FlashInfo: 0 0 0 0 0 1 4 0 32 0 0
20:20:54 186 <Layer 1-1-3-2-4> Get FlashInfo Success
20:20:54 190 <Layer 1-1-3-2-4> Prepare IDB Start
20:20:54 192 <LAYER 1-1-3-2-4> ERROR:PrepareIDB-->No Found 1st Flash CS
20:20:54 196 <Layer 1-1-3-2-4> Prepare IDB Fail
20:20:54 200 **********Restore Done Success<0> Fail<1> Time<2636>ms**********

#327 olegk0

olegk0

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 111 posts

Posted 14 January 2013 - 07:49 AM

Can you describe the process how you did it?
Are you using zImage, how you give the command line parameters, what tools are used etc.


Hi

CONFIG_CMDLINE="root=/dev/mmcblk0p1 init=/init loglevel=10 rootfstype=ext4 rootwait mtdparts=rk29xxnand:0x00002000@0x00000000(parameter),0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00008000@0x00010000(recovery)"
CONFIG_INITRAMFS_SOURCE=""

linuxroot place in first partition SDCard (or mmcblk0p2 for second partition etc.)

can use zImage or Image (no difference) from kernel/arch/arm/boot

i use mkbootimg tool for linux, i place it here

./mkbootimg --kernel Image --ramdisk ramdisk.gz --base 60400000 --pagesize 16384 --ramdiskaddr 62000000 -o recovery.img

ramdisk.gz - fake ramdisk

Edited by olegk0, 14 January 2013 - 08:02 AM.


#328 burchanie

burchanie

    Member

  • Jr. Member
  • PipPip
  • 26 posts

Posted 14 January 2013 - 09:07 AM

hi,

I have a mk802iii, running linux system.
How to recover factory android system?

I trying recover "RKAndroidTool 1.35" and "RKBatchTool v1.5" but fails recovery:


20:20:51 552 **********Restore Start Total<1>**********
20:20:51 562 <Layer 1-1-3-2-4> Download Boot Start
20:20:53 505 <Layer 1-1-3-2-4> Download Boot Success
20:20:53 512 <Layer 1-1-3-2-4> Wait For Maskrom Start
20:20:54 153 <Layer 1-1-3-2-4> Wait For Maskrom Success
20:20:54 158 <Layer 1-1-3-2-4> Test Device Start
20:20:54 165 <Layer 1-1-3-2-4> Test Device Success
20:20:54 170 <Layer 1-1-3-2-4> Check Chip Start
20:20:54 175 <Layer 1-1-3-2-4> Check Chip Success
20:20:54 179 <Layer 1-1-3-2-4> Get FlashInfo Start
20:20:54 182 <LAYER 1-1-3-2-4> INFO:FlashInfo: 0 0 0 0 0 1 4 0 32 0 0
20:20:54 186 <Layer 1-1-3-2-4> Get FlashInfo Success
20:20:54 190 <Layer 1-1-3-2-4> Prepare IDB Start
20:20:54 192 <LAYER 1-1-3-2-4> ERROR:PrepareIDB-->No Found 1st Flash CS
20:20:54 196 <Layer 1-1-3-2-4> Prepare IDB Fail
20:20:54 200 **********Restore Done Success<0> Fail<1> Time<2636>ms**********


If you didn't backed it up using some sort of clockworkmod recovery fw, may be this link help: http://www.rikomagic....php?f=9&t=3193

#329 JeffHoogland

JeffHoogland

    Newbie

  • Jr. Member
  • Pip
  • 6 posts

Posted 14 January 2013 - 11:26 AM

Is there a method for flashing images to these devices from a PC running Linux? I don't have any Windows PCs in my home and I'd rather not set one up just for flashing my MK808.

~Jeff

#330 SV_25

SV_25

    Newbie

  • Jr. Member
  • Pip
  • 3 posts

Posted 14 January 2013 - 02:57 PM

Hi SV_25,

Looks like a kernel panic message. Since things went wrong, could you please post exact list of your steps in order, starting from scratch, assuming you have no linux flashed to recovery. This may help us finding a root of problem. At least Linux installation works on one sample (my AK802) made by SainSmart, hope yours will do the job too.

BTW, are you saying sainsmark ak802 = ak809? I'm completely lost in taxonomy of rk3066-based devices :( Everyone on this forum but me seems recognize which reference device (MK808 or UG802) his/her own device equivalent to.


This is my device: http://www.sainsmart...ml?options=cart

The steps I used to install it are:
1. use windows and the rkandroidtool to flash the recovery (I think there is no problem with that...)
2. Plug the device into my pc while simultaneously holding the 'flash' button
3. flash the kernel-0.3.img, renamed to recovery.img to the recovery partition
4. I boot on my pc into debian I have on a live usb
5. I open Gparted and partition an 8Gb usb stick as explained
6. I become root, cd to the usb stick and do "sudo tar -xzf linuxroot-0.3.tar.gz"
7. Plug the usb into my usb hub, attached to the stick (my hub is working fine)
8. boot the stick and use terminal to reboot in recovery
9. NOTHING - kernel panic

I already downloaded the rootfs and kernel twice, to be sure they were correctly downloaded. Any clue?

Edited by SV_25, 14 January 2013 - 02:59 PM.


#331 Aiexis

Aiexis

    Member

  • Jr. Member
  • PipPip
  • 22 posts

Posted 14 January 2013 - 03:59 PM

You need to reboot to bootloader, not recovery.
I don't think the two choices are identical.

#332 aloksinha2001

aloksinha2001

    Developer

  • FW Developer
  • PipPipPip
  • 247 posts

Posted 14 January 2013 - 05:21 PM

This is my device: http://www.sainsmart...ml?options=cart

The steps I used to install it are:
1. use windows and the rkandroidtool to flash the recovery (I think there is no problem with that...)
2. Plug the device into my pc while simultaneously holding the 'flash' button
3. flash the kernel-0.3.img, renamed to recovery.img to the recovery partition
4. I boot on my pc into debian I have on a live usb
5. I open Gparted and partition an 8Gb usb stick as explained
6. I become root, cd to the usb stick and do "sudo tar -xzf linuxroot-0.3.tar.gz"
7. Plug the usb into my usb hub, attached to the stick (my hub is working fine)
8. boot the stick and use terminal to reboot in recovery
9. NOTHING - kernel panic

I already downloaded the rootfs and kernel twice, to be sure they were correctly downloaded. Any clue?


Nine times out of ten - your hub is the culprit - some old hubs play nasty... try with an internal mem card.

Here are some trouble shooting things you can do.
- DO NOT put your usb into the stick...Reboot your stick into recovery kernel - your stick should come to busybox prompt... it will say it cannot do anything... this is a good thing... this will tell u you have flashed the kernel ok.. the work of recovery flash is ok...
- If you are NOT getting busybox - you would need to worry about flashing the recovery properly.

After the kernel is properly flashed, you can take a very simple approach - download pre-picuntu.sh from here... and it will do every thing for you.

Alok

#333 aruangra

aruangra

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 73 posts

Posted 14 January 2013 - 07:46 PM

You can only set frequency that this command tells you.. be carefull with your zeros... Anything else, will anycase hang your stuff...

cat /sys/devices/system/cpu/*/cpufreq/scaling_available_frequencies

I have been doing my testing on UG802 devices... the cpufreq is not tested by me on MK808 family as yet...
On UG802, there seems to be no problem, for me to push this up.

Alok


Hi Alok.

Thanks for the commands to set the cpu frequencies. I want to report that the commands also work with MK808 running Prealpha 0.3. By default, the stock Prealpha 0.3 works at "ondemand" (1GHz for both cores). When setting to "performance", the frequencies become 1.6GHz. From a benchmark test, it is about 30% faster. Great!!!

I have a few questions:

1) When I reboot the MK808, the setting changes to "ondemand" again. How can I set the frequencies to "performance" permanently?
2) Will there be any issue running at 1.6GHz in terms of stability? I don't notice any difference in the temperature of my device.

Thanks.

#334 aloksinha2001

aloksinha2001

    Developer

  • FW Developer
  • PipPipPip
  • 247 posts

Posted 14 January 2013 - 08:42 PM

Hi Alok.

Thanks for the commands to set the cpu frequencies. I want to report that the commands also work with MK808 running Prealpha 0.3. By default,
1) When I reboot the MK808, the setting changes to "ondemand" again. How can I set the frequencies to "performance" permanently?
2) Will there be any issue running at 1.6GHz in terms of stability? I don't notice any difference in the temperature of my device.

Thanks.


Good for you, that they are working...
1) When I reboot the MK808, the setting changes to "ondemand" again. How can I set the frequencies to "performance" permanently?
put a line in /etc/rc.local to echo "performance" in the cpufreq file,every time you boot.

2) Will there be any issue running at 1.6GHz in terms of stability? I don't notice any difference in the temperature of my device.
The temparature, will most definitely rise. The problem is that, there is no temp sensor on the cpu, and hence the cpu will never know, when to come down... it will keep getting heated up, and finally melt !!

Alok

#335 schmidtbag

schmidtbag

    Newbie

  • Jr. Member
  • Pip
  • 6 posts

Posted 14 January 2013 - 09:29 PM

I had a couple questions (in order of priority) about the MK808 before deciding to get one:

1. I don't want android, at all. Is there a way to wipe clean the Android image and put linux on it instead? If so, what are the steps to do this?
2. I prefer a pretty barebone setup and only install the packages I need. Is there an Ubuntu image that doesn't have XFCE or any collection of software on it?
3. Aside from the built-in storage, what exactly separates the installation procedure of the MK808 from other Cortex-A9 devices? In other words, couldn't I just use a Pandaboard image and install whatever missing drivers and firmware are missing?

Thanks in advance for any info people can supply.

#336 burchanie

burchanie

    Member

  • Jr. Member
  • PipPip
  • 26 posts

Posted 14 January 2013 - 11:10 PM

2) Will there be any issue running at 1.6GHz in terms of stability? I don't notice any difference in the temperature of my device.

Thanks.


I guess it wouldn't dissipate much energy when most of chip is idle. Probably the safest way is to clock it 1.2Ghz first, run some computationally intensive job (e.g. encoding sound/video) to force large areas of chip work hard, and check if temperature rise. Then, gradually to increase clock rate and check...

Good to know MK808 is actually able to work on full speed with the same linux core (compared to my sample of AK802).

#337 aruangra

aruangra

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 73 posts

Posted 15 January 2013 - 12:58 AM

Good for you, that they are working...
1) When I reboot the MK808, the setting changes to "ondemand" again. How can I set the frequencies to "performance" permanently?
put a line in /etc/rc.local to echo "performance" in the cpufreq file,every time you boot.

2) Will there be any issue running at 1.6GHz in terms of stability? I don't notice any difference in the temperature of my device.
The temparature, will most definitely rise. The problem is that, there is no temp sensor on the cpu, and hence the cpu will never know, when to come down... it will keep getting heated up, and finally melt !!

Alok


I add echo performance to /etc/rc.local. Right after booting, it is in the performance mode but after half a minute, it changes to "ondemand". I guess a process sets the cpu speed after rc.local runs. Any advice would be appreciated.

#338 Vik2009

Vik2009

    Newbie

  • Jr. Member
  • Pip
  • 4 posts

Posted 15 January 2013 - 03:20 AM

Typically, here are the steps you would do - in this order.

1. Open the Ug80x
2. Power down UG80x
3. Using a screw dirver or any similar device - touch the two points on the motherboard.
4. While you have kept it touched, power on the device - by connecting the usb cable from your PC to the device. The pads are usually coated with flux and thus may not short in the first instant...you may have to scratch it a bit.
5. The blue light of the device should glow (I have seen this not to happen always)
6. The output on the main screen will be black.. nothing on screen.
7. Run rktool (1.35) on the PC, you should see "Android found"

This is where, you are back in game....to flash new kernel.


Alok


Hi,

My UG007 doesn't enter in Flash mode.
I do all the steps and never rktool show me "android found". I have other MK802-IIIs and I have experience with reflashing original and finless rom. I have the drivers installed (tried flashing mk802-3s) but UG007 never enter in Flash Mode.
Posted Image

Where is my mistake?

Thanks,

#339 fkubi

fkubi

    Member

  • Jr. Member
  • PipPip
  • 20 posts

Posted 15 January 2013 - 03:58 AM

To CPU frequencies...

Guys, do not believe what /proc/cpuinfo says. It is not a static value, but changes according to the current speed of the CPU that depends on many factors.
What you can do is "dmesg | less" and search for "CPU". There you will find the initial measurements (bogomips / 2 gives the _approximate_ MHz value)

In /proc/cpuinfo as I've said above you will see the actual speed. On my iMito MX1 I usually see 1 core, 503 bogomips. It means that for powersaving reasons one of the cores is turned off and the other runs at ~250MHz. I'd be very happy to see this behaviour on my Intel boxes :)

If you want to see your processor cores running at full speed, you must make them work. Just start some (more than one!) CPU intensive applications such as "gzip < /dev/zero > /dev/null" , "cat < /dev/urandom > /dev/null" or simply "while true ; do echo ; done > /dev/null"

You will see in /proc/cpuinfo the cores running on higher frequency.

#340 aloksinha2001

aloksinha2001

    Developer

  • FW Developer
  • PipPipPip
  • 247 posts

Posted 15 January 2013 - 03:58 AM

Hi,

My UG007 doesn't enter in Flash mode.
I do all the steps and never rktool show me "android found". I have other MK802-IIIs and I have experience with reflashing original and finless rom. I have the drivers installed (tried flashing mk802-3s) but UG007 never enter in Flash Mode.
Posted Image

Where is my mistake?

Thanks,


You have identified the points to short correctly...

but the tool to short the same needs sharper edge.

I recommend using a this screw-driver, to first scrape off any flux that is bound to be there...
Second, use the same screw-driver to short the same.
Lastly, while keepint it shorted, you need to powerup...

Be assured, it works... you need to try it out for a few times...

Alok