-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Hardware model v2 #51831
Labels
Comments
mbolivar-nordic
added
the
Enhancement
Changes/Updates/Additions to existing features
label
Nov 1, 2022
This was referenced Nov 1, 2022
This was referenced Nov 16, 2022
5 tasks
Slides presented at arch wg meeting Note, some adjustments has been made later in the HW model v2 progress based on community feedback. |
This was referenced Feb 16, 2024
This was referenced Feb 28, 2024
24 tasks
Merged here: #69607 |
github-project-automation
bot
moved this from In Progress
to Done
in Architecture Review
Mar 3, 2024
AyturkDuzen
added a commit
to AyturkDuzen/auto-pts
that referenced
this issue
May 21, 2024
zephyrproject-rtos/zephyr#51831 Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
mkasenberg
pushed a commit
to auto-pts/auto-pts
that referenced
this issue
May 21, 2024
zephyrproject-rtos/zephyr#51831 Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Parent issue
This issue is part of a larger issue: #51833
Proposed introduction plan and timeline
IMPORTANT NOTE: During the Architecture WG meetings where this topic was discussed it was agreed to avoid the complex transition plan below and instead adopt a direct approach where the switch between v1 and v2 happens in a single Pull Request. A collaboration branch is being used to collaboratively prepare the state of the tree once we switch to v2.
This implies that, starting with Zephyr 3.7.0, only the new hardware model will be supported. Any out-of-tree boards will need to transition to the v2 model as soon as they adopt Zephyr 3.7.0.
This decision was later ratified during a TSC call of January 3rd, 2024.
1. Before Zephyr 3.6.0 is released, PR #50305 is merged into the main tree- This does not mean that the current hardware model is deprecated, since only a small subset of SoCs and boards (enough to have a set representative examples) will have been ported from v1 to v2
2. Starting right after the merge:
- New SoCs in will only be accepted in v2 format
- New boards based on SoCs that are in v2 format will need to be submitted in v2 format as well
- Boards that use existing SoCs may be accepted in the current (v1) format. This will give users a chance to get boards in that were in development before the hardware model v2 PR was merged
3. Starting right after 3.6.0
- New boards will only be accepted in v2 format. Note that converting most boards from v1 to v2 only requires creating a .yaml file, shuffling files around a bit and making small changes to the Kconfig options
- Existing SoCs and boards will start transitioning in the tree from the current model to v2 progressively
- Important note: whenever an SoC transitions from v1 to v2 in the upstream project, out-of-tree boards based on that SoC that are not updated to v2 will not work anymore. However, users of the out-of-tree board(s) have an alternative path forward if they decide not to port their board to v2: they can copy the existing v1 SoC files to their out-of-tree repo and continue to work as before (they will of course need to backport any SoC fixes themselves)
4. Zephyr 3.7.0 LTS may ship with a combination of v1 and v2 SoCs and boards, since it is possible that not all of them will have transitioned before its release. Much of the SoC and board code and files are very similar between the two revisions, so this should not be a big issue for backporting fixes, even with SoCs and boards that transition to v2 after LTS release
5. Hardware model v1 support will be deprecated with the release of Zephyr 3.8.0 (4.0.0?)
6. Hardware model v1 support will be removed right after the release of Zephyr 3.10.0 (4.2.0?)
- Nordic commits to maintaining any infrastructure related to hardware model v2 until this point
Is your enhancement proposal related to a problem?
There is no way to define a single board directory or SoC directory for AMP SoCs that have CPUs with different architectures.
This is because of the artificial file system hierarchy restriction that requires SoC and board porters to provide the architecture via the file system, e.g.:
<SOC_ROOT>/soc/<ARCH>/<SOC_FAMILY>/...
<BOARD_ROOT>/boards/<ARCH>/<BOARD_NAME>/...
This hardware model has served us well for years when SoCs with Zephyr support were simple microcontrollers with a single CPU or single SMP cluster. The industry is increasingly moving towards heterogeneous AMP SoCs, however, and Zephyr needs to keep up if we wish to continue to serve our users well.
Describe the solution you'd like
A backwards-compatible "hardware model v2". That is, a file system hierarchy standard supported by Zephyr's build system that lets you:
This would look something like this (details in the
...
TBD):<SOC_ROOT>/soc/v2/<VENDOR>/<SOC_FAMILY>/...
<BOARD_ROOT>/boards/v2/<VENDOR>/<BOARD_NAME>/...
That is, we allow both in-tree and out-of-tree users to define
v2
subdirectories of bothsoc
andboards
. These respectively contain SoC and board definitions which support as many simultaneous architectures as are required.Hardware model v2 will support both "multi-architecture" and "single-architecture" SoCs to allow for an eventual migration path if the project ever wishes to deprecate the current hardware model. However, deprecation and migration is a non-goal for this initial effort: as stated above, the current model has served us well for years, and there seems to be no reason to force satisfied users away from it.
The
<VENDOR>
path components shown will be namespace controlled using the existing vendor-prefixes.txt file format already supported by Zephyr's devicetree tooling. Users may already provide their own vendor-prefixes.txt files in individual modules, so this mechanism gives us full control over what we support in the zephyr repository itself and allows for extensibility.Describe alternatives you've considered
None exist (prove me wrong 😄 ).
System devicetree support postponed
We originally expected that this would allow use of system devicetree, an extension to the devicetree specification described in #51830.
However, integrating system devicetree support is not a blocker for implementing this issue (note that the below issue description never mentioned system devicetree specifically). Support for system DT has been postponed until after the initial hardware model v2 implementation.
Open issues
Those issue must be resolved before merging collab-hwm branch to zephyr/main
ref: Introduction of board and SoC scheme v2. #50305 (comment)
ref: Introduction of board and SoC scheme v2. #50305 (review)
Details: Configuring for a board which has a soc without the soc will give an error (expected), if you then re-configure the project with the soc without cleaning, an oddity happens: 1) a warning is emitted that the old board name will be used instead as you need to clear the build directory, 2) the identifier from the new value is actually used, 3) the "identifier" cmake message is not output
Fixed: cmake: cache BOARD_IDENTIFIER to preserve it between CMake invocations #67426
intel_adsp
,arduino_nano_33
samples/subsys/mgmt/mcumgr/smp_svr
with a non-converted board e.g.nrf52840dk_nrf52840/blah
Fixed: cmake: fail when board identifier is applied in legacy hw model #67433
board_list
script, ref: https://discord.com/channels/720317445772017664/1194671118422913114/1201082341842505858In order to merge back to main, a checklist has been created:
#69575
Enhancement issues which exists in zephyr/main but has been identified during porting.
Not required to be solved before merging collab-hwm branch to zephyr/main
See #69546
Board porting where porting is in progress / completed
See issue here for board / SoC porting progress: #67682
Slides presented at arch wg meeting
Zephyr_arch_wg_HWMv2.pptx
Note, some adjustments has been made later in the HW model v2 progress based on community feedback.
Change history
The text was updated successfully, but these errors were encountered: