RK3288 mainline kernel and Mali drivers

Discussion about U-Boot and the kernel.

RK3288 mainline kernel and Mali drivers

Postby duckdodger » Sat Feb 17, 2018 4:49 pm

Hello,
I was wondering if it's possible to support the mainline kernel with the Mali kernel drivers for the Rockchip RK3288 SoC, used for example in Asus Chromebook Flip C100P and C201P. Currently, the generic mainline kernel provided in the repositories "linux-armv7" does not include the specific Mali Midgard drivers required to use the Mali user-space drivers and thus enable things like graphics acceleration, Wayland support, etc. For your reference, I believe Rockchip itself maintains a repository for the mainline kernel including the Mali drivers here: https://github.com/rockchip-linux/kernel

Another repository that does the same is RockMyy: https://github.com/Miouyouyou/RockMyy and this is mainly for those development boards which use this SoC, like the Tinkerboard and Firefly. Given all this, can we have a kernel package that has the latest drivers as on this repository which would be a huge help for people using the Chromebooks mentioned above since anything graphics related runs very poorly on them now? I realize it won't change much, but at least it would help in video acceleration, Wayland and whatever software that can support GLES.

Also worth noting is that the user-space driver "veyron-libgl" in the repos here is very old (version r5p0) while what's included in RockMyy is version r19p0. I believe the newer drivers have much better support for X11 and Wayland.
duckdodger
 
Posts: 6
Joined: Sat Sep 23, 2017 5:59 pm

Re: RK3288 mainline kernel and Mali drivers

Postby apokalypz » Sun Mar 04, 2018 5:15 am

I second this.
Though, if you want to make your own packages in the meantime, you can use the PKGBUILD files in the archlinuxarm/PKGBUILD repository as a template and change the sources to the rockchip-linux repo for the Mali libgl driver. That's what I did for my gru Chromebook (repo in my github: https://github.com/apokalypzx/gru-libgl) and then do the same for the kernel (a bit more complicated).
For the kernel, I had to use the kernel PKGBUILD for my specific Chromebook (it needs the Mali kernel drivers in it; version shouldn't really matter.) Then I added a bit in the PKGBUILD to download the r# driver matching the user space driver I packaged and literally copied drivers/ and include/ straight over the kernel source root tree. I then had to make one modification to the source to get it to build correctly (had to comment out something about an include directive in the new mali driver for a specific kernel version that the kernel source was already patched for.) I then installed and it works perfectly (except I can't get X11 to successfully load the armsoc DDX) but Wayland and DRM rendering works well. (For RK3399 at least)

Changing the instructions to work with your RK3288 should be pretty straight forward. I hope this helps.
apokalypz
 
Posts: 41
Joined: Sun Apr 06, 2014 6:13 pm

Re: RK3288 mainline kernel and Mali drivers

Postby duckdodger » Tue Mar 06, 2018 10:05 am

That's great! I'll give it a try, although I must say I have no prior experience with this kernel stuff; I'm not even a programmer to begin with, I just know my way around basic command line operations. When I wrote this post, it was out of desperation because I felt helpless. :) Anyhow, what you say doesn't sound difficult or incomprehensible to me so I'll take your hints and see if I can do it myself. By the way, how did you test Wayland and DRM rendering? Does KDE Plasma/GNOME or any other Wayland compositor work without any problems?

Thanks for replying, I almost gave up on getting any response to this post.
duckdodger
 
Posts: 6
Joined: Sat Sep 23, 2017 5:59 pm

Re: RK3288 mainline kernel and Mali drivers

Postby hyshka » Tue Mar 06, 2018 5:38 pm

Thanks @apokalypz for the advice and @duckdodger for starting it off. I'd also love to get the Mali drivers working on my Asus c201 with the mainline kernel. I don't have much time but I'm going to give this a shot, too. I will post here with any progress I make.
hyshka
 
Posts: 7
Joined: Tue Mar 06, 2018 5:32 pm

Re: RK3288 mainline kernel and Mali drivers

Postby apokalypz » Mon Mar 12, 2018 4:11 am

No problem.

Fun bit of info, the chromium 4.4 kernel just got upgraded to Mali r22 (I think). So the r14 userspace drivers should work without having to alter and rebuild the kernel now (once the kernel's pkgbuild gets updated)!

I tested it and it works (on my Chromebook GRU).

EDIT: In response to your question on how I tested Wayland/DRM: I built glmark2 and ran glmark2-drm from console and ran glmark2-wayland from Weston. Also Weston outputs a lot of info about its display initialization process. Just run:
$this->bbcode_second_pass_code('', 'weston-launch 2>~/weston.log') all the info ends up in the weston.log file it created in your home directory.
apokalypz
 
Posts: 41
Joined: Sun Apr 06, 2014 6:13 pm


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 2 guests