diff options
-rw-r--r-- | README.adoc | 1 | ||||
-rw-r--r-- | classes/image_types_ostree.bbclass | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/README.adoc b/README.adoc index 994ad67..ea9bb21 100644 --- a/README.adoc +++ b/README.adoc | |||
@@ -88,6 +88,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w | |||
88 | * `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client). | 88 | * `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client). |
89 | * `SOTA_SECONDARY_CONFIG_DIR` - a directory containing JSON configuration files for virtual secondaries on the host. These will be installed into `/etc/sota/ecus` on the device and automatically provided to aktualizr. | 89 | * `SOTA_SECONDARY_CONFIG_DIR` - a directory containing JSON configuration files for virtual secondaries on the host. These will be installed into `/etc/sota/ecus` on the device and automatically provided to aktualizr. |
90 | * `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. | 90 | * `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. |
91 | * `OSTREE_DEPLOY_DEVICETREE` - Set this to '1' to include devicetree(s) to boot | ||
91 | 92 | ||
92 | == Usage | 93 | == Usage |
93 | 94 | ||
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 41b8d0d..d433acb 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -5,6 +5,7 @@ OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" | |||
5 | OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" | 5 | OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" |
6 | OSTREE_COMMIT_BODY ??= "" | 6 | OSTREE_COMMIT_BODY ??= "" |
7 | OSTREE_UPDATE_SUMMARY ??= "0" | 7 | OSTREE_UPDATE_SUMMARY ??= "0" |
8 | OSTREE_DEPLOY_DEVICETREE ??= "0" | ||
8 | 9 | ||
9 | BUILD_OSTREE_TARBALL ??= "1" | 10 | BUILD_OSTREE_TARBALL ??= "1" |
10 | 11 | ||
@@ -121,6 +122,14 @@ IMAGE_CMD_ostree () { | |||
121 | touch boot/initramfs-${checksum} | 122 | touch boot/initramfs-${checksum} |
122 | else | 123 | else |
123 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} | 124 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} |
125 | if [ "${OSTREE_DEPLOY_DEVICETREE}" = "1" ]; then | ||
126 | if test -n "${KERNEL_DEVICETREE}"; then | ||
127 | for DTS_FILE in ${KERNEL_DEVICETREE}; do | ||
128 | DTS_FILE_BASENAME=$(basename ${DTS_FILE}) | ||
129 | cp ${DEPLOY_DIR_IMAGE}/${DTS_FILE_BASENAME} boot/devicetree-${DTS_FILE_BASENAME}-${checksum} | ||
130 | done | ||
131 | fi | ||
132 | fi | ||
124 | fi | 133 | fi |
125 | 134 | ||
126 | # Copy image manifest | 135 | # Copy image manifest |