RK30xx kernel source for custom modding...

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Re: RK30xx kernel source for custom modding...

Postby AndrewDB » Sun Nov 11, 2012 2:14 pm

Icewyng wrote:
Omegamoon wrote:
Icewyng wrote:Remember that the original source code was meant to run on a Bq Edison tablet. Need I say more ;)


Hmmm...no. :) What I wanted to know basically is did anyone get it to boot on android and with a tablet. ;)


The answer is not yet. As far as I know there are three people who have managed to boot this Edison kernel:
- deadhp1.
- omegamoon.
- myself.

I am pretty sure Omegamoon doesn't have a RK3066 tablet and neither do I. I am not sure about deadhp1 but I think he is also focusing on Android TV sticks.

However, the drivers are right there in the source tree for anybody to try to compile and boot this kernel on a tablet.
Last edited by AndrewDB on Sun Nov 11, 2012 8:04 pm, edited 1 time in total.

User avatar
Omegamoon
Posts: 107
Joined: Mon Oct 15, 2012 5:43 am

Re: RK30xx kernel source for custom modding...

Postby Omegamoon » Sun Nov 11, 2012 6:13 pm

AndrewDB wrote:I am pretty sure Omegamoon doesn't have a RK3066 tablet and neither do I. I am not sure about deadhp1 but I think he is also focusing on Android TV sticks.

However, the drivers are right in the source tree for anybody to try to compile and boot this kernel on a tablet.

No tablet(s) here at Omegamoon headquarters yet :) And to be honest, the Rockchip devices are currently more or less "closed" systems. I like my gadgets to be "open" and more "hackable". So not sure if a tablet arrives here it will be a Rockchip. But the MK808 is still fun though, and as long as I'm still learning I'll continue to hack my way around ;)
For updates please visit www.omegamoon.com
A big round of applause to yobikap for donating a MK808 and tonikasch for donating a MK808B!

If you like what I'm doing, consider a small donation by clicking the "Donate" button on my website

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Updated RK3066 kernel/Linux TODO list

Postby AndrewDB » Sun Nov 11, 2012 11:51 pm

The following is my updated (12 Nov 2012) list of TODO things for the Edison kernel tree / Linux on the UG802/MK808/other RK3066 devices:
1. Networking -> should work fine on the MK808, bugs to be ironed out on the UG802 (working only with a USB Wifi dongle, not the internal Wifi).
2. Bluetooth -> USB BT is recognized but has timeouts and other errors when trying to connect to a Bluetooth peripheral i.e. bugs to be ironed out here too.
3. HDMI -> FIXED. I am getting a 1920x1080@60Hz XFCE desktop.
4. USB bugs: somehow the USB interfaces (both host and otg) are having problems and have low transfer rates. Also under investigation.
5. No sound through HDMI -> should use hdmi-audio-codec but doesn't; the reason is I have to compile the i2s audio drivers, but I haven't tested this yet.
6. Cpufreq governors, max clock, heat issues: all governors seems to work but I would suggest the interactive as default. Max speed can be set in the kernel or in user space, I would suggest around 1.2GHz for the MK808 (no voltage scaling* but large heatsinks) and around 1.3GHz on the UG802 (voltage scaling but no heatsink). The kernel has settings up to 1.6GHz but I would suggest using that speed only with heatsink and voltage scaling.
7. Kernel compilation can probably be done with any recent version of gcc: Android prebuilt 4.4, Code Sourcery 4.5.1, Linaro 4.6.x and 4.7.x and standard Ubuntu Quantal gcc 4.7.2.
8. Kernel config: the kernel can probably be configured for any PC stick and tablet based on the RK3066, but some work on some drivers may still be needed. I am going to start working on documenting this.
9. Implement dual boot as described in posts above: fun's tests indicate this is doable, and I am going to work on this next and release a dual-boot Android + Linux** ROM later this month.
10. SD card read and write speeds are *very* low. Reason unknown at this time (may be related to the USB bugs in 2 and 4 above).
11. /proc/cpuinfo reports wrong Bogomips and number of CPUs.

As you can see there is still a lot of development work to bring this kernel tree up to a reasonable state.

* No voltage scaling means the MK808 has the RK3066 running the CPU cores at the maximum voltage all the time. This is a bad decision by the hardware engineers that designed it. It saves about $1 in components costs but the device heats up a lot more.
** The Linux kernel can obviously be used with any Linux distribution for ARM: the kernel is flashed in ROM but it boots the distribution from any working mass storage device (microSD card tested). The following Linux distributions are available for ARM nowadays with more to come: Debian, Ubuntu, Linaro, Arch, SuSE, Fedora. I am using Ubuntu 12.10 Quantal personally (Xubuntu flavor).

I'll be on vacation this week and I'll be back next Monday nov 19 only.

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Teaser screenshot ;)

Postby AndrewDB » Mon Nov 12, 2012 1:50 am

Image

Yes, posted from the UG802 itself. :mrgreen:

senten
Posts: 6
Joined: Thu Nov 08, 2012 6:40 am

Re: RK30xx kernel source for custom modding...

Postby senten » Mon Nov 12, 2012 7:38 am

It's great reading your updates. Thanks a lot!

Enjoy the vacation!

kriss_fr
Posts: 10
Joined: Mon Oct 15, 2012 1:08 pm

Re: Updated RK3066 kernel/Linux TODO list

Postby kriss_fr » Mon Nov 12, 2012 12:22 pm

AndrewDB wrote:7. Kernel compilation can probably be done with any recent version of gcc: Android prebuilt 4.4, Code Sourcery 4.5.1, Linaro 4.6.x and 4.7.x and standard Ubuntu Quantal gcc 4.7.2.
8. Kernel config: the kernel can probably be configured for any PC stick and tablet based on the RK3066, but some work on some drivers may still be needed. I am going to start working on documenting this.
.


Hi andrewDB,

I successfully compile a kernel from omegamoon github tree with the last stable linaro toolchain.
I don't change anything in my menuconfig and i don't have test the kernel.
Can you share your .config (for mk808) to see the diff between yours and the original ?

about the omegamoon github repo, it doesn't contain your change about hdmi. Is it the only change that you have done ?

To test "my" kernel, can i unpack the stock rom, replace the kernel, repack it and flash it with rockchip Tool Kit?

Thanks again, and good vacation ! :)

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Re: Updated RK3066 kernel/Linux TODO list

Postby AndrewDB » Mon Nov 12, 2012 5:41 pm

kriss_fr wrote:
AndrewDB wrote:7. Kernel compilation can probably be done with any recent version of gcc: Android prebuilt 4.4, Code Sourcery 4.5.1, Linaro 4.6.x and 4.7.x and standard Ubuntu Quantal gcc 4.7.2.
8. Kernel config: the kernel can probably be configured for any PC stick and tablet based on the RK3066, but some work on some drivers may still be needed. I am going to start working on documenting this.
.


Hi andrewDB,

I successfully compile a kernel from omegamoon github tree with the last stable linaro toolchain.
I don't change anything in my menuconfig and i don't have test the kernel.
Can you share your .config (for mk808) to see the diff between yours and the original ?

about the omegamoon github repo, it doesn't contain your change about hdmi. Is it the only change that you have done ?

To test "my" kernel, can i unpack the stock rom, replace the kernel, repack it and flash it with rockchip Tool Kit?

Thanks again, and good vacation ! :)

<French>
Merci, et je peux te répondre en Français si tu veux (dans un PM à part). ;)
</French>

I don't have yet a proper .config for the MK808, specially if you are building an Android kernel (my configs are for Linux). So I would suggest that you start with the .config that Omegamoon has prepared for the MK808, it should work.
Also the changes I made to the source to get the HDMI output working are exactly those I published here in this thread. The other (small) changes I made are more specific to the UG802 and not needed for the MK808.

To test your kernel, the best way is to prepare a slightly modified Android kernel + initramfs image (using the tools provided by fun, they work very well) and flash only the recovery partition with it. The reason for this is that the recovery partition is not critical, you can write whatever you want there and you won't brick your MK808.

For the initramfs for the recovery partition you can use the CWM recovery initramfs I posted earlier in this thread, it has adb enabled by default and that's very useful for kernel debugging. The only change you have to make is to edit the recovery.fstab. Hmmm, also take a look at init.rc to check that there is nothing specific to the UG802, but I don't think so. Well, it won't hurt to check anyways... ;)

Like that you can still boot the normal kernel and Android and "fix" things from Android (using a terminal with root rights), and reboot into recovery to test your kernel again.

Unbricking your MK808 may require opening it and that is not so simple, so make sure you check your kernel thoroughly before ever flashing it to the kernel partition.
Last edited by AndrewDB on Mon Nov 12, 2012 10:11 pm, edited 1 time in total.

vampirex
Posts: 29
Joined: Wed Oct 31, 2012 10:32 pm

Re: RK30xx kernel source for custom modding...

Postby vampirex » Mon Nov 12, 2012 7:47 pm

Wowza!! Linux!! yay... :D

Good Job AndrewDB!!

Icewyng
Posts: 4
Joined: Sat Oct 20, 2012 9:24 am

Re: RK30xx kernel source for custom modding...

Postby Icewyng » Mon Nov 12, 2012 7:56 pm

Omegamoon wrote:No tablet(s) here at Omegamoon headquarters yet :) And to be honest, the Rockchip devices are currently more or less "closed" systems. I like my gadgets to be "open" and more "hackable". So not sure if a tablet arrives here it will be a Rockchip. But the MK808 is still fun though, and as long as I'm still learning I'll continue to hack my way around ;)


The fact it is closed source is a very big drawback. Someone was told by RockChip they would release the kernel source when they felt it was ready.

Anyway, what we have so far seems to work. Just need to get debug working and log level 7 and we would be good to go.

@Andrew [French] content de voir un autre francophone ici! :) [/French]

User avatar
Omegamoon
Posts: 107
Joined: Mon Oct 15, 2012 5:43 am

Re: RK30xx kernel source for custom modding...

Postby Omegamoon » Tue Nov 13, 2012 7:54 am

We're getting some media coverage over here :D
For updates please visit www.omegamoon.com
A big round of applause to yobikap for donating a MK808 and tonikasch for donating a MK808B!

If you like what I'm doing, consider a small donation by clicking the "Donate" button on my website

stelin
Posts: 37
Joined: Sat Oct 13, 2012 6:18 am

Re: RK30xx kernel source for custom modding...

Postby stelin » Tue Nov 13, 2012 11:01 am

Omegamoon wrote:We're getting some media coverage over here :D


Nice, i hope you guys get lots more media coverage, maybe rockchip change its strategy
and realize the economic benefits, it has happened similar manufacturers
Last edited by stelin on Tue Nov 13, 2012 6:23 pm, edited 1 time in total.

vampirex
Posts: 29
Joined: Wed Oct 31, 2012 10:32 pm

Re: RK30xx kernel source for custom modding...

Postby vampirex » Tue Nov 13, 2012 5:05 pm

stelin wrote:
Omegamoon wrote:We're getting some media coverage over here :D


Nice, i hope you gays get lots more media coverage, maybe rockchip change its strategy
and realize the economic benefits, it has happened similar manufacturers


Lol... you mean "Guys"

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Re: RK30xx kernel source for custom modding...

Postby AndrewDB » Tue Nov 13, 2012 6:42 pm

Guys,
I have just checked and the MX1, which looked like the best candidate for Linux development, unfortunately uses the MT5931 WiFi+Bluetooth chipset from Mediatek, and as far as I can see the driver is not available in the Edison source code tree.

User avatar
Omegamoon
Posts: 107
Joined: Mon Oct 15, 2012 5:43 am

Re: RK30xx kernel source for custom modding...

Postby Omegamoon » Wed Nov 14, 2012 7:35 pm

Just a quick update from my side, since Andrew is enjoying his vacation (I hope). So sweet, just compared the kernel debug output of the boot process on the MK808, and my custom kernel is generating nearly the same debug logging during boot as the original kernel. This means that all hardware is configured identical... long live reverse engineering :D My MK808 now boots Ubuntu Quantal from external SD card. More to come ;)
For updates please visit www.omegamoon.com
A big round of applause to yobikap for donating a MK808 and tonikasch for donating a MK808B!

If you like what I'm doing, consider a small donation by clicking the "Donate" button on my website

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Re: RK30xx kernel source for custom modding...

Postby AndrewDB » Wed Nov 14, 2012 11:14 pm

Omegamoon wrote:Just a quick update from my side, since Andrew is enjoying his vacation (I hope). So sweet, just compared the kernel debug output of the boot process on the MK808, and my custom kernel is generating nearly the same debug logging during boot as the original kernel. This means that all hardware is configured identical... long live reverse engineering :D My MK808 now boots Ubuntu Quantal from external SD card. More to come ;)

Great news! Congrats!
PS: Yes, I am enjoying some fantastic vacations! :D
Last edited by AndrewDB on Thu Nov 15, 2012 4:29 am, edited 1 time in total.

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Re: RK30xx kernel source for custom modding...

Postby AndrewDB » Wed Nov 14, 2012 11:26 pm

Another unsupported piece of hardware: the UG007 uses a Mediatek MT6622 Bluetooth chip and there is no driver for this chip as far as I can see in the Edison kernel source tree.
Guys, what I have noticed is that the leaked Edison kernel source is an early release by Rockchip, I am pretty sure they have more recent releases of this kernel source with more drivers and quite possibly some kernel bugs fixed.
So I would really suggest you again start sending mails to companies that are shipping tablets with the RK3066, such as Archos and Odys and Yarvik and others, requesting that they comply with the GPL and release the kernel source code for their RK3066 models.
Of course ultimately it is Rockchip themselves that should release the kernel source code for the RK3066, but I don't think they have as yet understood the advantages of having their kernel source scrutinized by thousands of programmers. A pity really because the quality of the original code by Rockchip is rather below average, and could really use some rewriting in many places (as far as I can tell from the leaked Edison kernel source).

AndrewDB
Posts: 144
Joined: Sun Oct 28, 2012 5:53 pm

Re: RK30xx kernel source for custom modding...

Postby AndrewDB » Fri Nov 16, 2012 11:36 am

Guys,
I have a MAJOR announcement to make: I was just handed (by Andy Kirby from Rikomagic - a BIG THANK YOU) an apparently later version of the kernel source for the Rockchip RK3066 (it has better support for the TPS65910 Power Controller, that much I verified).
I uploaded it to my Github account:
https://github.com/AndrewDB/rk3066-kernel
Note that I haven't had the time to look at it in much depth yet and I won't be back to my office until Monday.
Last edited by AndrewDB on Fri Nov 16, 2012 12:58 pm, edited 2 times in total.

kriss_fr
Posts: 10
Joined: Mon Oct 15, 2012 1:08 pm

Re: RK30xx kernel source for custom modding...

Postby kriss_fr » Fri Nov 16, 2012 11:49 am

AndrewDB wrote:Guys,
I have a MAJOR announcement to make: I was just handed an apparently later version of the kernel source for the Rockchip RK3066.
I uploaded it to my Github account:
https://github.com/AndrewDB/rk3066-kernel
Note that I haven't had the time to look at it in depth yet and I won't be back to my office until Monday.


Good news !

Where do you find it ?
Why do you thinks i'ts a later version than the BQ edison kernel sources ?

BooLE
Posts: 61
Joined: Tue Sep 25, 2012 9:41 am

Re: RK30xx kernel source for custom modding...

Postby BooLE » Fri Nov 16, 2012 4:15 pm

AndrewDB wrote:Guys,
I have a MAJOR announcement to make: I was just handed (by Andy Kirby from Rikomagic - a BIG THANK YOU) an apparently later version of the kernel source for the Rockchip RK3066 (it has better support for the TPS65910 Power Controller, that much I verified).
I uploaded it to my Github account:
https://github.com/AndrewDB/rk3066-kernel
Note that I haven't had the time to look at it in much depth yet and I won't be back to my office until Monday.


This is great news! Waiting for your update...

User avatar
Omegamoon
Posts: 107
Joined: Mon Oct 15, 2012 5:43 am

Re: RK30xx kernel source for custom modding...

Postby Omegamoon » Fri Nov 16, 2012 4:42 pm

AndrewDB wrote:Guys,
I have a MAJOR announcement to make: I was just handed (by Andy Kirby from Rikomagic - a BIG THANK YOU) an apparently later version of the kernel source for the Rockchip RK3066 (it has better support for the TPS65910 Power Controller, that much I verified).
I uploaded it to my Github account:
https://github.com/AndrewDB/rk3066-kernel
Note that I haven't had the time to look at it in much depth yet and I won't be back to my office until Monday.

Great news. I had a quick look, but it seems the vpu_service is missing. Hopefully it has lots of bugs fixed, although I haven't found any major issues with the BQ sources. Next week I will be away, so no updates from me for a while ;) Current status is that I finally understand how the MK808 Wifi works. It's... weird :?
For updates please visit www.omegamoon.com
A big round of applause to yobikap for donating a MK808 and tonikasch for donating a MK808B!

If you like what I'm doing, consider a small donation by clicking the "Donate" button on my website


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest