Skip to content
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

hwmv2: qemu_x86: acrn: Port to HWMv2 #68078

Merged

Conversation

golowanow
Copy link
Member

@golowanow golowanow commented Jan 24, 2024

Port qemu_x86 to HWMv2 as well as SoCs it depends on:

  • ia32
  • lakemont

Several qemu_x86 board configurations have changed their identifiers to the HWMv2 scheme:

  • qemu_x86_nokpti --> qemu_x86/ia32/nokpti
  • qemu_x86_nommu --> qemu_x86/ia32/nommu
  • qemu_x86_nopae --> qemu_x86/ia32/nopae
  • qemu_x86_virt --> qemu_x86/ia32/virt
  • qemu_x86_xip --> qemu_x86/ia32/xip
  • qemu_x86_64_nokpti --> qemu_x86/ia32/nokpti
  • qemu_x86_tiny@768 --> qemu_x86_tiny/ia32/768

Also x86/acrn boards: acrn and acrn_ehl_crb

@golowanow
Copy link
Member Author

hmm, is qemu_x86_virt (and Co.) a board itself, or just a revision of qemu_x86@virt ?
currently west accepts both, but twister only as a board.

@golowanow
Copy link
Member Author

golowanow commented Jan 25, 2024

@nashif, is it known and considered acceptable: with the HWMv2 board names Twister creates additional levels of directory structure under ./twister-out for board@revision/soc/variant instead of just one old board_soc_variant@revision, for example after ./scripts/twister -vv -a x86 -T tests/arch/x86/pagetables/ it looks like below

./twister-out
   |-qemu_x86
   |---ia32
   |-----nokpti
   |-------tests
   |---------arch
   |-----------x86
   |-------------pagetables
   |---------------arch.x86.pagetables
...

@nashif
Copy link
Member

nashif commented Jan 25, 2024

@nashif, is it known and considered acceptable: with the HWMv2 board names Twister creates additional levels of directory structure under ./twister-out for board/soc/revision instead of just one old board_soc_revision, for example after ./scripts/twister -vv -a x86 -T tests/arch/x86/pagetables/ it looks like below

./twister-out
   |-qemu_x86
   |---ia32
   |-----nokpti
   |-------tests
   |---------arch
   |-----------x86
   |-------------pagetables
   |---------------arch.x86.pagetables
...

No, was not aware of this.

This is a mess :( I do not like the slash in the board names and IMO this is going to be a problem and a blocker. FYI @tejlmand

@golowanow
Copy link
Member Author

golowanow commented Jan 25, 2024

two problems with CI twister tests currently on this PR:

  1. qemu_xtensa tests/subsys/llext/hello_world/llext.simple.modules_enabled - it seems not related to this change.
  2. old x86\acrn can't run properly as it depends on soc/v2/ia32 here and soc/x86/elkhart_lake which is in transition at hwmv2: port intel x86 boards #67885.
    I think acrn might be moved as a separate PR when both SoC it uses migrate to the collab-hwm, or at least one of them.

@golowanow golowanow marked this pull request as ready for review January 25, 2024 19:21
@golowanow
Copy link
Member Author

@tejlmand - could you please provide some feedback - is this PR on track with the general v1 to v2 migration principles ?

@nashif
Copy link
Member

nashif commented Jan 30, 2024

regarding twister, would be nice to patch twister to replace / with _ in the build_dir to restore existing functionality and tree structure.

Copy link
Collaborator

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

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

looks very nice.
Only minor nits observed.

soc/v2/intel/lakemont/Kconfig.soc Outdated Show resolved Hide resolved
socs:
- name: ia32
revision:
format: custom
Copy link
Collaborator

Choose a reason for hiding this comment

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

with hwmv2 it is now possible to actually implement a board revision check here:

# We can't really do board_check_revision() here
# as it will apply to all qemu_x86* boards.
because only boards which specifies revision: format: custom will now load this file.

All other boards in this folder / yaml file will ignore the revision.cmake file.

Note, this comment is not blocking for this PR, more an extra piece of info.

boards/v2/qemu/qemu_x86/board.yml Outdated Show resolved Hide resolved
@tejlmand
Copy link
Collaborator

This is a mess :( I do not like the slash in the board names and IMO this is going to be a problem and a blocker. FYI @tejlmand

should be as simple as having twister sanitize the name before creating the folder structure, but would need to see if twister in other places than folder creation is also constructing the path based on board names.

@tejlmand tejlmand mentioned this pull request Jan 30, 2024
11 tasks
@tejlmand
Copy link
Collaborator

should be as simple as having twister sanitize the name before creating the folder structure, but would need to see if twister in other places than folder creation is also constructing the path based on board names.

added as open task here: #51831

Copy link
Collaborator

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

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

approved, nits can be addressed in followup.

boards/v2/qemu/qemu_x86/Kconfig.defconfig Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/Kconfig.defconfig Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/qemu_x86_64_nokpti.yaml Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/qemu_x86_nokpti.yaml Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/Kconfig.defconfig Outdated Show resolved Hide resolved
soc/v2/intel/lakemont/Kconfig.soc Outdated Show resolved Hide resolved
soc/v2/ia32/Kconfig.soc Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/Kconfig.qemu_x86 Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/Kconfig.qemu_x86_64 Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/Kconfig.qemu_x86_lakemont Outdated Show resolved Hide resolved
boards/v2/qemu/qemu_x86/Kconfig.qemu_x86_tiny Outdated Show resolved Hide resolved
@@ -1,7 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_IA32=y
Copy link
Collaborator

Choose a reason for hiding this comment

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

These files are named wrongly, the base here is qemu_x86 which will be included for all the qemu_x86/* boards (but not qemu_x86_64/* boards), but for variants, the soc name needs to be included, so above where you have identifier: qemu_x86/ia32/nommu this can be used to work out the filename, replace / with _ to get: qemu_x86_ia32_nommu - this is the name of the files for this variant e.g. qemu_x86_ia32_nommu.dts, qemu_x86_ia32_nommu_defconfig, qemu_x86_ia32_nommu.yaml etc.
Note that for the nommu config, it will do this for deconfig: qemu_x86_defconfig + qemu_x86_ia32_defconfig + qemu_x86_ia32_nommu_defconfig and combine them in that order

Copy link
Member Author

Choose a reason for hiding this comment

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

thank you, file names are adjusted

@golowanow
Copy link
Member Author

Needs rebase,

rebased, now it needs #68801

@golowanow
Copy link
Member Author

golowanow commented Feb 9, 2024

Needs rebase, and up squared 7000 board is failing CI: https://github.com/zephyrproject-rtos/zephyr/actions/runs/7843368285/job/21403615547?pr=68801

@nordicjm it seems up_squared_pro_7000 is failing because changes from #62694 were not applied to the board s migrated with collab_hwm branch on its rebase.
I'll prepare a fix for the intel boards, but isn't something wrong with that 'v2' / 'legacy' bulk move ?
@tejlmand

fix in #68814

@golowanow
Copy link
Member Author

@nordicjm do you have objections to merge this PR ?

@nordicjm
Copy link
Collaborator

@nordicjm do you have objections to merge this PR ?

* compliance check passing if [[hwm2] ci: update check_compliance to not create duplicate lines in Kconfig #68811](https://github.com/zephyrproject-rtos/zephyr/pull/68811) applied

* twister run issues are not related to this PR

Needs another approval

@golowanow
Copy link
Member Author

Needs another approval

@jhedberg, @tejlmand, @nashif could you please look at this PR once more ?

@golowanow
Copy link
Member Author

rebased to last changes at collab-hwm

Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

acrn board needs fixing

@golowanow
Copy link
Member Author

acrn board needs fixing

@nordicjm , it is planned as separate PR to follow on this one.

#68078 (comment)

  1. old x86\acrn can't run properly as it depends on soc/v2/ia32 here and soc/x86/elkhart_lake which is in transition at hwmv2: port intel x86 boards #67885.

@nordicjm
Copy link
Collaborator

acrn board needs fixing

@nordicjm , it is planned as separate PR to follow on this one.

#68078 (comment)

  1. old x86\acrn can't run properly as it depends on soc/v2/ia32 here and soc/x86/elkhart_lake which is in transition at hwmv2: port intel x86 boards #67885.

Can you put the commits here? Trying to fix up CI on collab-hwm not make it worse

Move and convert soc/x86/lakemont to HWMv2

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Move and convert soc/x86/ia32 to HWMv2.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Move and convert qemu_x86 board configurations to HWMv2.

Several board configurations have changed their identifiers
to the HWMv2 scheme:

 - qemu_x86_nokpti --> qemu_x86/ia32/nokpti
 - qemu_x86_nommu  --> qemu_x86/ia32/nommu
 - qemu_x86_nopae  --> qemu_x86/ia32/nopae
 - qemu_x86_virt   --> qemu_x86/ia32/virt
 - qemu_x86_xip    --> qemu_x86/ia32/xip

 - qemu_x86_64_nokpti --> qemu_x86_64/ia32/nokpti

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Remove duplicated Kconfig default options from qemu_x86 board
variants' configuration keeping only differences in regard
of the appropriate board configurations.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Change `qemu_x86_tiny@768` board revision to `qemu_x86_tiny/ia32/768`
board variant configuration.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Adjust qemu_x86 board configuration names to HWMv2 scheme.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Move and convert to HWMv2 `acrn` and `acrn_ehl_crb` board
configurations.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
@golowanow golowanow changed the title hwmv2: qemu_x86: Port to HWMv2 hwmv2: qemu_x86: acrn: Port to HWMv2 Feb 12, 2024
@golowanow
Copy link
Member Author

acrn board needs fixing

@nordicjm , it is planned as separate PR to follow on this one.
#68078 (comment)

  1. old x86\acrn can't run properly as it depends on soc/v2/ia32 here and soc/x86/elkhart_lake which is in transition at hwmv2: port intel x86 boards #67885.

Can you put the commits here? Trying to fix up CI on collab-hwm not make it worse

@nordicjm, done, x86/acrn is also here.

@nordicjm nordicjm merged commit 577afec into zephyrproject-rtos:collab-hwm Feb 13, 2024
24 of 30 checks passed
@golowanow golowanow deleted the hwmv2_intel_x86_qemu branch February 13, 2024 06:58
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.

5 participants