Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行官方的demoui可以进入函数main_loop_init,编译运行自己的项目却没有进入 #103

Open
zyafly opened this issue Jul 25, 2023 · 0 comments

Comments

@zyafly
Copy link

zyafly commented Jul 25, 2023

我用的是Ubuntu18.04,平台是全志R528-s3

1.在“awtk-linux-fb/awtk-port/main_loop_linux.c”加入以下打印信息:

`main_loop_t* main_loop_init(int w, int h) {
main_loop_simple_t* loop = NULL;

log_debug("\n++++++++++12213132132313+++++++\n");
#ifdef WITH_LINUX_EGL
lcd_egl_context_t* lcd = lcd_linux_egl_create(FB_DEVICE_FILENAME);
#elif WITH_LINUX_DRM
lcd_t* lcd = lcd_linux_drm_create(DRM_DEVICE_FILENAME);
#else
lcd_t* lcd = lcd_linux_fb_create(FB_DEVICE_FILENAME);
#endif

return_value_if_fail(lcd != NULL, NULL);

#ifdef WITH_LINUX_EGL
#else
native_window_raw_init(lcd);
#endif

loop = main_loop_simple_init(lcd->w, lcd->h, NULL, NULL);
loop->base.destroy = main_loop_linux_destroy;

#ifdef HAS_TSLIB

s_ts_thread =
tslib_thread_run(TS_DEVICE_FILENAME, input_dispatch_to_main_loop, loop, lcd->w, lcd->h);
#endif /HAS_TSLIB/
log_debug("\n+++++++++++++++++\n");
s_kb_thread =
input_thread_run(KB_DEVICE_FILENAME, input_dispatch_to_main_loop, loop, lcd->w, lcd->h);
s_mice_thread =
mouse_thread_run(MICE_DEVICE_FILENAME, input_dispatch_to_main_loop, loop, lcd->w, lcd->h);
log_debug("\n---------------------------\n");

atexit(on_app_exit);

return (main_loop_t*)loop;
} 2.按移植流程,在“awtk-linux-fb”文件夹中执行“scons”->"sh ./release.sh"->拷到开发板解压->运行"./release/bin/demoui",可以打印以下信息 ++++++++++12213132132313+++++++
fb_info_t: /dev/fb0
xres=320 yres=480
xres_virtual=320 yres_virtual=960
bits_per_pixel=32 line_length=1280
fb_info_t: red(16 8) green(8 8) blue(0 8)
xpanstep=1 ywrapstep=0
fb_size=614400 fb_total_size=1228800 fb_nr=2 smem_len=1228800
fb_open clear
fb_open ok
sh: dmidecode: not found
=========fb_number=2
ratio=1.000000 320 480
ratio=1.000000 320 480

+++++++++++++++++
tslib_run:116: open tslib successful, filename=/dev/input/event2
input_run:313: open keyboard successful, fd=7, filename=/dev/input/event1


3.我编译自己的项目,在“awtk-linux-fb”文件夹中执行“scons APP=../user_apps/awtkdemo2`”->"./release.sh ../user_apps/awtkdemo2/res demo"->拷到开发板解压->运行"./release/bin/demo",可以打印以下信息

fb_open clear fb_open ok sh: dmidecode: not found =========fb_number=2 ratio=1.000000 320 480 ratio=1.000000 320 480 input_run:313: open keyboard successful, fd=5, filename=/dev/input/event1 input_run:255: open mouse failed, fd=-1, filename= Build at: Jul 24 2023 17:30:22 fps=30.000000 duration=2.500000 w=1024 h=1024 n=76 window home_page open
请问是我哪里搞错了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant