Prerequisites:
- A working toolchain for your ARM target.
- A system rootfs with headers etc on your build host.
- The 5.3.2 distribution of Qt
- Extract the Qt source archive.
- Please read the generic build instructions at qt.io and configure the sources for "linux-arm-g++". *hint* use the -sysroot argument to point to your rootfs. You will also need to add -no-xcb and -qpa linuxfb.
- Build Qt (make)
- Test Qt on your target with a simple widget application for example wiggly.
- If the test fails, check that your /dev/fb0 is working and go thru the configure step again. Once you have your Qt working move on to next step.
- Clone Qt Declarative 2d into your top Qt source tree. ( git clone -b asm https://github.com/mgrunditz/qtdeclarative-2d.git )
- Enter the resulting directory and run qmake from your build tree ( ../qtbase/bin/qmake )
- Build it with make.
- Modify src/quick/items/qquickitem.cpp to your target screeen resolution.
- Modify src/quick/items/alphablender.S to match your screenwidth*4. *hint* check the comments.
- Redo make.
- make install
- Once you have your new binaries on your target it is time for some testing. You should have a program "qml" in your $prefix/$qt/bin directory. Do a simple hello world qml script and run it with the qml program.
- You might have problems with missing components. Check that your build includes imports, and tools.
- If your "Hello World" works you are ready to try out more complex applications.
Problems and bugs:
The most important issue is that Quick2 assumes that you can have larger window than your screen. I have tried to handle this in qquickitem.cpp and I have it semi working with 720p but it still crashes sometimes. Obviously it doesn't crash if your application stays inside your screen resolution.
The screen dimensions can be fetched from the qquickswindow object. Keep in mind that it is my variables you want to use, screenwidth screenheight.
The rest is a pure math exercise.
If you have any questions you can always email me at michael.grunditz@prevas.se.
Thank you for reading this far and on from all of us at:
Good luck!
1 comment:
There is no need to change alphablender.S anymore , it fetches its stride from window()->screenheight.
Post a Comment