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

[WIP] dom0: add possibility to use Domu without GSX #127

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rshym
Copy link
Collaborator

@rshym rshym commented Apr 8, 2024

The 'gsx' MACHINE_FEATURE is used to generate proper configuration files for domains.

@rshym
Copy link
Collaborator Author

rshym commented Apr 8, 2024

Successfully built and ran on h3ulcb-4x2g and h3ulcb-4x2g-kf with console and sources.

cat ${WORKDIR}/domu-vdevices.cfg >> ${CFG_FILE}
cat ${WORKDIR}/pvr-${XT_DOMU_CONFIG_NAME} >> ${CFG_FILE}
if ${@bb.utils.contains('MACHINE_FEATURES', 'gsx', 'true', 'false', d)}; then
cat ${WORKDIR}/domu-vdevices.cfg >> ${CFG_FILE}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd better removed gsx from domu-vdevices and added domu-vdevices-gsx. Idea is that you always include domu-vdevicesand adddomu-devices-gsx` conditionally.

# Note2:
# Option `target` must be last element in list. For explanation see
# https://xenbits.xenproject.org/docs/4.15-testing/man/xl-disk-configuration.5.html
disk = [ 'backend=DomD, vdev=xvda1, target=/dev/STORAGE_PART3' ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

... approach described in the other command will ensure that there will be duplicate entries like this.

@rshym rshym force-pushed the mr_domunogsx branch 3 times, most recently from b651115 to 4a7a3b6 Compare April 11, 2024 19:17
@rshym
Copy link
Collaborator Author

rshym commented Apr 11, 2024

I have reworked PR.

  • domu-vdevices.cfg is reworked
  • GSX-related part of domu.cfg is moved into gsx-common.cfg
  • the python function selects SOC-specific GSX-related part of the domu.cfg
  • m3n related config is removed (I have checked available products, and didn't find usage of that SOC)

Tested by the build-and-run moulin prod-devel-rcar.yaml --MACHINE h3ulcb-4x2g --GRAPHICS sources --ENABLE_DOMU yes

@rshym rshym changed the title dom0: add 'no GSX' config for DomU dom0: add possibility to use Domu without GSX Apr 12, 2024
# inside `dtdev = []` construction because we will use
# linux's echo command to put multiline string into domu.cfg
python () {
if d.getVar("XT_DOMU_CONFIG_NAME", True) == "domu-generic-h3-4x2g.cfg":
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks fragile.

I'd prefer to see use of flags here instead of inline python. Something like

    '/soc/gsx_pv0_domu',
    '/soc/gsx_pv1_domu',
    '/soc/gsx_pv2_domu',
    '/soc/gsx_pv3_domu',

and then some logic (maybe even inline python, okay) that choose either m3 or h3

cat ${WORKDIR}/pvr-${XT_DOMU_CONFIG_NAME} >> ${CFG_FILE}
if ${@bb.utils.contains('MACHINE_FEATURES', 'gsx', 'true', 'false', d)}; then
cat ${WORKDIR}/gsx-common.cfg >> ${CFG_FILE}
sed -i "s/cma=32M/cma=256M pvrsrvkm.DriverMode=1/g" ${CFG_FILE}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We had many issues with sed earlier. I'd prefer some other solution. If you already building part of config dynamically in this recipe, you may build commandline as well.

@rshym rshym changed the title dom0: add possibility to use Domu without GSX [WIP] dom0: add possibility to use Domu without GSX Apr 24, 2024
GSX-related configs are separated and are moved
into gsx-common.cfg.
The SOC-specific GSX options are added at compile time.

The 'gsx' MACHINE_FEATURE is required to generate proper
configuration files for domains.

Signed-off-by: Ruslan Shymkevych <[email protected]>
This commit adds console only build for DomD and DomU.

Signed-off-by: Ruslan Shymkevych <[email protected]>
@rshym rshym mentioned this pull request Jan 16, 2025
@rshym rshym linked an issue Jan 16, 2025 that may be closed by this pull request
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.

Build failure
2 participants