I have ported olegk0's kernel (https://github.com/olegk0/rk3066-kernel) updates and Mali driver to Picuntu on my Picuntu kernel branch (https://github.com/Galland/picuntu-3.0.8-alok https://github.com/Galland/rk3x_kernel_3.0.36).
I'm testing and it seems very stable.
Please note that Mali is the GPU on the RK3066, responsible for 2D/3D acceleration, not for HW video en/decoding! That's done by the VPU core, which is still unsupported.
Please note that, afaik, all of this is work done by olegk0 (see [1]) and I have just checked it does work on our Picuntu, so all cheers go to him, thanks for the great work, olegk0!
If you would like to test this too, grab my github kernel and follow the instructions on [1] or these Picuntu-targeted instructions here:
1) Get xorg.conf and place it on your Picuntu MicroSD's folder /etc/X11/
2) Get rk30fb_drv.so (or compile it yourself) and place it on your Picuntu MicroSD's folder /usr/lib/xorg/modules/drivers/
3) Modify /etc/rc.local by commenting (precede with #) existing lines that use "fbset" and adding the following new lines:
fbset -rgba 8/16,8/8,8/0,8/24 -a
chmod 666 /dev/mali /dev/ump
4) Modify /etc/modules to add the following lines:
rk29-ipp
ump
disp_ump
mali
drm
mali_drm
5) Get the mali package, uncompress and install this file: mali400_2.1-13_armhf.deb
6) Run the following commands:
sudo mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/
Then if you enter: ll /usr/lib | grep libMali
The output should look something like this:
lrwxrwxrwx 1 root root 19 abr 16 17:58 libEGL.so -> /usr/lib/libMali.so
lrwxrwxrwx 1 root root 10 feb 22 02:06 libEGL.so.1.4 -> libMali.so
lrwxrwxrwx 1 root root 19 abr 16 17:58 libGLESv1_CM.so -> /usr/lib/libMali.so
lrwxrwxrwx 1 root root 10 feb 22 02:06 libGLESv1_CM.so.1.1 -> libMali.so
lrwxrwxrwx 1 root root 19 abr 16 17:58 libGLESv2.so -> /usr/lib/libMali.so
lrwxrwxrwx 1 root root 10 feb 22 02:06 libGLESv2.so.2.0 -> libMali.so
-rw-r--r-- 1 root root 731492 feb 22 02:06 libMali.so
LAST STEP : ONLY IF YOU ARE NOT USING KERNEL 3.0.36+
Get my github kernel code (3.0.36+) and compile it, just make sure that you do this too:
- I'm using the Measy U2C stick, which has DDR3 1333 9-9-9 capable memory, but this may not be your case and may cause your system to not boot. So just before compiling ("make -j 4") do "make menuconfig" and get inside "System Type" and there set "DDR Memory Type" to "DDR3 (Type default)" and "DDR SDRAM frequence (in MHz)" [sic] to "333".
- Also please note that my kernel is set to Maximum CPU frequency of 1.6 GHz (instead of 1.2 GHz in stock Picuntu), so use at your own risk!!!!!For added safety you can make your CPU run cooler by setting (in above menuconfig) into "CPU Power Management" --> "CPU Frequency scaling" --> "Default CPUfreq governor" to "conservative" or "powersave", so it will rarely go to high frequencies (but it'll be slower). My CPU does fine with 1.6 GHz without any heatsink, and usually runs at 60-70 ºC, with 80+ spikes :S however voltage scaling is known to work on my stick (not on others I fear). I fixed this in current github kernel, so CPU automatically scales down frequency when temperature rises.
- You may also want to check on "Device Drivers" -> "Network device support" -> "Wireless LAN" that your Wifi chip/stick is selected there, for its driver to be compiled. My kernel is, currently, more up to date than others, and as you will see, there is a driver for the RK903 Wifi. However, since I don't own a stick that has it, I haven't been able to test. Please let me know if it works for you :)
- After compiling, you have to do "make modules" too, this is very important!
- Then do "make modules_install" and go to your PC's /lib/modules to grab the full"3.0.8+alok" "3.0.36+" folder and copy it to your Picuntu MicroSD's /lib/modules folder (or just do all this on your Picuntu Linux!!:), then boot up your Picuntu stick and type in a terminal "depmod -a" so it will parse the new modules and restart Picuntu.
- After doing that you can flash the recovery partition with the compiled kernel
This could sound complicated but kernel tinkering is actually pretty straightforward and works! :) Hope it helps and check your temperature with: cat /sys/module/tsadc/parameters/temp*
END OF LAST STEP (only for non 3.0.36+)
It should report >120 fps (I usually get from 120 to 170 fps) with a CPU usage of around 30% for Xorg and just <15% for es2gears.
If that's not the case then double-check above steps and if it still doesn't work, you can, for example, post your questions at Miniand's Picuntu forum, where I try to be of help.
Disclaimer: Use at your own risk!!
If you run into an "Illegal instruction" error or a sudden reboot... your stick needs a heatsink... I spent the whole glmark2-es2 test blowing air to mine!
This is due to my overclocking the GPU from 266 MHz to its limit of 400 MHz, I've undone this in the github kernel too :)
MK808 note: If you have a MK808 you may want to compile olegk0's kernel instead of mine, because MK808 uses a different "LCDC video port" for HDMI output (1 instead of 0), which requires some minor code changes. However my kernel is more up to date (less bugs, less power consumption, etc.) than his, so I must recommend it for other sticks.
Reference
http://www.slatedroid.com/topic/55626-my-version-of-the-linux-kernel-for-mk808/
http://linux-sunxi.org/Binary_drivers
https://www.miniand.com/forums/forums/picuntu-linux/topics/new-kernel-3-0-36-for-picuntu-linux-on-rk3066-released
5) Get the mali package, uncompress and install this file: mali400_2.1-13_armhf.deb
6) Run the following commands:
sudo mv /usr/lib/arm-linux-gnueabihf/mesa-egl/ /usr/lib/arm-linux-gnueabihf/.mesa-egl/
sudo ln -s /usr/lib/libMali.so /usr/lib/libEGL.so
sudo ln -s /usr/lib/libMali.so /usr/lib/libEGL.so.1.4
sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv1_CM.so
sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv1_CM.so.1.1
sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv2.so
sudo ln -s /usr/lib/libMali.so /usr/lib/libGLESv2.so.2.0
Then if you enter: ll /usr/lib | grep libMali
The output should look something like this:
lrwxrwxrwx 1 root root 19 abr 16 17:58 libEGL.so -> /usr/lib/libMali.so
lrwxrwxrwx 1 root root 10 feb 22 02:06 libEGL.so.1.4 -> libMali.so
lrwxrwxrwx 1 root root 19 abr 16 17:58 libGLESv1_CM.so -> /usr/lib/libMali.so
lrwxrwxrwx 1 root root 10 feb 22 02:06 libGLESv1_CM.so.1.1 -> libMali.so
lrwxrwxrwx 1 root root 19 abr 16 17:58 libGLESv2.so -> /usr/lib/libMali.so
lrwxrwxrwx 1 root root 10 feb 22 02:06 libGLESv2.so.2.0 -> libMali.so
-rw-r--r-- 1 root root 731492 feb 22 02:06 libMali.so
LAST STEP : ONLY IF YOU ARE NOT USING KERNEL 3.0.36+
Get my github kernel code (3.0.36+) and compile it
- Also please note that my kernel is set to Maximum CPU frequency of 1.6 GHz (instead of 1.2 GHz in stock Picuntu), so use at your own risk!!!!!
- After compiling, you have to do "make modules" too, this is very important!
- Then do "make modules_install" and go to your PC's /lib/modules to grab the full
- After doing that you can flash the recovery partition with the compiled kernel
This could sound complicated but kernel tinkering is actually pretty straightforward and works! :) Hope it helps and check your temperature with: cat /sys/module/tsadc/parameters/temp*
END OF LAST STEP (only for non 3.0.36+)
Testing 3D acceleration:
Run as a normal user: es2gearsIt should report >120 fps (I usually get from 120 to 170 fps) with a CPU usage of around 30% for Xorg and just <15% for es2gears.
If that's not the case then double-check above steps and if it still doesn't work, you can, for example, post your questions at Miniand's Picuntu forum, where I try to be of help.
Disclaimer: Use at your own risk!!
If you run into an "Illegal instruction" error or a sudden reboot... your stick needs a heatsink... I spent the whole glmark2-es2 test blowing air to mine!
This is due to my overclocking the GPU from 266 MHz to its limit of 400 MHz, I've undone this in the github kernel too :)
Reference
http://www.slatedroid.com/topic/55626-my-version-of-the-linux-kernel-for-mk808/
http://linux-sunxi.org/Binary_drivers
https://www.miniand.com/forums/forums/picuntu-linux/topics/new-kernel-3-0-36-for-picuntu-linux-on-rk3066-released
Tidak ada komentar:
Posting Komentar