blog from : http://vonger.cn/?p=14588
Now we have screen So I’d like to port Qt. Thanks to pawelkn, https://github.com/pawelkn/qt5-openwrt-package, this package works well, just need to add one line. I search google, this is because MIPS do not have 64bit atomic operation, so we need to use the library to simulate it.
@@ -171,6 +171,7 @@
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Core.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Core.prl $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/qtbase/lib/libQt5Core.la $(1)/usr/lib/
- $(CP) $(TOOLCHAIN_DIR)/lib/libatomic.so* $(1)/usr/lib/
Put this Makefile and other files to openwrt/package, then make menuconfig, in Library -> Qt5, select qt5-core, make V=s
Compile is smooth and take a long time…After upgrade, also make the example file and copy to VoCore2.
Like usual, it is not work at first time, the screen part only.
This is necessary: export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
We must use this command setup framebuffer device.
I do not know why it not work, possible reasons:
- Qt support DRM but not framebuffer anymore, need to check linuxfb plugin for Qt5.
- My framebuffer driver has bug, that block the demo runs on the screen.
- VoCore2 do not fast enough for Qt(this is not likely, because I can find it actually works, but just stopped at somewhere, looks like it is wait for some device ready)
- Other necessary device such as keyboard, mouse block the process.
From my first test, I guess Qt application bootup on VoCore2 is pretty fast. It takes around three seconds to start, just eat a lot of memory, demo consume around 22MB memory, maybe it can not work on vocore2 lite which free memory only around 30MB.
Also I port Qt5.11.3, here is the link: http://vonger.cn/misc/vocore2/qt5.11.3-openwrt.zip
Smooth Qt UI, at 30fps, WVGA.
I think it should be a good replace for UI devices who requires wifi or ethernet.
10K units for this solution price should be less than 15USD(screen + VoCore2)
Now I am porting a weather app on Qt to it, it should be good.