GithubHelp home page GithubHelp logo

tsinglee0906 / awtk-linux-fb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zlgopen/awtk-linux-fb

0.0 1.0 0.0 710 KB

awtk port for linux framebuffer

License: GNU Lesser General Public License v2.1

Python 10.67% C 84.46% Shell 3.43% C++ 1.44%

awtk-linux-fb's Introduction

AWTK针对arm-linux平台的移植。

AWTK是为嵌入式系统开发的GUI引擎库。

awtk-linux-fb是AWTK在arm-linux上的移植。

本项目以ZLG周立功 linux开发套件 AWork平台iMX287A 入门级ARM9开发板 为载体移植,其它开发板可能要做些修改,有问题请请创建issue。

使用方法

  • 1.获取源码
git clone https://github.com/zlgopen/awtk.git
git clone https://github.com/zlgopen/awtk-examples.git
git clone https://github.com/zlgopen/awtk-linux-fb.git
cd awtk-linux-fb
  • 2.编辑 awtk_config.py 设置工具链的路径
TSLIB_LIB_DIR='/opt/28x/tslib/lib'
TSLIB_INC_DIR='/opt/28x/tslib/include'
TOOLS_PREFIX='/opt/28x/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-linux-'
  • 3.编辑 awtk-port/main_loop_linux.c 修改输入设备的文件名
#define FB_DEVICE_FILENAME "/dev/fb0"
#define TS_DEVICE_FILENAME "/dev/input/event0"
#define KB_DEVICE_FILENAME "/dev/input/event1"
  • 4.编译(请先安装scons)

生成内置 demoui 例子,生成结果在 build/bin 文件夹下的 demoui 文件

scons

也可以指定生成其他 Demo,生成结果在 build/bin 文件夹下的 demo 文件

scons APP=../awtk-examples/HelloWorld-Demo
  • 5.生成发布包

对于内置的 demoui 例子

./release.sh

对于其他 Demo,需要加入资源文件夹参数,指向应用程序 assets 的父目录

./release.sh ../awtk-examples/HelloWorld-Demo/res
./release.sh ../awtk-examples/Chart-Demo/res_800_480
  • 6.运行

把 release.tar.gz 上传到开发板,并解压,然后运行:

./release/bin/demoui
./release/bin/demo

其他问题

修改项目路径

默认情况下,scons 脚本假设以下文件夹在同一个目录

zlgopen
  |-- awtk
  |-- awtk-examples
  |-- awtk-linux-fb

如果实际存放的路径与默认不同,则需要修改以下 awtk-linux-fb/SConstruct 代码,例如:

TK_ROOT = joinPath(os.getcwd(), '../awtk')
APP_ROOT=joinPath(os.getcwd(), '../awtk-examples/HelloWorld-Demo')

awtk-linux-fb's People

Contributors

xianjimli avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.