Skip to contentSkip to conversation

autonomy/docs: Documentation updates and fixes

PATCH New Nathan Dunne 1 participant 1 message Mar 31, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autonomy/docs: Documentation updates and fixes

From: Nathan Dunne <[email protected]>

Issue-Id: SCM-2038

Change-Id Ida94958b63c78097be6402be019d65a80260f297
---
 meta-arm-autonomy/README.md                   |  35 +++---
 .../documentation/arm-autonomy-multiconfig.md |  79 +++++++++-----
 .../documentation/arm-autonomy-quickstart.md  | 101 ++++++++++++------
 .../n1sdp-image-customization.md              |   2 +-
 .../documentation/xen-devicetree.md           |   3 +-
 .../documentation/xenguest-manager.md         |  40 ++++---
 .../documentation/xenguest-mkimage.md         |  14 +--
 .../import-docker-containers.bb               |   4 +
 .../images/arm-autonomy-host-image-minimal.bb |   2 +-
 .../xen-devicetree/xen-devicetree.bb          |  10 +-
 .../xenguest/xenguest-base-image.bb           |   6 +-
 .../xenguest/xenguest-extern-guests.bb        |  41 +------
 .../xenguest/xenguest-manager.bb              |  17 +--
 .../xenguest/xenguest-mkimage.bb              |   7 +-
 .../xenguest/xenguest-network.bb              |   2 +-
 15 files changed, 204 insertions(+), 159 deletions(-)
meta-arm-autonomy/README.md +18 -17
index f882b7c..b6b8538 100644
@@ -4,8 +4,8 @@ meta-arm-autonomy Yocto Layer
 Introduction
 ------------
 This layer provides an hypervisor based solution (currently based on Xen) for
-autonomous system. It contains recipes and classes to build host and guests
-systems.
+autonomous system. It contains recipes and classes to build host and guest
+images.
 
 To start using this layer, please check the
 [Quick Start Guide](documentation/arm-autonomy-quickstart.md).
@@ -16,13 +16,14 @@ This layer depends on several other Yocto layers:
 * meta-openembedded (https://git.openembedded.org/meta-openembedded)
 * poky (https://git.yoctoproject.org/poky)
 * meta-virtualization (https://git.yoctoproject.org/meta-virtualization)
+* meta-networking (git://git.openembedded.org/meta-openembedded)
 
 Distribution Features
 ---------------------
-This layer is adding the following Yocto DISTRO_FEATURES:
+This layer adds the following Yocto DISTRO_FEATURES:
 
 * arm-autonomy-host: this feature activates functionalities required to build
-  an autonomy host system. It is doing the following:
+  an autonomy host system. It has the following effects:
   - add 'xen' and 'ipv4' to DISTRO_FEATURES.
   - add xen backend drivers to linux kernel configuration.
   - To reduce the root filesystem image size the kernel image is not installed.
@@ -43,40 +44,40 @@ its documentation.
 Those documentation files should be checked for variables:
 - [xen-devicetree](documentation/xen-devicetree.md)
 - [xenguest-manager](documentation/xenguest-manager.md)
-- [xenguest-network-bridge](documentation/xenguest-network-bridge.md)
+- [xenguest-network](documentation/xenguest-network.md)
 
 BSPs
 ----
-This layer is adding the following machines:
+This layer adds the following machine:
 
-* arm64-autonomy-guest: this machines creates a minimal BSP suitable to be used
+* arm64-autonomy-guest: This machine creates a minimal BSP suitable to be used
   as an autonomy guest. It is in fact only activating ARM64 architecture and
   SMP in the linux kernel and is enabling the DISTRO_FEATURE
-  arm-autonomy-guest.
+  'arm-autonomy-guest'.
 
 Images
 ------
 This layer is adding the following images:
 
-* arm-autonomy-host-image-minimal: this image includes all elements required
-  to create a minimal arm-autonomy-host system. This includes xen and tools to
-  manage xen guests. This image depends on 'arm-autonomy-host' distribution
-  feature.
+* arm-autonomy-host-image-minimal: This image includes all elements required
+  to create a minimal arm-autonomy-host system. This includes xen, and tools to
+  manage xen guests and xenguest images. This image depends on
+ 'arm-autonomy-host' distribution feature.
 
 Recipes and classes
 -------------------
-This layer is adding the following recipes and classes:
+This layer adds the following recipes and classes:
 
-* [xen-devicetree](documentation/xen-devicetree.md): this is a recipe to modify
+* [xen-devicetree](documentation/xen-devicetree.md): This is a recipe to modify
   a device tree blob to add information required to boot xen and a Dom0 linux.
 
-* [xenguest-mkimage](documentation/xenguest-mkimage.md): this is a tool to
+* [xenguest-mkimage](documentation/xenguest-mkimage.md): This is a tool used to
   create and modify images to be used as Xen guests.
 
-* [xenguest-manager](documentation/xenguest-manager.md): this is a tool to
+* [xenguest-manager](documentation/xenguest-manager.md): This is a tool used to
   create/remove/start/stop xen guest generated using xenguest-mkimage.
 
-* [xenguest-network-bridge](documentation/xenguest-network-bridge.md): this
+* [xenguest-network](documentation/xenguest-network.md): This
   recipe add tools and init scripts to create a bridge connected to the
   external network on the host and allow guests to be connected to it.
 
meta-arm-autonomy/documentation/arm-autonomy-multiconfig.md +54 -25

141 lines not on this page · raw message

meta-arm-autonomy/documentation/arm-autonomy-quickstart.md +68 -33

182 lines not on this page · raw message

meta-arm-autonomy/documentation/n1sdp-image-customization.md +1 -1
index 80c11cb..c67b626 100644
@@ -28,7 +28,7 @@ perform a couple of customizations in the generated wic image:
 The `arm-autonomy-n1sdp-efidisk.wks.in` and `arm-autonomy-n1sdp-grub.cfg` files
 are located at `meta-arm-autonomy/dynamic-layers/meta-arm-bsp/wic`.
 
-Other variables can also be custmized to set what files need to be included
+Other variables can also be customized to set what files need to be included
 in the wic image boot partition. Please refer to
 `meta-arm-autonomy/dynamic-layers/meta-arm-bsp/conf/machine/n1sdp-extra-settings.inc`
 for more details.
meta-arm-autonomy/documentation/xen-devicetree.md +2 -1
index 0b3f41b..efe72ec 100644
@@ -56,7 +56,8 @@ The following parameters are available:
   the xen devicetrees are properly regenerated if the source DTBs are changed.
   This variable is set by default to "virtual/kernel:do_deploy" to use DTBs
   generated during the compilation of the Linux kernel. This must be changed
-  if the machine your are using is not using a DTB listed in KERNEL_DEVICETREE.
+  if the machine you are using is not using a DTB listed in
+  KERNEL_DEVICETREE.
 
 - XEN_DEVICETREE_DTBS: This should be set to the list of DTBs you want to be
   modified by xen-devicetree. Those must be files that xen-devicetree can find
meta-arm-autonomy/documentation/xenguest-manager.md +27 -13
index 11df2a1..7a83eee 100644
@@ -7,7 +7,7 @@ Introduction
 xenguest-manager is a tool to manage Xenguest images generated by
 [xenguest-mkimage](xenguest-mkimage.md).
 
-On a Xen Dom0 system it will:
+On a Xen Dom0 system it can:
 - create a xen guest from a xenguest image: extract its components, create a
   disk for the guest using LVM volumes.
 - start/stop a xen guest (during init or using xenguest-manager directly).
@@ -48,6 +48,7 @@ Bitbake parameters
 
 Several parameters are available to configure the xenguest manager during Yocto
 project compilation (those can be set in your project local.conf, for example).
+This config will be written to a file xenguest-manager.conf in /etc/xenguest/.
 
 The following parameters are available:
 
@@ -68,13 +69,22 @@ The following parameters are available:
   name).
   This is set by default to "/usr/share/guests".
 
-- XENGUEST_MANAGER_LOG_LEVEL: Set the default log level for xenguest manager. Must
-  be one of ERROR, INFO, VERBOSE (default: ERROR). The extra will be
+- XENGUEST_MANAGER_LOG_LEVEL: Set the default log level for xenguest manager.
+  Must be one of ERROR, INFO, VERBOSE (default: ERROR). The logs will be
   written to /var/log/xenguest.
 
   If a verbosity argument (-v or -vv) is passed to xenguest-manager directly, it
   will override the setting in xenguest-manager.conf
 
+  Since /var/log is by default a volatile location, extra configuration is
+  required if logs are desired to be kept between reboots:
+    VOLATILE_LOG_DIR="no"
+
+  Read more here: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-VOLATILE_LOG_DIR
+
+  When this is enabled, logrotate will monitor the file to ensure it does not
+  grow excessively large. See recipes-extended/xenguest/files/logrotate-xenguest
+
 Init scripts
 ------------
 
@@ -103,26 +113,30 @@ and variables from the parent file's scope, including:
                     Takes an optional log level and a message body
                     e.g. log ERROR "blah"
 
-                    Options for log level: ERROR, INFO, VERBOSE, and FATAL, which
-                    will call exit 1 immediately after logging the message
+                    Options for log level: ERROR, INFO, VERBOSE,
+                    and FATAL which will call exit 1 immediately after logging
+                    the message at level ERROR.
 
 - log_command()   : Used to call a shell command and log that it has been
                     called, as well as capturing both stdout and stderr.
 
-                    By default the command output is dumped to the logfile as an error
-                    if the command returns a status > 0, or as a verbose message if the
-                    whole script is running in verbose mode. An optional log level can
-                    be passed to alter the level the log should be if the command returns
-                    a status >0,
+                    By default the command output is dumped to the logfile as an
+                    error if the command returns a status > 0, or as a verbose
+                    message if the whole script is running in verbose mode.
+
+                    An optional log level can be passed to alter the level the
+                    log should be if the command returns a status >0, which may
+                    be useful if the command is expected to return a non-zero
+                    result.
                     e.g. log_command INFO "ls -lh ~"
 
                     Options for log level: ERROR, INFO, and VERBOSE
 
-Attempting to call any other functions from xenguest_manager in an init script may
-result in a fatal error, from which cleanup is not guarenteed.
+Attempting to call any other functions from xenguest_manager in an init script
+may result in a fatal error, from which cleanup is not guarenteed.
 
 
-Sourcing also allows the script to access params.cfg.
+Init scripts also have access to config variables defined in params.cfg.
 
 An example of how to create the directory and install an init shell script can
 be found in:
meta-arm-autonomy/documentation/xenguest-mkimage.md +7 -7
index fd142b7..e1e2a8a 100644
@@ -4,9 +4,9 @@ Xenguest mkimage
 Introduction
 ------------
 
-xenguest-mkimage is a tool to create and modify images to be used as Guest with
-Xen. It defines a format to store completely defined guests as a file or as
-a directory and provides options to create and modify those images.
+xenguest-mkimage is a tool to create and modify images to be used as a Guest
+with Xen. It defines a format to store completely defined guests as a file or as
+a directory, and provides options to create and modify those images.
 
 A xenguest image contains all elements required to create a xen guest.
 This is the base elements like a Xen configuration and a Linux kernel binary
@@ -15,8 +15,8 @@ but also some more advanced elements like init scripts or a disk definition.
 The format is made to be deployable easily by storing everything in a single
 file and provide tools to easily manipulate the images. It can also easily be
 extended to have features like encryption or signature of images, updates or
-complex configurations by providing features to have init script that will be
-executed on the host embedded inside the image.
+complex configurations by providing the ability to have init scripts embedded
+inside the image that will be executed on the host when the guest is started.
 
 Xenguest images content
 -----------------------
@@ -35,7 +35,7 @@ before starting the guest.
 
 ### files
 This directory contains files that can be used by the xen configuration, for
-example the binary of the kernel referenced in xen configuration).
+example the kernel image referenced in xen configuration.
 This is where the kernel binary, the dtb or a ramdisk will be stored.
 
 ### init.pre, init.d and init.post
@@ -47,7 +47,7 @@ contains scripts called at a different time:
      generate part of the xen configuration dynamically.
  - init.d: scripts executed when the guest has been created but before it is
      started. This can be used to do some xenstore operations or configure the
-     guest behaviour using xl, for example.
+     guest behaviour, using xl for example.
  - init.post: scripts executed just after starting the guest. This can be
      used to configure things created by xen for the guest like network
      network interfaces.
meta-arm-autonomy/recipes-containers/import-docker-containers/import-docker-containers.bb +4 -0
index 8a3f45d..3fea508 100644
@@ -6,6 +6,10 @@
 # the columns:   archive   name   tag   keep
 # for each container. This file is read by the import_containers
 # script to determine the parameters of the import
+#
+# Since the script needs knowledge of the values of $CONTAINERS_INSTALL_DIR
+# and $CONTAINERS_MANIFEST these are substituted for placeholder strings when
+# the script is installed.
 
 DESCRIPTION = "Add init script to import docker images at boot"
 LICENSE = "MIT"
meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb +1 -1
index cce632f..71ab5c2 100644
@@ -1,4 +1,4 @@
-# Recipe to create a minimal Arm Autonomy stack host image
+# Recipe to create a minimal Arm Autonomy reference stack host image
 
 DESCRIPTION = "Arm Autonomy stack host minimal image"
 
meta-arm-autonomy/recipes-extended/xen-devicetree/xen-devicetree.bb +5 -5
index db955e1..61fb624 100644
@@ -12,9 +12,9 @@ S = "${WORKDIR}"
 
 DESCRIPTION = "Add entries in DTB for Xen and Dom0"
 
-# Please refer to documentation/xen-devicetree.md for documentation on those
-# parameters
-# kernel size is passed to xen via xen.dtb so wee need to add
+# Please refer to documentation/xen-devicetree.md for documentation on these
+# customizable parameters
+# kernel size is passed to xen via xen.dtb so we need to add
 # 'virtual/kernel:do_deploy' as a dependency
 XEN_DEVICETREE_DEPEND_append = " virtual/kernel:do_deploy"
 XEN_DEVICETREE_DTBS ?= "${KERNEL_DEVICETREE}"
@@ -25,8 +25,8 @@ XEN_DEVICETREE_DOM0_ADDR ?= "0x80080000"
 XEN_DEVICETREE_DOM0_SIZE ?= "0x01000000"
 XEN_DEVICETREE_DTSI_MERGE ?= "xen.dtsi"
 
-# Our package does not generate any package for the rootfs but contributes to
-# deploy
+# Our package does not generate any packages for the rootfs, but instead
+# contributes to deploy
 inherit nopackages deploy
 
 DEPENDS += "dtc-native"
meta-arm-autonomy/recipes-extended/xenguest/xenguest-base-image.bb +3 -3
index d4b748e..73278e5 100644
@@ -2,10 +2,10 @@
 #
 # This recipe creates a base image that is then extended by other recipes
 # through xenguest_image class.
-# xenguest image type is using this as base to add a kernel and a disk image
-# to create a guest
+# xenguest image type uses this recipe as a base to add a kernel and a disk
+# image to create a guest
 #
-# The recipe is also adding files in those directories to the xenguest image:
+# The recipe also adds files in those directories to the xenguest image:
 # - ${WORKDIR}/extend/disk-files: all files in this directory will be added to
 #   the guest disk files (using --disk-add-file)
 # - ${WORKDIR}/extend/files: all files in this directory will be added to the
meta-arm-autonomy/recipes-extended/xenguest/xenguest-extern-guests.bb +4 -37

48 lines not on this page · raw message

meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb +4 -13
index e7034ca..aaf6cde 100644
@@ -1,17 +1,10 @@
 # Xenguest manager recipe
 #
-# xenguest-manager is a tool to control xen guest (e.g. create, start, stop)
+# xenguest-manager is a tool to control xen guests (e.g. create, start, stop)
 #
-# By default xenguest-manager logs to /var/log when in verbose mode, which is a
-# Volatile directory. To persist logs across reboots the following needs to be
-# added to either local.conf or distro.conf
-#
-#   VOLATILE_LOG_DIR="no"
-#
-# Read more here: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-VOLATILE_LOG_DIR
-#
-# When this is enabled, logrotate will monitor the file to ensure it does not grow
-# excessively large. See files/logrotate-xenguest
+# Usage documentation for the xenguest-manager tool can be found in
+# meta-arm-autonomy/documentation/xenguest-manager.md including the
+# customizable bitbake variables.
 
 DESCRIPTION = "Xen Guest Manager"
 LICENSE = "MIT"
@@ -25,8 +18,6 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
 
 S = "${WORKDIR}"
 
-# Please refer to documentation/xenguest-manager.md for documentation on those
-# parameters
 XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/sda2"
 XENGUEST_MANAGER_VOLUME_NAME ?= "vg-xen-$(basename ${XENGUEST_MANAGER_VOLUME_DEVICE})"
 XENGUEST_MANAGER_LOG_LEVEL ?= "ERROR"
meta-arm-autonomy/recipes-extended/xenguest/xenguest-mkimage.bb +5 -2
index 047ca9f..548e7c3 100644
@@ -2,8 +2,11 @@
 #
 # xenguest-mkimage is a tool to create/modify images to be used as xen guests
 # Produced images contains a xen configuration and several optional components
-# (kernel, device-tree, disk definition and files, init scripts) which all
-# together fully define a full xen guest
+# (kernel, device-tree, disk definition and files, and init scripts) which all
+# together fully define a xen guest image
+#
+# Usage documentation for the xenguest-mkimage tool can be found in
+# meta-arm-autonomy/documentation/xenguest-mkimage.md
 
 DESCRIPTION = "Xenguest mkimage tool"
 LICENSE = "MIT"
meta-arm-autonomy/recipes-extended/xenguest/xenguest-network.bb +1 -1
index 5f18659..65ab8aa 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
 S = "${WORKDIR}"
 
 # Please refer to documentation/xenguest-network-bridge.md for documentation on
-# those parameters
+# the parameters available for customization
 XENGUEST_NETWORK_BRIDGE_NAME ?= "xenbr0"
 
 # The XENGUEST_NETWORK_BRIDGE_MEMBERS should be set in a machine.conf
Signature · 1 line
2.17.1