@@ -9,7 +9,7 @@ a repository used for updating devices based on Ostro OS.
99Prerequisites
1010=============
1111
12- - additional (fast) disk space: the SW Update tool is provided as
12+ - ** Additional (fast) disk space** : the SW Update tool is provided as
1313 an additional layer, therefore it doesn't require any additional
1414 element.
1515 The process of generating the bundles and updates can be very
@@ -21,7 +21,7 @@ Prerequisites
2121 The actual disk footprint depends on the bundles selected and
2222 defined and will be larger than that produced by a simple typical
2323 distribution build based on OECore or Yocto Project.
24- - signing keys (alternatively testing keys from the :file: `swupd-server `
24+ - ** Signing keys** (alternatively testing keys from the :file: `swupd-server `
2525 project can be used).
2626
2727Bundles definition
@@ -42,99 +42,98 @@ from the `Ostro OS download server`_
4242
4343These are the main steps:
4444
45- - Optionally, in ``conf/local.conf `` or equivalent location, set the
46- `OS_VERSION ` variable to an integer value.
47- If set explicitly, this number must be increased before each build
48- that generates swupd update artefacts.
45+ #. Optionally, in ``conf/local.conf `` or equivalent location, set the
46+ `OS_VERSION ` variable to an integer value.
47+ If set explicitly, this number must be increased before each build
48+ that generates swupd update artefacts.
4949
50- - Assign a list of bundle names to ``SWUPD_BUNDLES ``::
50+ #. Assign a list of bundle names to ``SWUPD_BUNDLES ``::
5151
52- SWUPD_BUNDLES = "feature_one feature_two"
52+ SWUPD_BUNDLES = "feature_one feature_two"
5353
54- - For each named bundle, setup a varflag of ``BUNDLE_CONTENTS ``
55- that matches the bundle name, and initialize it with a list of
56- packages whose content must be included in the bundle::
54+ #. For each named bundle, setup a varflag of ``BUNDLE_CONTENTS ``
55+ that matches the bundle name, and initialize it with a list of
56+ packages whose content must be included in the bundle::
5757
58- BUNDLE_CONTENTS[feature_one] = "package_one package_three package_six"
58+ BUNDLE_CONTENTS[feature_one] = "package_one package_three package_six"
5959
6060Creating a Custom Image and matching Software Update Repository
6161===============================================================
6262
6363Some of the steps listed in this section are optional and cover
64- advanced configuration functionality.
65- Not all the users will need them, if the default configuration of
66- the Ostro OS meets their needs.
64+ advanced configuration functionality that's only needed
65+ if the default configuration of
66+ the Ostro OS already meets your needs.
6767
6868The process is exemplified by using real components and describing
69- what each step looks like, when applied to such components.
70- Unless stated otherwise, the changes described are intended for
71- the file ``conf/local.conf ``.
69+ what each step looks like when applied to such components.
70+ Unless stated otherwise, the changes described are made in
71+ the ``conf/local.conf `` file .
7272
7373
7474Step 0: Review and optionally modify the content of the os-core bundle
7575----------------------------------------------------------------------
76- The os-core bundle comes with a predefined set of components,
76+ The `` os-core `` bundle comes with a predefined set of components,
7777however each device is likely to have slightly different requirements.
7878In some cases it might be necessary to adjust the set of components
79- included in os-core.
79+ included in `` os-core `` .
8080
8181To do this, either modify or extend the ``OSTRO_IMAGE_FEATURES_REFERENCE ``
8282and the ``OSTRO_IMAGE_INSTALL_REFERENCE `` variables for changes
8383respectively to the feature and component sets.
8484
85- Why modifying os-core? Because it's the only unremovable bundle and
86- therefore it is well suited to deliver to the device all those tools
87- that must always be available.
85+ We're modifying ``os-core `` because it's the only unremovable bundle and is
86+ therefore well suited to deliver tools
87+ that must always be available to your devices. For many IoT products,
88+ the actual application would be added to ``os-core `` like this.
8889
89- Example::
90+ For example, you can add the content of the ``sudo `` recipe to the
91+ ``os-core `` bundle by adding this line to your ``local.conf `` file::
9092
9193 ``OSTRO_IMAGE_INSTALL_REFERENCE += "sudo"``
9294
93- will add the content of the ``sudo `` recipe to the bundle os-core.
94-
95- .. note ::
96- The step shown works only for adding components to os-core.
95+ Adding recipes this way works only for adding components to ``os-core ``
96+ and is the typical case when customizing Ostro OS, because the
97+ ``os-core `` is a minimal configuration.
9798
98- This is the typical case when customizing Ostro OS, because the
99- os-core configuration is very minimal.
99+ However, if you need to remove something from ``os-core ``,
100+ you'll create either a new image recipe or a new
101+ ``.bbappend file ``, where you'll modify the variables that define the
102+ content of ``os-core ``.
100103
101- However, in case one needs to remove something from os-core,
102- it is necessary to create either a new image recipe or a new
103- .bbappend file, where to modify the variables that define the
104- content of os-core.
104+ These are the variable that must be modified::
105105
106- These are the variable that must be modified::
106+ - OSTRO_IMAGE_FEATURES_REFERENCE
107+ - OSTRO_IMAGE_INSTALL_REFERENCE
108+ - IMAGE_INSTALL
107109
108- - OSTRO_IMAGE_FEATURES_REFERENCE
109- - OSTRO_IMAGE_INSTALL_REFERENCE
110- - IMAGE_INSTALL
111-
112- The recommended way is to modify a copy of the original recipe
113- ``ostro-image-swupd.bb `` and refer to ``ostro-image.bbclass ``
114- for the values to use.
110+ We recommend you modify a copy of the original recipe
111+ ``ostro-image-swupd.bb `` and refer to ``ostro-image.bbclass ``
112+ for the values to use.
115113
116114
117115Step 1: Review and optionally modify the list of bundles
118116--------------------------------------------------------
119117Ostro already defines some bundles, and users can define additional ones.
120118
121- Example::
119+ Example:::
122120
123121 SWUPD_BUNDLES += "sudo_bundle"
124122 BUNDLE_CONTENTS[sudo_bundle] = "sudo"
125123
126- This example is an alternative to add the component that was shown in
127- Step 0. Instead of extending the content of os-core, put the extra
128- component in its own bundle. The main difference is that this
129- approach will not install the component by default in any image.
124+ This example is an alternative way to add the component shown in
125+ Step 0 above, but has an important difference. Instead of extending
126+ the content of ``os-core ``, this alternative way put the extra
127+ component in its own bundle and will not install the component by default
128+ in any image.
130129
131130
132131Step 2: Review and optionally modify the content of the images created
133132----------------------------------------------------------------------
134133It is also possible to choose which bundles will be pre-installed on the
135134customized image, by:
136135
137- #. adding to the list of buildable images a new one, which contains the
136+ #. Adding a new item to the list of buildable images, and list the
138137 bundle(s) desired.
139138
140139 Example::
@@ -143,7 +142,7 @@ customized image, by:
143142 pre_installed_content \
144143 "
145144
146- #. defining the content of the new buildable image (the image with the
145+ #. Defining the content of the new buildable image (the image with the
147146 pre-installed bundles, from the previous point), by adding a varflag
148147 to SWUPD_IMAGES that enumerates the bundles to pre-install.
149148
@@ -158,31 +157,45 @@ customized image, by:
158157 syntax. The other identifiers are under the developer's control.
159158
160159
161- This will add, to the set of images that are buildable, one referred to as
162- ``ostro-image-swupd-pre_installed_content ``, which contains, besides the
163- os-core bundle, also the ``sudo_bundle `` bundle from Step 1 and whatever
160+ This will add a new image option called
161+ ``ostro-image-swupd-pre_installed_content ``
162+ to the set of images that are buildable. This new image
163+ contains the
164+ ``os-core `` bundle, the ``sudo_bundle `` bundle from Step 1, and whatever
164165else might have been added.
165166
166- The main difference, compared to the approach taken in Step 0 is that
167- this approach allows for removing the content of the bundle without having to
167+ If you have ``sudo `` as part of ``os-core ``, then you:
168+ - remove it from the bundle and publish the update, *all * the devices will have sudo removed.
169+ - add it to the bundle and publish the update, *all * the devices will have sudo installed.
170+
171+ If you have ``sudo `` as ``sudo_bundle ``, then you do not automatically install or remove
172+ that in any device. You make it available and have an option to be installed or not on each device.
173+
174+ Put another way, the purpose of using a bundle is to allow a feature to be installed
175+ or removed *per device * or
176+ an application that one user may want while another may not.
177+ For example, a security system device may optionally install the upnp/dlna media provider to access
178+ the recorded files, whle a drone device could have a "camera" bundle installed containing the kernel module (v4l),
179+ media pipeline (gstreamer) and a server to stream it.
180+
181+ Compared to the approach taken in Step 0,
182+ this approach allows you to remove the content of the bundle without having to
168183create an update (and thus a new release).
169184
170185.. note ::
171- Each bundle defined generates a non-negligible amount of load, when
172- building images and SW Update repositories.
173-
174- It is therefore recommended to keep enabled only those bundles that
186+ Each defined bundle generates an additional workload when
187+ building images and SW Update repositories so we recommend
188+ you enable only those bundles that
175189 are effectively useful for the specific use-case targeted.
176190
177- In case one wants to modify the set of predefined bundles that come
178- from the defaults of Ostro OS, it is possible to override the variable
179- ``SWUPD_BUNDLES ``.
180-
181- Doing so will discard anything that was part of the defaults, therefore
182- if any of the pre-defined bundles is still needed, it must be listed
183- again, explicitly.
191+ Products should override the set of predefined default bundles that come
192+ from Ostro OS, by editing the
193+ ``SWUPD_BUNDLES `` variable. Doing so will discard anything that was
194+ part of the Ostro OS defaults;
195+ if any of the pre-defined bundles are still needed, they must be
196+ explicitly listed again.
184197
185- Example::
198+ Example::
186199
187200 ``SWUPD_BUNDLES = "sudo_bundle"``
188201
@@ -191,20 +204,20 @@ create an update (and thus a new release).
191204Step 3: Build the images and the SW Update repositories
192205-------------------------------------------------------
193206
194- The typical invocation for generating the basic Ostro OS image and related
207+ The typical command for generating the basic Ostro OS image and related
195208SW Update stream is::
196209
197210 $ bitbake ostro-image-swupd
198211
199- However, if one wants to have pre-installed bundles, then the invocation
212+ However, if one wants to have pre-installed bundles, then the command
200213must refer to the specific variant.
201214
202- Example (Continuing from Step2 )::
215+ Example (Continuing from Step 2 )::
203216
204- $ bitbake ostro-image-swupd-pre_installed_content
217+ $ bitbake ostro-image-swupd-pre_installed_content
205218
206- Assuming that the chosen architecture was ``intel-corei7-64 ``, the yield
207- from the command in the Example is:
219+ Assuming that the chosen architecture defined in `` local.conf `` was ``intel-corei7-64 ``,
220+ the yield from the command in the Example is:
208221
209222- The image with the chosen pre-installed bundles::
210223
@@ -219,26 +232,24 @@ from the command in the Example is:
219232 tmp-glibc/deploy/swupd/intel-corei7-64/ostro-image-swupd/
220233
221234 This folder contains both data from intermediate steps and the actual
222- SW Update stream.
223-
224- Its location is::
235+ SW Update stream located here::
225236
226237 tmp-glibc/deploy/swupd/intel-corei7-64/ostro-image-swupd/www/
227238
228- This folder will contain also data related to following builds and it is
229- the one that must be exposed to the device in need of maintenance, through
230- a web server, for example nginx or apache .
239+ This folder will also contain data related to subsequent builds and
240+ must be exposed through a web server (e.g., ``nginx`` or ``apache``)
241+ to the device running the SW update client for getting its maintentance .
231242
232243
233244Step 4: Create an update from the previous step
234245-----------------------------------------------
235246
236247Continuing with the previous example, one possible enhancement is to add a
237- new bundle, but it would have been also possible to modify the content of
248+ new bundle, or modify the content of
238249the existing bundle(s).
239250
240- To keep the execution simple, the bundle will contain only one component,
241- which is currently missing from the "Version 10" of the distribution: the
251+ To keep the execution simple, our example bundle will contain only one component
252+ currently missing from the, for example, "Version 10" of the distribution: the
242253``sed `` command.
243254
244255The changes required are:
@@ -263,25 +274,19 @@ The changes required are:
263274 sed_bundle \
264275 "
265276
266- But it's not required in the example, so this phase will be skipped .
277+ But it's not required in this example, so we'll skip this step .
267278
268279Finally, to generate the desired artefacts, the build command must be
269- iterated once more ::
280+ run again ::
270281
271282 $ bitbake ostro-image-swupd-pre_installed_content
272283
273- The yield is similar to the previous invocation, however now it also
284+ The yield is similar to the previous invocation, however now it also
274285contains the SW Update data for the newly defined bundle containing ``sed ``.
275286
276-
277- .. note ::
278- Because ``sed `` was introduced in the build ``Version 20 ``, devices that
279- are on earlier versions will not have access to this bundle.
280-
281- Such devices must first upgrade to a version where the bundle is
282- available and only then, they can install the new bundle.
283-
287+ Because ``sed `` was introduced in the build ``Version 20 ``, devices that
288+ are using earlier versions will not have access to this bundle.
289+ Such devices must first upgrade to a version where the bundle is
290+ available and only then, they can install the new bundle.
284291
285292.. _`swupd layer` : http://git.yoctoproject.org/cgit/cgit.cgi/meta-swupd/tree/docs/Guide.md
286-
287-
0 commit comments