参考论坛:Mali kernel driver TX011-SW-99002-r5p1-00rel0 for firefly
最近手头有一块firefly_rk3288_reload的开发板,想实现在linux 下用openGL ES来做视频显示。
找到opengGL相关移植,参考论坛(http://bbs.t-firefly.com/forum.php?mod=viewthread&tid=321&extra=page%253D2)的方法,进行移植。
方法:
Test OpenGL ES Linux support on Firefly-RK3288 Development Board
════════════════════════════════════════════════════════════════
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/]
(note:这个是arm官方针对这款gpu驱动发布的官方驱动)
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 .
(note:实际上我们只需要下载firefly-mali-driver-TX011-SW-99002-r5p1-00rel0.tar.gz 这个驱动文件就可以了。)
╭────
│ 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
╰────
Then compile it:
╭────
│ cd kernel
│ make firefly-rk3288-linux_defconfig
│ make -j8 firefly-rk3288.img
│ make modules
╰────
(note:上面这步的时候,需要自己重新配置一下kernel,不能使用默认的驱动配置,否则会出现两种情况:
1) undefined reference to `kds_waitall'
添加CONFIG_DMA_SHARED_BUFFER关联选项就OK
2) 在openGL sdk demo运行的时候出现:
Error: eglGetError(): 12289 (0x3001)
Error: Failed to initialize EGL at ../../../../samples/opengles_30/skybox/EGLRuntime.cpp:243
同时内核会打印:
:Platform data not specified
查看kernel源码,找到相应配置,添加:MALI_PLATFORM_FAKE 配置。
)
The compiled mali module is located at drivers/gpu/arm/midgard/. Copy
mali_kbase.ko to your board:
╭────
│ scp drivers/gpu/arm/midgard/mali_kbase.ko root@BOARD_IP:/system/lib/modules/
╰────
(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:
╭────
│ cat /path/to/mali-t76x_r5p0-06rel0_linux_1+fbdev.tar.gz \
│ | ssh root@BOARD_IP tar --strip-components=1 -xzf - -C /usr/lib
╰────
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).
╭────
│ 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
╰────
Set 32bit framebuffer
─────────────────────
Before running demos, the fbdev should be in 32 bit mode.
Run following commands on the board:
╭────
│ 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
╰────
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:
╭────
│ sudo -i
│ cd bin_arm/opengles_30/skybox
│ ./skybox
╰────
Enjoy!
Video
──────
在设置32bit位深以后,输出的显示效果不好,花屏的问题,等我接下来解决了跟大家分享。
参考论坛:Mali kernel driver TX011-SW-99002-r5p1-00rel0 for firefly的更多相关文章
- VirtualBox,Kernel driver not installed (rc=-1908)
http://hi.baidu.com/spt_form/item/316d6207b47b8ee03499020a VirtualBox,Kernel driver not installed (r ...
- CentOS VirtualBox启动虚拟及报错:VirtualBox error: Kernel driver not installed (rc=1908)
VirtualBox error: Kernel driver not installed (rc=1908) Hi all, Let me first say that this is my fin ...
- Ubuntu 升级VisualBox后无法启动 Kernel driver not installed (rc=-1908)
VisualBox之所以在Linux上比传统的VMware快得多,关键一点就是它和Linux内核的结合比较紧密,这也是开源的优点. 不过Linux内核更新很频繁,每次更新内核后启动VirtualBox ...
- virtualbox cannot access the kernel driver的解决办法
一位网友windows xp sp3下安装virtualbox 4.1.20版本,安装好了重启过后,可以打开virtualbox,但是等到创建好虚拟电脑后按启动按钮,就出现了错误提示:"Ca ...
- Fedora安装VirtualBox时出现错误Kernel driver not installed (rc=-1908)的解决办法
新建虚拟机后启动时出现如下错误: Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver (vboxdrv) ...
- How To Upgrade ASMLib Kernel Driver as Part of Kernel Upgrade? (文档 ID 1391807.1)
How To Upgrade ASMLib Kernel Driver as Part of Kernel Upgrade? (文档 ID 1391807.1)
- ubuntu中使用virtualbox遇到Kernel driver not installed (rc=-1908)错误
百度之后得到解决,再此做个笔记 错误提示 Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver (vbox ...
- Android Camera 通过V4L2与kernel driver的完整交互过程
http://blog.chinaunix.net/uid-26215986-id-3552456.html 原文地址:Android Camera 通过V4L2与kernel driver的完整交互 ...
- Ubuntu 14 中 VirtualBox发生错误Kernel driver not installed (rc=-1908)
宿主系统是Ubuntu 14,在VirtualBox中安装 CentOS 6.5 时,提示如下错误: Kernel driver not installed (rc=-1908) 网友提供的解决方案: ...
随机推荐
- 《转》冯森林:手机淘宝中的那些Web技术(2014年)
Native APP与Web APP的技术融合已经逐渐成为一种趋势,使用标准的Web技术来开发应用中的某些功能,不仅可以降低开发成本,同时还可以方便的进行功能迭代更新.但是如何保证Web APP的流畅 ...
- iOS开发之按钮的基本使用
实现功能: 点击向上的箭头,按钮图片向上,移动,点击向下的箭头,按钮图片向下移动 点击向左的箭头,按钮图片向左移动,点击向右的箭头,按钮图片向右移动, 点击加号图片放大,点击减号,图片缩小 第一步: ...
- CORS跨域、Cookie传递SessionID实现单点登录后的权限认证的移动端兼容性测试报告
简述 本文仅记录如标题所述场景的测试所得,由于场景有些特殊,且并不需兼容所有浏览器,所以本文的内容对读者也许并无作用,仅为记录. 场景.与实现 需在移动端单点登录 需在移动端跨域访问我们的服务 基于历 ...
- Python(一)之Python概述
前言:最近学习Python基础,网上找了视频教程,本篇记录下Python概况,学习环境Python2.6. 学习Python首先得会获取Python自带的帮助信息,下面几个实用的内置函数,不管是工作或 ...
- pual_bot 天气插件编写
最近在玩pual_bot,感觉很不错,最近天气插件失效了,就结合百度api重新写了一个,也提交了. https://github.com/coldnight/pual_bot #!/usr/bin/e ...
- 使用jquery的$.ajax向服务端传递中文,避免乱码的解决办法!
在js里,对中文使用下面的方法 encodeURIComponent(var) 函数 就ok了!
- TCP/IP协议层
除了少数外,OSI协议簇本身已经成为Internet历史早期的遗留产物.当前OSI协议对于网络技术的贡献看来主要是对学习网络的学生讲述模块化的协议簇时,可以引用它的参考模型进行说明等的有限用途. 下面 ...
- 学习MongoDB(二) Replica Set集群配置
1.官方网址:https://docs.mongodb.org/manual/tutorial/deploy-replica-set-for-testing/ 2.Replica Set介绍: htt ...
- opencv 中affine函数实现旋转和平移
图像旋转和平移是图像处理中常用的一种操作,opencv2和opencv3中对图像的旋转和平移都是通过仿射变换函数cv::warpAffine()来实现的. 1.图像的旋转 图像的旋转具体实现分为两步: ...
- Swing获取字符串的宽度和高度
import java.awt.Color; import java.awt.Font; import java.awt.font.FontRenderContext; import java.awt ...