Porting Qt for Embedded Linux to a New Architecture

When porting Qt for Embedded Linux to a new architecture there are several issues to be aware of: You must provide suitable hardware drivers, and you must ensure to implement platform dependent atomic operations to enable multithreading on the new architecture.

Hardware Drivers

When running a Qt for Embedded Linux application, it either runs as a server or connects to an existing server. All system generated events, including keyboard and mouse events, are passed to the server application which then propagates the event to the appropriate client. When rendering, the default behavior is for each client to render its widgets into memory while the server is responsible for putting the contents of the memory onto the screen.

The various hardware drivers are loaded by the server application when it starts running, using Qt's plugin system.

Derive from the QWSMouseHandler, QWSKeyboardHandler and QScreen classes to create a custom mouse, keyboard and screen driver respectively. To load the drivers into the server application at runtime, you must also create corresponding plugins. See the following documentation for more details:

Atomic Operations

Qt uses an optimization called implicit sharing for many of its value classes; implicitly shared classes can safely be copied across threads. This technology is implemented using atomic operations; i.e., Qt for Embedded Linux requires that platform-specific atomic operations are implemented to support Linux.

When porting Qt for Embedded Linux to a new architecture, it is important to ensure that the platform-specific atomic operations are implemented in a corresponding header file, and that this file is located in Qt's src/corelib/arch directory.

See the atomic operations documentation for more details.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.