Skip to content

Commit 59f9600

Browse files
committed
Reorder linux building guide
Building with a Factory was moved ahead of building without. Other minor changes made to page. QA: Viewed rendered output, and edited with linter rules checked with an extension. No Issues. No related issue, minor fix following up on internal Slack discussion. Signed-off-by: Katrina Prosise <katrina.prosise@foundries.io>
1 parent 3674562 commit 59f9600

File tree

1 file changed

+52
-48
lines changed

1 file changed

+52
-48
lines changed

source/user-guide/lmp-customization/linux-building.rst

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,59 @@ Requirements
3030
* Minimum 50GB of storage for a complete LmP build
3131
* `Docker Installed`_.
3232

33+
Build and Install the LmP for your Factory
34+
------------------------------------------
35+
36+
If you are already working with a Factory, you can download the source code with the following steps:
37+
38+
1. Make and enter an installation directory for the LmP with your ``<factory-name>``::
39+
40+
mkdir <factory-name> && cd <factory-name>
41+
42+
2. Install the ``<factory-name>`` meta-layers using repo:
43+
44+
.. parsed-literal::
45+
46+
repo init -u https://source.foundries.io/factories/<factory-name>/lmp-manifest.git -b main -m <factory-name>.xml
47+
repo sync
48+
49+
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`.
50+
51+
3. Build the image for ``<factory-name>`` with :term:`bitbake`:
52+
53+
.. parsed-literal::
54+
55+
MACHINE=<machine-name> source setup-environment [BUILDDIR]
56+
bitbake lmp-factory-image
57+
58+
Set ``MACHINE`` to a supported machine.
59+
See the current available options in :ref:`ref-linux-supported`.
60+
61+
``BUILDDIR`` is optional; the script defaults to ``build-lmp``.
62+
63+
``lmp-factory-image`` is the suggested default image.
64+
Customize it with the steps from :ref:`ref-adding-packages-image`.
65+
66+
.. tip::
67+
The ``bitbake`` step can take a while.
68+
69+
Your build artifacts will be under ``deploy/images/<machine-name>``.
70+
The artifact you use to flash your board is ``lmp-base-console-image-<machine-name>.wic.gz``.
71+
72+
.. important::
73+
74+
While the local build is great for developing and debugging,
75+
the image is not visible for the OTA system, and is for local use.
76+
77+
When you push the changes to your Factory Git repos, it will trigger a new build.
78+
You can then flash and register your device following the instructions of :ref:`gs-flash-device` and :ref:`gs-register`.
79+
Then, you can take advantage of the OTA system.
80+
81+
Build and Install Without a Factory
82+
-----------------------------------
83+
3384
Setup
34-
------
85+
^^^^^
3586

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

@@ -114,53 +165,6 @@ Install the Image
114165
* For other targets, see :ref:`ref-linux-supported` for their instructions.
115166

116167

117-
Build and Install the LmP for your Factory
118-
------------------------------------------
119-
120-
If you are already working with a Factory, you can instead download the source code for that factory with the following steps.
121-
122-
1. Make and enter an installation directory for the LmP using your ``<factory-name>``::
123-
124-
mkdir <factory-name> && cd <factory-name>
125-
126-
2. Install the ``<factory-name>`` meta-layers using repo:
127-
128-
.. parsed-literal::
129-
130-
repo init -u https://source.foundries.io/factories/<factory-name>/lmp-manifest.git -b main -m <factory-name>.xml
131-
repo sync
132-
133-
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`.
134-
135-
3. Build the image for ``<factory-name>`` with :term:`bitbake`:
136-
137-
.. parsed-literal::
138-
139-
MACHINE=<machine-name> source setup-environment [BUILDDIR]
140-
bitbake lmp-factory-image
141-
142-
Set ``MACHINE`` to a supported machine.
143-
See the current available options in :ref:`ref-linux-supported`.
144-
145-
``BUILDDIR`` is optional; the script defaults to ``build-lmp``.
146-
147-
``lmp-factory-image`` is the suggested default image.
148-
Customize it with the steps from :ref:`ref-adding-packages-image`.
149-
150-
.. tip::
151-
The ``bitbake`` step can take a while.
152-
153-
Your build artifacts will be under ``deploy/images/<machine-name>``.
154-
The artifact you use to flash your board is ``lmp-base-console-image-<machine-name>.wic.gz``.
155-
156-
.. important::
157-
158-
While the local build is great for developing and debugging,
159-
the image is not visible for the OTA system, and is for local use.
160-
161-
When you push the changes to your Factory Git repos, it will trigger a new build.
162-
You can then flash and register your device following the instructions of :ref:`gs-flash-device` and :ref:`gs-register`.
163-
Then, you can take advantage of the OTA system.
164168

165169
.. _ref-linux-building-ref:
166170

0 commit comments

Comments
 (0)