页次: 1
可以了晕哥再次感谢晕哥的帮助,awtk已经可以在v3s上运行了,按晕哥的方式修改了
TSLIB_LIB_DIR='output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/'
TSLIB_INC_DIR='output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/'
TOOLS_PREFIX='output/host/bin/arm-linux-'
然后在awtk-linux-fb目录下运行 scons 指令就可以交叉编译了。
然后运行 .sh ./release.sh 就可以打包获得 release.tar.gz
然后就可以解压 tar -zxvf release.tar.gz 得到 release
把release考到荔枝zero上就可以运行了
这是AWTK在linux平台下的说明文档
# AWTK针对arm-linux平台的移植。
[AWTK](https://github.com/zlgopen/awtk)是为嵌入式系统开发的GUI引擎库。
[awtk-linux-fb](https://github.com/zlgopen/awtk-linux-fb)是AWTK在arm-linux上的移植。
本项目以[ZLG周立功 linux开发套件 AWork平台iMX287A 入门级ARM9开发板](https://item.taobao.com/item.htm?spm=a230r.1.14.1.29c8b3f8qxjYf7&id=536334628394&ns=1&abbucket=17#detail) 为载体移植,其它开发板可能要做些修改,有问题请请创建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 例子
```
sh ./release.sh
```
对于其他 Demo,需要加入资源文件夹参数,指向应用程序 assets 的父目录
```
sh ./release.sh ../awtk-examples/HelloWorld-Demo/res demo
sh ./release.sh ../awtk-examples/Chart-Demo/res_800_480 demo
```
* 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')
```
所以按照文档来说我看应该需要改步骤2的三句话
* 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-'
```
./output/build/qt5base-5.9.1/src/plugins/generic/tslib
./output/build/qt5base-5.9.1/src/plugins/generic/tslib/tslib.pro
./output/build/qt5base-5.9.1/src/plugins/generic/tslib/tslib.json
./output/build/qt5base-5.9.1/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
./output/build/qt5base-5.9.1/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h
./output/build/qt5base-5.9.1/src/platformsupport/input/.obj/moc_qtslib_p.o
./output/build/qt5base-5.9.1/src/platformsupport/input/.obj/qtslib.o
./output/build/qt5base-5.9.1/src/platformsupport/input/tslib
./output/build/qt5base-5.9.1/src/platformsupport/input/tslib/qtslib_p.h
./output/build/qt5base-5.9.1/src/platformsupport/input/tslib/qtslib.cpp
./output/build/qt5base-5.9.1/src/platformsupport/input/tslib/tslib.pri
./output/build/qt5base-5.9.1/src/platformsupport/input/.moc/moc_qtslib_p.cpp
./output/build/qt5base-5.9.1/include/QtInputSupport/5.9.1/QtInputSupport/private/qtslib_p.h
./output/build/qt5base-5.9.1/plugins/generic/libqtslibplugin.so
./output/build/qt5base-5.9.1/config.tests/unix/tslib
./output/build/qt5base-5.9.1/config.tests/unix/tslib/tslib
./output/build/qt5base-5.9.1/config.tests/unix/tslib/tslib.pro
./output/build/qt5base-5.9.1/config.tests/unix/tslib/tslib.cpp
./output/build/qt5base-5.9.1/config.tests/unix/tslib/tslib.o
./output/build/qt5base-5.9.1/mkspecs/modules-inst/qt_plugin_qtslibplugin.pri
./output/build/qt5base-5.9.1/mkspecs/modules/qt_plugin_qtslibplugin.pri
./output/build/tslib-1.11
./output/build/tslib-1.11/src/tslib-private.h
./output/build/tslib-1.11/src/tslib.h
./output/build/tslib-1.11/src/tslib-filter.h
./output/build/tslib-1.11/tslib.pc
./output/build/tslib-1.11/m4/internal/tslib_modules.m4
./output/build/tslib-1.11/tslib.pc.in
./output/build/buildroot-config/br2/package/tslib.h
./output/build/buildroot-config/br2/package/qt5base/tslib.h
./output/target/usr/lib/qt/plugins/generic/libqtslibplugin.so
./output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/tslib.h
./output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtInputSupport/5.9.1/QtInputSupport/private/qtslib_p.h
./output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/qt/plugins/generic/libqtslibplugin.so
./output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/pkgconfig/tslib.pc
./dl/tslib-1.11.tar.xz
./package/tslib
./package/tslib/tslib.hash
./package/tslib/tslib.mk
./package/x11r7/xdriver_xf86-input-tslib
./package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk
./package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash
./package/python-rtslib-fb
./package/python-rtslib-fb/python-rtslib-fb.hash
./package/python-rtslib-fb/python-rtslib-fb.mk
root@ubuntu:/home/fanyunzi/buildroot-2017.08.1#
这些是我在buildroot中搜索tslib 执行的find ./ -name *tslib*找到的结果不知道哪个是编译好的,因为awtk指定的tslib路径是是要求编译好的
TSLIB_LIB_DIR='/opt/28x/tslib/lib'
TSLIB_INC_DIR='/opt/28x/tslib/include'
TOOLS_PREFIX='/opt/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-'
#TOOLS_PREFIX='/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-'
现在需要指向tslib库不知道目录怎么查找
我也遇到这个问题了,我用的是sun8i-v3s-licheepi-zero-with-480x272-lcd.dtb这个设备树
0.150884] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 34, base_baud = 1500000) is a U6_16550A
[ 0.738525] console [ttyS0] enabled
[ 0.743241] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE0
[ 0.750993] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE1
[ 0.758669] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE2
[ 0.766333] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE3
[ 0.773981] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE4
[ 0.781641] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE5
[ 0.789303] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE6
[ 0.796962] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE7
[ 0.804609] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE8
[ 0.812269] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE9
[ 0.819929] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE10
[ 0.827677] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE11
[ 0.835422] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE12
[ 0.843158] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE13
[ 0.850904] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE14
[ 0.858651] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE15
[ 0.866397] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE16
[ 0.874132] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE17
[ 0.881879] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE18
[ 0.889625] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE19
[ 0.897372] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE23
[ 0.905108] sun8i-v3s-pinctrl 1c20800.pinctrl: unsupported function lcd0 on pin PE24
[ 0.914351] panel-simple panel: panel supply power not found, using dummy regulator
git clone https://github.com/Lichee-Pi/linux.git -b zero-4.13.y 这条指令下载4.13y文件6个多G正常吗?
页次: 1