Skip to content

Reorder linux building guide #839

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

Merged
merged 1 commit into from
Jun 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 52 additions & 48 deletions source/user-guide/lmp-customization/linux-building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,59 @@
* Minimum 50GB of storage for a complete LmP build
* `Docker Installed`_.

Build and Install the LmP for your Factory
------------------------------------------

If you are already working with a Factory, you can download the source code with the following steps:

1. Make and enter an installation directory for the LmP with your ``<factory-name>``::

mkdir <factory-name> && cd <factory-name>

2. Install the ``<factory-name>`` meta-layers using repo:

.. parsed-literal::

repo init -u https://source.foundries.io/factories/<factory-name>/lmp-manifest.git -b main -m <factory-name>.xml
repo sync

The manifest ``<factory-name>.xml`` refers to all the LmP meta-layers and also to the ``<factory-name>`` specific repositories as described :ref:`ref-factory-sources`.

3. Build the image for ``<factory-name>`` with :term:`bitbake`:

.. parsed-literal::

MACHINE=<machine-name> source setup-environment [BUILDDIR]
bitbake lmp-factory-image

Set ``MACHINE`` to a supported machine.
See the current available options in :ref:`ref-linux-supported`.

Check warning on line 59 in source/user-guide/lmp-customization/linux-building.rst

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Fio-docs.Branding-and-names] Use 'Linux' instead of 'linux' Raw Output: {"message": "[Fio-docs.Branding-and-names] Use 'Linux' instead of 'linux'", "location": {"path": "source/user-guide/lmp-customization/linux-building.rst", "range": {"start": {"line": 59, "column": 51}}}, "severity": "INFO"}

``BUILDDIR`` is optional; the script defaults to ``build-lmp``.

``lmp-factory-image`` is the suggested default image.
Customize it with the steps from :ref:`ref-adding-packages-image`.

.. tip::
The ``bitbake`` step can take a while.

Your build artifacts will be under ``deploy/images/<machine-name>``.
The artifact you use to flash your board is ``lmp-base-console-image-<machine-name>.wic.gz``.

.. important::

While the local build is great for developing and debugging,
the image is not visible for the OTA system, and is for local use.

When you push the changes to your Factory Git repos, it will trigger a new build.
You can then flash and register your device following the instructions of :ref:`gs-flash-device` and :ref:`gs-register`.
Then, you can take advantage of the OTA system.

Build and Install Without a Factory
-----------------------------------

Setup
------
^^^^^

#. Create local folders for ``sstate-cache``, ``downloads`` and ``build`` to save the build outside the container:

Expand Down Expand Up @@ -114,53 +165,6 @@
* For other targets, see :ref:`ref-linux-supported` for their instructions.


Build and Install the LmP for your Factory
------------------------------------------

If you are already working with a Factory, you can instead download the source code for that factory with the following steps.

1. Make and enter an installation directory for the LmP using your ``<factory-name>``::

mkdir <factory-name> && cd <factory-name>

2. Install the ``<factory-name>`` meta-layers using repo:

.. parsed-literal::

repo init -u https://source.foundries.io/factories/<factory-name>/lmp-manifest.git -b main -m <factory-name>.xml
repo sync

The manifest ``<factory-name>.xml`` refers to all the LmP meta-layers and also to the ``<factory-name>`` specific repositories as described :ref:`ref-factory-sources`.

3. Build the image for ``<factory-name>`` with :term:`bitbake`:

.. parsed-literal::

MACHINE=<machine-name> source setup-environment [BUILDDIR]
bitbake lmp-factory-image

Set ``MACHINE`` to a supported machine.
See the current available options in :ref:`ref-linux-supported`.

``BUILDDIR`` is optional; the script defaults to ``build-lmp``.

``lmp-factory-image`` is the suggested default image.
Customize it with the steps from :ref:`ref-adding-packages-image`.

.. tip::
The ``bitbake`` step can take a while.

Your build artifacts will be under ``deploy/images/<machine-name>``.
The artifact you use to flash your board is ``lmp-base-console-image-<machine-name>.wic.gz``.

.. important::

While the local build is great for developing and debugging,
the image is not visible for the OTA system, and is for local use.

When you push the changes to your Factory Git repos, it will trigger a new build.
You can then flash and register your device following the instructions of :ref:`gs-flash-device` and :ref:`gs-register`.
Then, you can take advantage of the OTA system.

.. _ref-linux-building-ref:

Expand Down
Loading