|
|
Posted at 2/28/2015 11:39:40
Only Author
2#
Re: Mali kernel driver TX011-SW-99002-r5p1-00rel0 for firefly
Last edited by busybee In 9/15/2015 11:31 Editor
Test OpenGL ES Linux support on Firefly-RK3288 Development Board
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
Introduction
Firefly-RK3288 development board is equipped with the powerful Mali
T764 GPU. Lately, ARM has released the binary user-space fbdev
driver. We, the Firefly team, have taken a first stab at it.
Environment:
- Firefly-RK3288 development board with latest dual boot firmware
installed.
- 64 bit Ubuntu Linux (12.04 or later) host pc.
Kernel
First, we need to update the mali kernel driver.
Download Linux kernel driver TX041-SW-99002-r5p1-00rel0.tgz in
[http://malideveloper.arm.com/develop-for-mali/drivers/open-source-mali-t6xx-gpu-kernel-device-drivers/]
The porting process involves: replace the old driver files with new
ones, apply the kds patch, fix the compiling errors and update the
config file.
To make life easier, we've packaged all the files into
firefly-mali-driver-TX011-SW-99002-r5p1-00rel0.tar.gz .
q
cd /path/to/your/firefly/sdk
ls kernel # kernel directory should be here
tar xzf /path/to/firefly-mali-driver-TX011-SW-99002-r5p1-00rel0.tar.gz
t
Then compile it:
q
cd kernel
make firefly-rk3288-linux_defconfig
make -j8 firefly-rk3288.img
make modules
t
The compiled mali module is located at drivers/gpu/arm/midgard/. Copy
mali_kbase.ko to your board:
q
scp drivers/gpu/arm/midgard/mali_kbase.ko root@BOARD_IP:/system/lib/modules/
t
(Why `/system/lib/modules/' ? Just because /etc/rc.local willl insmod
it automatically.)
Then follow the steps described in
[http://wiki.t-firefly.com/index.php/Firefly-RK3288/Build_kernel/en] ,
to pack zImage and initrd to linux-boot.img .
Flash linux-boot.img to recovery partition of the board.
User-space drivers
Download mali-t76x_r5p0-06rel0_linux_1+fbdev.tar.gz in:
[http://malideveloper.arm.com/develop-for-mali/features/mali-t6xx-gpu-user-space-drivers/]
Then install it to the board:
q
cat /path/to/mali-t76x_r5p0-06rel0_linux_1+fbdev.tar.gz \
| ssh root@BOARD_IP tar --strip-components=1 -xzf - -C /usr/lib
t
Compile Mali OpenGL ES SDK demos
Download Mali_OpenGL_ES_SDK_v2.4.4.71fdbd_Linux_x64.tar.gz in
[http://malideveloper.arm.com/develop-for-mali/sdks/opengl-es-sdk-for-linux/]
Please choose Linux X64 archive.
To build the SDK demos, you need a cross compile toolchain. If you
have not installed yet, try this linaro toolchain:
[http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz]
(Extract it to /opt)
You also need to install cmake (sudo apt-get install cmake).
q
tar xzf /path/to/Mali_OpenGL_ES_SDK_v2.4.4.71fdbd_Linux_x64.tar.gz
cd Mali_OpenGL_ES_SDK_v2.4.4
mkdir build-arm
cd build-arm
export TOOLCHAIN_ROOT=/opt/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
cmake -DTARGET=arm ..
make install
cd ..
# bin_arm contains all the result files
scp -r bin_arm root@BOARD_IP:/root
t
Set 32bit framebuffer
Before running demos, the fbdev should be in 32 bit mode.
Run following commands on the board:
q
sudo -s
cat << EOF >/etc/init/fbset.conf
# fbset - run fbset to set truecolor fbmo
description "run fbset before lightdm"
start on startup and started udev or starting lightdm
task
script
[ -x /bin/fbset ] && /bin/fbset -a -nonstd 1 -depth 32 -rgba "8/0,8/8,8/16,8/24"
end script
EOF
cat << EOF >/etc/X11/xorg.conf
Section "Screen"
Identifier "Default Screen"
DefaultDepth 24
EndSection
EOF
t
Then reboot the device.
Run demos
Before running demos, make sure you have:
1. Flashed the new Linux kernel.
2. Updated mali_kbase.ko
3. Installed Mali user drivers
4. Uploaded Mali demos
5. Configured 32bit framebuffer
Then open a terminal, run one of the demo:
q
sudo -i
cd bin_arm/opengles_30/skybox
./skybox
t
Enjoy!
Video
http://youtu.be/UBWfFCDTtGI
|
|