Skip to content

Conversation

@dchordia
Copy link
Contributor

Hi,
This contribution adds cross-compilation support for QNX operating system to libmetal.

Motivation

QNX is an industry standard real-time operating system for embedded systems, particularly for vehicles, featuring safety focused features. It has also recently been made free for non-commercial use through the QNX Everywhere program, aiming for students, researchers and hobbyists to experiment with the OS.

Given than open-amp is a useful library for supporting AMP in various master slave configurations, it would be great to enable it to run natively on free version of QNX OS.

Description of changes

  • Change clashing CACHE_FLUSH definition for QNX compilations

How to build for QNX

The build files and instructions for cross-compiling open-amp for QNX are present at qnx-ports. A free QNX8 license can be obtained here.

By submitting this pull request, I confirm that my contribution is made under the terms of BSD License

@arnopo
Copy link
Collaborator

arnopo commented Oct 14, 2025

Hello @dchordia,
The open-amp lib should be OS agnostic. Instead of adding specific code for QNX, could we simply remove the CACHE_FLUSH and CACHE_INVALIDATE macro, replacing them by metal_cache_flush and metal_cache_invalidate?

@dchordia
Copy link
Contributor Author

Sure, I have removed the two macros and replaced their instances with metal_cache_flush and metal_cache_invalidate functions. Note: CACHE_FLUSH is the only conflicting macro with internal QNX definition (ref) but I removed CACHE_INVALIDATE based on your feedback and for consistency

@iuliana-prodan
Copy link
Contributor

Sure, I have removed the two macros and replaced their instances with metal_cache_flush and metal_cache_invalidate functions. Note: CACHE_FLUSH is the only conflicting macro with internal QNX definition (ref) but I removed CACHE_INVALIDATE based on your feedback and for consistency

In this case, patch 1 can be removed from this pull request.
Second patch should be enough.

@dchordia
Copy link
Contributor Author

I have removed it. Also, checks / checkpatch review was failing due to non compliant commit message. Changed and force pushed correct format

@arnopo
Copy link
Collaborator

arnopo commented Oct 14, 2025

I have removed it. Also, checks / checkpatch review was failing due to non compliant commit message. Changed and force pushed correct format

Please squash your two commits into one and update the commit message accordingly.

@arnopo arnopo added this to the Release V2025.10 milestone Oct 14, 2025
- removes CACHE_FLUSH macro clashing with internal QNX definition
- also removes CACHE_INVALIDATE macro for consistency

Signed-off-by: Deep Chordia <dchordia@blackberry.com>
Copy link
Contributor

@iuliana-prodan iuliana-prodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnmysh tnmysh self-requested a review October 16, 2025 16:23
Copy link
Collaborator

@tnmysh tnmysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@arnopo arnopo merged commit b42e844 into OpenAMP:main Oct 17, 2025
4 of 6 checks passed
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

Successfully merging this pull request may close these issues.

4 participants