Merged
Conversation
Initial version to test 64 bit compatibility.
Instead of a separate board, the inital version for Linux/x86_64 is enabled
by setting the environment variable `NATIVE_64BIT=y` and compiling as usual.
Not currently implemented:
* Architectures other than x86_64 or operating systems other than Linux
* No FreeBSD support
* No Aarch support
* Rust support for x86_64
benpicco
reviewed
Jan 30, 2024
| NATIVEINCLUDES += -I$(RIOTBASE)/drivers/include/ | ||
|
|
||
| # Set "NATIVE_64BIT=1" to compile for x86_64 | ||
| NATIVE_64BIT ?= 0 |
Contributor
There was a problem hiding this comment.
Can we have a native64 board that will just set this and otherwise include the native board (see e.g. openlabs-kw41z-mini-256kib).
Otherwise this won't be exercised by CI.
Contributor
Author
There was a problem hiding this comment.
Probably yes, but there are a lot of additional changes needed outside the boards folder to make it work.
For example, the codebase has a lot of checks like ifeq (native, $(BOARD)) that would need to be adapted.
I have a WIP branch that is not yet finished, but it shows the extent of the changes needed WIP: native64 board.
(This one moves most of the native board into a common folder instead of the way it is handled with openlabs-kw41z-mini-256kib).
benpicco
approved these changes
Feb 1, 2024
This was referenced Feb 5, 2024
chrysn
added a commit
to chrysn-pull-requests/riot-os.org
that referenced
this pull request
Mar 16, 2024
We now have 64bit support since RIOT-OS/RIOT#20315, so the FAQ item does not make sense any more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Native for Linux x86-64
For the initial version, instead of creating a separate
native64board, I decided to add the variableNATIVE_64BITto the native board Makefiles. Setting the environment toNATIVE_64BIT=1will enable 64-bit mode for native, which is disabled by default.While I don't necessarily think this is the best long-term solution, it does ensure that all tests run with the same configuration as the 32-bit version. A separate board would require a major refactoring of many tests, which often have different configurations in the Makefile, C code, and Python tests if the board is native, and I didn't want to increase the size of an already large pull request.
Almost all of the same features as the 32-bit version are supported by the 64-bit version, but the following are still missing
- No FreeBSD support
- No Aarch64 support
This PR is a suggestion for initial 64-bit support, feel free to suggest any changes.
Testing procedure
Just set the
NATIVE_64BIT=1environment variable and compile something for native.For example
NATIVE_64BIT=1 ./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . nativeNOTE:
NATIVE_64BIT=1will skip the unsupported Rust examples and tests. Other than that, nothing else should be skipped.NATIVE_64BIT=1.Issues/PRs references
See also