Daily Archives: 2018-12-22

VoCore2: Port Qt

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/
 endef
 
 define Package/qt5-concurrent/install

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:

1. Qt support DRM but not framebuffer anymore, need to check linuxfb plugin for Qt5.
2. My framebuffer driver has bug, that block the demo runs on the screen.
3. 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)
4. 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