Skip to content

boards: rename native64 -> native #21100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

OlegHahm
Copy link
Member

Contribution description

This patch renames the current native board into native32 and replaces it with the current native64 board.

The changeset is mostly renaming directories and replacing native64 with native32 within application Makefiles (unless native64) was not supported.

It's only superficially tested so far. Let's see what the CI comes up with.

Testing procedure

Use your favorite RIOT application on native.

@github-actions github-actions bot added Platform: native Platform: This PR/issue effects the native platform Area: doc Area: Documentation Area: tests Area: tests and testing framework Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: build system Area: Build system Area: CI Area: Continuous Integration of RIOT components Area: tools Area: Supplementary tools Area: boards Area: Board ports Area: examples Area: Example Applications Area: Kconfig Area: Kconfig integration labels Dec 21, 2024
@kaspar030 kaspar030 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 21, 2024
@riot-ci
Copy link

riot-ci commented Dec 21, 2024

Murdock results

✔️ PASSED

5e08104 fixup! native: document new native default

Success Failures Total Runtime
148021 0 148021 01h:38m:28s

Artifacts

@OlegHahm OlegHahm force-pushed the pr/native64_as_default branch from 014321f to e4a8748 Compare December 21, 2024 00:50
@github-actions github-actions bot added the Area: sys Area: System label Dec 21, 2024
@miri64
Copy link
Member

miri64 commented Dec 21, 2024

Should we, while maybe more complicated, make the rename to native32 first, make a link to it as native (see e.g. feather-m0-lora for how to link a board variant) and then walk through our normal deprecation cycle for the relinking to native64? Or can we just assume that people want native64 ASAP and that native64 is stable enough by now to not cause any regressions?

@miri64
Copy link
Member

miri64 commented Dec 21, 2024

(maybe we should even integrate native64 into the release tests first)

@OlegHahm OlegHahm force-pushed the pr/native64_as_default branch 3 times, most recently from cf1eead to 7634654 Compare December 21, 2024 09:49
@OlegHahm
Copy link
Member Author

I think there is indeed no reason to rush it. Integrating it into the release tests, might be a good idea. But I don't get your proposal for the deprecation cycle. (Do we want to deprecated native 32 bit at all?)

@miri64
Copy link
Member

miri64 commented Dec 21, 2024

But I don't get your proposal for the deprecation cycle. (Do we want to deprecated native 32 bit at all?)

No, just the fact that native is native32, i.e., have native point to native32 and make a deprecation note, that it will point to native64 2 release cycles later.

@OlegHahm
Copy link
Member Author

Ah, understood. Not sure though whether this is necessary. After all native is most likely not used in production but rather for testing and debugging. It should work reliable, so extending the transition time is a good thing but we should make sure that more people are using the 64 bit variant during this transition time to check for its reliability.

@OlegHahm OlegHahm force-pushed the pr/native64_as_default branch from 7634654 to a37eeab Compare December 21, 2024 10:51
@OlegHahm
Copy link
Member Author

OlegHahm commented Feb 7, 2025

We should probably update the docs as well. (No need to tell the people to install a 32bit x86 toolchain anymore.)

@kaspar030
Copy link
Contributor

No need to tell the people to install a 32bit x86 toolchain anymore.

Alpine based CI containers!

Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

Looks quite straightforward enough, I trust you doing the right tree-wide search-and-replace. Can go in as soon as we've adapted the documentation for native and native64.

Updating the RIOT build dependencies can happen in a separate PR, I'd say.

@@ -28,7 +28,7 @@
#define ENABLE_DEBUG (0)
#include "debug.h"

#ifdef BOARD_NATIVE
#ifdef BOARD_NATIVE32
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#ifdef BOARD_NATIVE32
#if defined BOARD_NATIVE || defined BOARD_NATIVE32

maybe? (same in other places)

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess that makes sense here. In the tests I'm not sure - but since they work without an explicit #ifdef BOARD_NATIVE64 (or BOARD_NATIVE after the switch), they seem to require special handling for native32 only (for whatever reason).

Copy link
Contributor

@benpicco benpicco Feb 12, 2025

Choose a reason for hiding this comment

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

We also have CPU_NATIVE for that, which is set no matter what native 'board' is used.

@OlegHahm
Copy link
Member Author

Tried to address @mguetschow's comments. Thanks for the review.

mguetschow
mguetschow previously approved these changes Feb 12, 2025
Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

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

Thanks @OlegHahm! If no one objects, I'd say let's merge and fix things later if they come up.

- SPI: Runtime configurable - `/dev/spidev*` are supported (Linux host only)
- GPIO: Runtime configurable - `/dev/gpiochip*` are supported (Linux host only)
Same board as \ref boards_native "native", but compiled for 32-bit instead of 64-bit.
Currently only Linux x86-32 is supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Currently only Linux x86-32 is supported.
Currently only Linux x86 is supported.

Copy link
Contributor

@benpicco benpicco Feb 12, 2025

Choose a reason for hiding this comment

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

heh, that's not true - we also support Arm32 (but not AArch64 #20739)

Copy link
Member Author

Choose a reason for hiding this comment

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

True. Totally forgot that.

@mguetschow mguetschow added CI: full build disable CI build filter CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 12, 2025
@benpicco
Copy link
Contributor

Instead of renaming native64 -> native, how about keeping the name and instead doing

ifeq (native, $(BOARD))
  BOARD = native$(shell getconf LONG_BIT)
endif

@OlegHahm
Copy link
Member Author

Instead of renaming native64 -> native, how about keeping the name and instead doing

ifeq (native, $(BOARD))
  BOARD = native$(shell getconf LONG_BIT)
endif

Not sure. Would that work on non-Linux platforms? (I know that the current (official) support is limited to Linux anyway but IIRC basic native stuff also works on OSX (except for networking).)

How about opening a separate PR for that after this one has been merged?

@OlegHahm
Copy link
Member Author

Addressed @benpicco's comments. Can I squash?

@benpicco
Copy link
Contributor

getconf is POSIX

@OlegHahm
Copy link
Member Author

Yes, but the Linux implementation may differ (according to the man page) and I wasn't sure if the variables are also part. But looking into the limits.h, it seems that the answer is yes.

I still would like to merge this PR first and then add another PR with the proposed idea. (I guess we should go with native32 and native64 as board names then.

@mguetschow
Copy link
Contributor

I guess we should go with native32 and native64 as board names then.

Hum, so another treewide commit changing all native back to native64? I'd rather opt for sorting this out before merging.

@mguetschow mguetschow dismissed their stale review February 13, 2025 08:58

I'd favor discussing @benpicco's proposal first.

@chrysn
Copy link
Member

chrysn commented Feb 13, 2025

I agree with Mikolai that going through an alias sounds preferable to multiple treewide changes. (They're even planned in RDM0003, sorry for lack of progress on general aliasing infrastructure).

@mguetschow
Copy link
Contributor

general aliasing infrastructure

Do you think there would be much more to it than what @benpicco proposed? Basically having a BOARD redefinition for any of the aliases at a central point called from Makefile.include?

@chrysn
Copy link
Member

chrysn commented Feb 13, 2025

Do you think there would be much more to it than what @benpicco proposed?

On the long run, we'll want to rename boards with confusing names to their systematic names; if that infrastructure were in place, the native switch could go there. It is not, but if we follow his suggestion, that place can later grow to also cater for other aliases.

The impact on this PR is mainly this: No, it's not weird to have a place in the Makefiles where this renaming happens, even if it's just handling a single special case now – this is the first of more that will happen there.

@OlegHahm
Copy link
Member Author

Okay, if the consensus if that we want to have this I would go over this PR again and rename native to native64 and implement the corresponding "alias" via the Makefile.

@mguetschow
Copy link
Contributor

You'll now also need a rebase now that #21135 is in 🙈

Probably easier to start from scratch :P

@OlegHahm
Copy link
Member Author

OlegHahm commented Feb 14, 2025 via email

@mguetschow
Copy link
Contributor

Discontinued in favor of #21242

@mguetschow mguetschow closed this Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: build system Area: Build system Area: CI Area: Continuous Integration of RIOT components Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: doc Area: Documentation Area: examples Area: Example Applications Area: Kconfig Area: Kconfig integration Area: sys Area: System Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: full build disable CI build filter CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: native Platform: This PR/issue effects the native platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants