您尚未登录。

楼主 # 2024-01-01 17:10:42

limuxinn
会员
注册时间: 2024-01-01
已发帖子: 4
积分: 35

RUN AWTK DEMO &F1C200S &Linux mangopi-r3 5.4.99

准备工作
获取源码
以下两者并列放在同一个目录,如果用户有自己的项目,也建议与以下两者并列放在同一目录。

git clone https://github.com/zlgopen/awtk.git
git clone https://github.com/zlgopen/awtk-linux-fb.git
cd awtk-linux-fb

配置 scons 交叉编译工具链,在 awtk-linux-fb 目录创建 awtk_config_define.py 文件

# 改写awtk_config_define.py里的定义:
TOOLS_PREFIX = "填写自己的交叉编译器的路径,只填写gcc之前的"

例如:
完成交叉编译器的路径:
/home/***/buildroot-tiny200/output/host/bin/arm-linux-gcc
只需要填写以下内容:
/home/***/buildroot-tiny200/output/host/bin/arm-linux-

TSLIB_LIB_DIR = '/usr/lib'  #因为使用了内核集成的TSLIB库,所以直接写库文件所在路径
TSLIB_INC_DIR ='/usr/lib'  #因为使用了内核集成的TSLIB库,所以直接写库文件所在路径



# ls /usr/lib
libMemAdapter.so                libmediastreamer_base.so.7
libVE.so                        libmediastreamer_base.so.7.0.0
libawavs.so                     libmediastreamer_voip.so
libawh264.so                    libmediastreamer_voip.so.7
libawh265.so                    libmediastreamer_voip.so.7.0.0
libawmjpeg.so                   libortp.so
libawmjpegplus.so               libortp.so.11
libawmpeg2.so                   libortp.so.11.0.0
libawmpeg4base.so               libpng.so
libawmpeg4dx.so                 libpng16.so
libawmpeg4h263.so               libpng16.so.16
libawmpeg4normal.so             libpng16.so.16.37.0
libawmpeg4vp6.so                libstdc++.so
libawvp8.so                     libstdc++.so.6
libawvp9Hw.so                   libstdc++.so.6.0.24
libawwmv3.so                    libstdc++.so.6.0.24-gdb.py
libbctoolbox.so                 libtinyalsa.so
libbctoolbox.so.0               libtinyalsa.so.1
libblkid.so                     libtinyalsa.so.1.1.1
libcamera                       libts.so
libcamera.so                    libts.so.0
libcdc_base.so                  libts.so.0.10.3
libdrm.so                       libudev.so
libdrm.so.2                     libuuid.so
libdrm.so.2.4.0                 libv4l
libdvbv5.so                     libv4l1.so
libdvbv5.so.0                   libv4l1.so.0
libdvbv5.so.0.0.0               libv4l1.so.0.0.0
libfreetype.so                  libv4l2.so
libfreetype.so.6                libv4l2.so.0
libfreetype.so.6.17.1           libv4l2.so.0.0.0
libgd.so                        libv4l2rds.so
libgd.so.3                      libv4l2rds.so.0
libgd.so.3.0.5                  libv4l2rds.so.0.0.0
libhavege.so                    libv4lconvert.so
libhavege.so.1                  libv4lconvert.so.0
libhavege.so.1.1.0              libv4lconvert.so.0.0.0
libid3tag.so                    libvdecoder.so
libid3tag.so.0                  libvencoder.so
libid3tag.so.0.3.0              libvideoengine.so
libjpeg.so                      libx264.so
libjpeg.so.9                    libx264.so.157
libjpeg.so.9.4.0                libyuv.so
libkmod.so                      libz.so
libkmod.so.2                    libz.so.1
libkmod.so.2.3.4                libz.so.1.2.11
libkms.so                       mediastreamer
libkms.so.1                     os-release
libkms.so.1.0.0                 ts
libmad.so                       udev
libmad.so.0                     v4l1compat.so
libmad.so.0.2.1                 v4l2convert.so
libmediastreamer_base.so


详情可以看 scons help,或者可以通过 scons EXPORT_DEFINE_FILE=./awtk_config_define.py 导出一个完整的 awtk_config_define.py 文件。

生成并部署AWTK内置DemoUI

请先安装 scons,并完成上面的准备工作

在命令行输入(以下命令全部在awtk-linux-fb文件夹下执行):
cd /home/user/awtk-linux-fb
scons
等待编译成功,生成发布压缩包,在命令行输入:
sh ./release.sh
等待发布完成后,在 awtk-linux-fb 目录下会出现 release.tar.gz 的压缩包,该压缩包就是发布包
运行
把 release.tar.gz (发布包,大概20M)上传到开发板,并解压,然后运行:

# 程序运行可能要依赖awtk的so文件,如运行失败请尝试设置so文件的绝对路径
# export LD_LIBRARY_PATH=/path/to/bin

开权限:chmod 777 release/bin/demoui
执行层序:./release/bin/demoui

离线

楼主 #1 2024-01-01 17:11:54

limuxinn
会员
注册时间: 2024-01-01
已发帖子: 4
积分: 35

Re: RUN AWTK DEMO &F1C200S &Linux mangopi-r3 5.4.99

程序启动过程:
# ./release/bin/demoui &
# try /root
try set app_root:/root/res
try set app_root:/root/demos
try /root/release/bin
app_root=/root/release
devices_load : path = file:///root/release/config/devices.json
conf_doc_destroy:467 condition(doc != NULL) failed!
devices_load:46 condition(conf != NULL) failed!
Devices load fail! Used default.
devices[0]: path = /dev/fb0, type = fb
devices[1]: path = /dev/dri/card0, type = drm
devices[2]: path = /dev/input/event0, type = ts
devices[3]: path = /dev/input/event1, type = input
devices[4]: path = /dev/input/mouse0, type = mouse
using card '/dev/dri/card0'
modeset_open return 0
mode for connector 49 is 800x480
mode for connector 51 is 720x576
cannot find suitable CRTC for connector 51
no valid crtc for connector 51
modeset_prepare return 0
use dev 0x251c70 w=800 h=480
ratio=1.000000 800 480
ratio=1.000000 800 480
Build at: Jan  1 2024 15:03:03
unload image cursor
input_run:406: open keyboard failed, fd=-1, filename=/dev/input/event1
tslib_run:121: open tslib successful, filename=/dev/input/event0
input_run:275: open mouse failed, fd=-1, filename=/dev/input/mouse0
enter vpage: 0
window sysbar_landscape open
window menu_landscape open
window preload open
ignore_user_input
tslib_dispatch_one_event97: e.pressure=3823 x=190 y=145 ret=1
ts[/dev/input/event0] pointer down:190 145
tslib_dispatch_one_event97: e.pressure=1794 x=73 y=153 ret=1
ts[/dev/input/event0] pointer move:73 153
tslib_dispatch_one_event97: e.pressure=1892 x=73 y=154 ret=1
ts[/dev/input/event0] pointer move:73 154
tslib_dispatch_one_event97: e.pressure=1955 x=74 y=154 ret=1
ts[/dev/input/event0] pointer move:74 154
tslib_dispatch_one_event97: e.pressure=1964 x=74 y=153 ret=1
ts[/dev/input/event0] pointer move:74 153
tslib_dispatch_one_event97: e.pressure=2007 x=74 y=154 ret=1
ts[/dev/input/event0] pointer move:74 154
tslib_dispatch_one_event97: e.pressure=1726 x=74 y=153 ret=1
ts[/dev/input/event0] pointer move:74 153
tslib_dispatch_one_event97: e.pressure=0 x=74 y=152 ret=1
ts[/dev/input/event0] pointer up:74 152
tslib_dispatch_one_event97: e.pressure=1125 x=62 y=227 ret=1
ts[/dev/input/event0] pointer down:62 227
tslib_dispatch_one_event97: e.pressure=0 x=62 y=227 ret=1
ts[/dev/input/event0] pointer up:62 227
enter vpage: 4
leave vpage: 0
tslib_dispatch_one_event97: e.pressure=19 x=108 y=322 ret=1
ts[/dev/input/event0] pointer down:108 322
tslib_dispatch_one_event97: e.pressure=0 x=108 y=322 ret=1
ts[/dev/input/event0] pointer up:108 322
tslib_dispatch_one_event97: e.pressure=950 x=148 y=333 ret=1
ts[/dev/input/event0] pointer down:148 333
tslib_dispatch_one_event97: e.pressure=1054 x=66 y=324 ret=1
ts[/dev/input/event0] pointer move:66 324
tslib_dispatch_one_event97: e.pressure=0 x=66 y=324 ret=1
ts[/dev/input/event0] pointer up:66 324
tslib_dispatch_one_event97: e.pressure=379 x=84 y=282 ret=1
ts[/dev/input/event0] pointer down:84 282
tslib_dispatch_one_event97: e.pressure=789 x=78 y=278 ret=1
ts[/dev/input/event0] pointer move:78 278
enter vpage: 6
leave vpage: 4
tslib_dispatch_one_event97: e.pressure=1074 x=77 y=273 ret=1
ts[/dev/input/event0] pointer move:77 273
tslib_dispatch_one_event97: e.pressure=1153 x=77 y=270 ret=1
ts[/dev/input/event0] pointer move:77 270
tslib_dispatch_one_event97: e.pressure=1200 x=76 y=261 ret=1
ts[/dev/input/event0] pointer move:76 261
tslib_dispatch_one_event97: e.pressure=1354 x=76 y=254 ret=1
ts[/dev/input/event0] pointer move:76 254
tslib_dispatch_one_event97: e.pressure=1202 x=76 y=249 ret=1
ts[/dev/input/event0] pointer move:76 249
tslib_dispatch_one_event97: e.pressure=0 x=76 y=243 ret=1
ts[/dev/input/event0] pointer up:76 243
tslib_dispatch_one_event97: e.pressure=1522 x=127 y=363 ret=1
ts[/dev/input/event0] pointer down:127 363
tslib_dispatch_one_event97: e.pressure=2181 x=62 y=364 ret=1
ts[/dev/input/event0] pointer move:62 364
tslib_dispatch_one_event97: e.pressure=2281 x=62 y=365 ret=1
ts[/dev/input/event0] pointer move:62 365
tslib_dispatch_one_event97: e.pressure=2307 x=62 y=365 ret=1
ts[/dev/input/event0] pointer move:62 365
tslib_dispatch_one_event97: e.pressure=2329 x=62 y=365 ret=1
ts[/dev/input/event0] pointer move:62 365
tslib_dispatch_one_event97: e.pressure=2357 x=63 y=365 ret=1
ts[/dev/input/event0] pointer move:63 365
tslib_dispatch_one_event97: e.pressure=2327 x=63 y=366 ret=1
ts[/dev/input/event0] pointer move:63 366
tslib_dispatch_one_event97: e.pressure=0 x=63 y=367 ret=1
ts[/dev/input/event0] pointer up:63 367
enter vpage: 7
leave vpage: 6
tslib_dispatch_one_event97: e.pressure=1702 x=262 y=359 ret=1
ts[/dev/input/event0] pointer down:262 359
tslib_dispatch_one_event97: e.pressure=1803 x=263 y=359 ret=1
ts[/dev/input/event0] pointer move:263 359
tslib_dispatch_one_event97: e.pressure=1716 x=263 y=359 ret=1
ts[/dev/input/event0] pointer move:263 359
tslib_dispatch_one_event97: e.pressure=0 x=264 y=359 ret=1
ts[/dev/input/event0] pointer up:264 359
tslib_dispatch_one_event97: e.pressure=1845 x=226 y=366 ret=1
ts[/dev/input/event0] pointer down:226 366
tslib_dispatch_one_event97: e.pressure=1774 x=228 y=366 ret=1
ts[/dev/input/event0] pointer move:228 366
tslib_dispatch_one_event97: e.pressure=1777 x=229 y=366 ret=1
ts[/dev/input/event0] pointer move:229 366
tslib_dispatch_one_event97: e.pressure=0 x=230 y=367 ret=1
ts[/dev/input/event0] pointer up:230 367

离线

楼主 #2 2024-01-01 17:15:11

limuxinn
会员
注册时间: 2024-01-01
已发帖子: 4
积分: 35

Re: RUN AWTK DEMO &F1C200S &Linux mangopi-r3 5.4.99

_2024010117135.jpg_20240101170752.jpg

运行后的界面

最近编辑记录 limuxinn (2024-01-01 17:19:15)

离线

楼主 #3 2024-01-01 17:16:55

limuxinn
会员
注册时间: 2024-01-01
已发帖子: 4
积分: 35

Re: RUN AWTK DEMO &F1C200S &Linux mangopi-r3 5.4.99

演示视频

离线

#4 2024-01-01 17:55:24

lixianjing
会员
注册时间: 2019-04-25
已发帖子: 105
积分: 101.5

Re: RUN AWTK DEMO &F1C200S &Linux mangopi-r3 5.4.99

谢谢支持,前段时间还有人在问,如何在全智的芯片跑 AWTK 呢

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn