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

doc: notes for sdk installation in shared environments #81615

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Nov 19, 2024

  • doc: getting_started: add anchor for installing the zephyr sdk
  • doc: beyond-gsg: install notes for sdk, venv in shared env
  • doc: zephyr_sdk: notes for sdk package managers

Doc Preview

@cfriedt cfriedt force-pushed the doc-zephyr-setup-in-multi-user-environments branch from 6814414 to b0697dd Compare November 19, 2024 17:58
@cfriedt cfriedt changed the title doc: getting_started: add anchor for installing the zephyr sdk doc: beyond-gsg: notes for sdk installation in multi-user environment Nov 19, 2024
@cfriedt
Copy link
Member Author

cfriedt commented Nov 19, 2024

I guess there is some overlap / conflict with this

https://docs.zephyrproject.org/latest/develop/toolchains/zephyr_sdk.html

Maybe the only parts that are really relevant are the shared Python virtual environment and guidelines for building files for package managers (e.g. .deb or .rpm).

@@ -332,6 +332,75 @@ options.
This executable can be instrumented using standard tools, such as gdb or
valgrind.

.. _gs_multi_user_environment:

Zephyr SDK Installation in Multi-User Environments
Copy link
Member

Choose a reason for hiding this comment

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

Maybe "Shared" is a better choice of term than "Multi-User"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

sudo mkdir -p /opt/zephyr/sdk/$VERSION
sudo chown $UID:$UID /opt/zephyr/sdk/$VERSION

2. Create a shared Python virtual environment (in :ref:`this step <gs_python_deps>`)
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure if it makes sense to tie Zephyr SDK and Python venv together given that venv is specific to Zephyr version, not SDK version.

If any, for a shared installation, the venv directory should be placed under a non-user directory that is specific to a Zephyr version, not SDK version.

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 was trying to force it to be tied to the SDK here, but you're right - it really isn't.

In practise, I just used a date for the version, but it should be tied to a Zephyr release (and maybe a patch version).

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

@@ -401,6 +401,58 @@ Depending on the topology of build infrastructure, it may be preferable to simpl
the ``/opt/zephyr/sdk/$VERSION`` directory to neighboring build machines. Alternatively, use
``/opt/zephyr/sdk/$VERSION`` to create packages using the package manager of choice.

.. _gs_package_managers:

Guidelines for Package Managers
Copy link
Member

Choose a reason for hiding this comment

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

This sounds more like it should be part of the SDK documentation -- at minimum, it should not be part of the "Getting Started Guide."

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

Add an anchor for installing the Zephyr SDK in the main page of
the Getting Started Guide.

Signed-off-by: Chris Friedt <[email protected]>
@cfriedt cfriedt force-pushed the doc-zephyr-setup-in-multi-user-environments branch 2 times, most recently from d2a53b3 to 8cc69b3 Compare January 1, 2025 20:11
@cfriedt cfriedt requested a review from stephanosio January 1, 2025 20:12
In the Beyond the Getting Started Guide page, add some notes for
those who wish to install the Zephyr SDK and Python virtual
environment in shared or distributed build environments.

Signed-off-by: Chris Friedt <[email protected]>
Include notes in the Zephyr SDK doc for those who wish to build
redistributable files for package managers (e.g. APT, RPM).

This does not mean that Zephyr will be responsible for
creating collections of .deb or .rpm packages for the Zephyr SDK.

These are only some guidelines based on previous experience in
that area.

Signed-off-by: Chris Friedt <[email protected]>
@cfriedt cfriedt force-pushed the doc-zephyr-setup-in-multi-user-environments branch from 8cc69b3 to 703fed9 Compare January 1, 2025 20:14
@cfriedt cfriedt requested a review from ycsin January 1, 2025 20:14
@cfriedt cfriedt changed the title doc: beyond-gsg: notes for sdk installation in multi-user environment doc: notes for sdk installation in shared environments Jan 1, 2025
@cfriedt cfriedt marked this pull request as ready for review January 1, 2025 21:25
@zephyrbot zephyrbot requested review from carlescufi and nashif January 1, 2025 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants