diff options
| -rw-r--r-- | README.adoc | 2 | ||||
| -rw-r--r-- | classes/image_types_ostree.bbclass | 83 | ||||
| -rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 6 | ||||
| -rw-r--r-- | recipes-sota/aktualizr/files/aktualizr-autoprovision.service | 3 | ||||
| -rw-r--r-- | recipes-sota/aktualizr/files/sota_autoprov.toml | 8 | ||||
| -rw-r--r-- | recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service | 1 | ||||
| -rw-r--r-- | recipes-sota/rvi-sota-client/files/sota-installer.service | 12 | ||||
| -rw-r--r-- | recipes-sota/rvi-sota-client/rvi-sota-client.inc | 145 | ||||
| -rw-r--r-- | recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | 177 | ||||
| -rw-r--r-- | recipes-sota/rvi-sota-client/sota-installer_git.bb | 25 | ||||
| -rw-r--r-- | recipes-sota/rvi-sota-client/sota-launcher_git.bb | 15 | ||||
| -rw-r--r-- | recipes-sota/sota-tools/sota-tools_git.bb | 2 | ||||
| -rwxr-xr-x | scripts/envsetup.sh | 10 |
13 files changed, 264 insertions, 225 deletions
diff --git a/README.adoc b/README.adoc index d625780..9615f65 100644 --- a/README.adoc +++ b/README.adoc | |||
| @@ -115,7 +115,7 @@ ostree admin deploy --os=agl agl-snapshot:agl-ota | |||
| 115 | 115 | ||
| 116 | === SOTA tools | 116 | === SOTA tools |
| 117 | 117 | ||
| 118 | SOTA tools now contains only one tool, garage-push that lets you push the changes in OSTree repository generated by bitbake process. It communicates with an http server capable of querying files with HEAD requests and uploading them with POST requests. In particular, this can be used with http://www.atsgarage.com/[ATS Garage]. garage-push is used as follws: | 118 | SOTA tools currently contains only one tool, garage-push, which lets you push the changes in OSTree repository generated by bitbake process. It communicates with an http server capable of querying files with HEAD requests and uploading them with POST requests. In particular, this can be used with http://www.atsgarage.com/[ATS Garage]. garage-push is used as follows: |
| 119 | 119 | ||
| 120 | .... | 120 | .... |
| 121 | garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.json | 121 | garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.json |
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index a62ec84..110f88d 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
| @@ -4,6 +4,7 @@ inherit image | |||
| 4 | 4 | ||
| 5 | IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \ | 5 | IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \ |
| 6 | openssl-native:do_populate_sysroot \ | 6 | openssl-native:do_populate_sysroot \ |
| 7 | zip-native:do_populate_sysroot \ | ||
| 7 | virtual/kernel:do_deploy \ | 8 | virtual/kernel:do_deploy \ |
| 8 | ${OSTREE_INITRAMFS_IMAGE}:do_image_complete \ | 9 | ${OSTREE_INITRAMFS_IMAGE}:do_image_complete \ |
| 9 | unzip-native" | 10 | unzip-native" |
| @@ -18,36 +19,6 @@ OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | |||
| 18 | 19 | ||
| 19 | export SYSTEMD_USED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', '', d)}" | 20 | export SYSTEMD_USED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', '', d)}" |
| 20 | 21 | ||
| 21 | python () { | ||
| 22 | if d.getVar("SOTA_PACKED_CREDENTIALS", True): | ||
| 23 | if d.getVar("SOTA_AUTOPROVISION_CREDENTIALS", True): | ||
| 24 | bb.warn("SOTA_AUTOPROVISION_CREDENTIALS are overriden by those in SOTA_PACKED_CREDENTIALS") | ||
| 25 | if d.getVar("SOTA_AUTOPROVISION_URL", True): | ||
| 26 | bb.warn("SOTA_AUTOPROVISION_URL is overriden by the one in SOTA_PACKED_CREDENTIALS") | ||
| 27 | |||
| 28 | if d.getVar("SOTA_AUTOPROVISION_URL_FILE", True): | ||
| 29 | bb.warn("SOTA_AUTOPROVISION_URL_FILE is overriden by the one in SOTA_PACKED_CREDENTIALS") | ||
| 30 | |||
| 31 | if d.getVar("OSTREE_PUSH_CREDENTIALS", True): | ||
| 32 | bb.warn("OSTREE_PUSH_CREDENTIALS are overriden by those in SOTA_PACKED_CREDENTIALS") | ||
| 33 | |||
| 34 | d.setVar("SOTA_AUTOPROVISION_CREDENTIALS", "%s/sota_credentials/autoprov_credentials.p12" % d.getVar("DEPLOY_DIR_IMAGE", True)) | ||
| 35 | d.setVar("SOTA_AUTOPROVISION_URL_FILE", "%s/sota_credentials/autoprov.url" % d.getVar("DEPLOY_DIR_IMAGE", True)) | ||
| 36 | d.setVar("OSTREE_PUSH_CREDENTIALS", "%s/sota_credentials/treehub.json" % d.getVar("DEPLOY_DIR_IMAGE", True)) | ||
| 37 | } | ||
| 38 | |||
| 39 | IMAGE_DEPENDS_ostreecredunpack = "unzip-native:do_populate_sysroot" | ||
| 40 | |||
| 41 | IMAGE_CMD_ostreecredunpack () { | ||
| 42 | if [ ${SOTA_PACKED_CREDENTIALS} ]; then | ||
| 43 | rm -rf ${DEPLOY_DIR_IMAGE}/sota_credentials | ||
| 44 | |||
| 45 | unzip ${SOTA_PACKED_CREDENTIALS} -d ${DEPLOY_DIR_IMAGE}/sota_credentials | ||
| 46 | fi | ||
| 47 | } | ||
| 48 | |||
| 49 | IMAGE_TYPEDEP_ostree = "ostreecredunpack" | ||
| 50 | |||
| 51 | IMAGE_CMD_ostree () { | 22 | IMAGE_CMD_ostree () { |
| 52 | if [ -z "$OSTREE_REPO" ]; then | 23 | if [ -z "$OSTREE_REPO" ]; then |
| 53 | bbfatal "OSTREE_REPO should be set in your local.conf" | 24 | bbfatal "OSTREE_REPO should be set in your local.conf" |
| @@ -146,22 +117,33 @@ IMAGE_CMD_ostree () { | |||
| 146 | ln -sf var/roothome root | 117 | ln -sf var/roothome root |
| 147 | fi | 118 | fi |
| 148 | 119 | ||
| 149 | # deploy SOTA credentials | 120 | mkdir -p var/sota |
| 150 | if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" ]; then | ||
| 151 | EXPDATE=`openssl pkcs12 -in ${SOTA_AUTOPROVISION_CREDENTIALS} -password "pass:" -nodes 2>/dev/null | openssl x509 -noout -enddate | cut -f2 -d "="` | ||
| 152 | 121 | ||
| 153 | if [ `date +%s` -ge `date -d "${EXPDATE}" +%s` ]; then | 122 | if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" ]; then |
| 154 | bberror "Certificate ${SOTA_AUTOPROVISION_CREDENTIALS} has expired on ${EXPDATE}" | 123 | bbwarn "SOTA_AUTOPROVISION_CREDENTIALS are ignored. Please use SOTA_PACKED_CREDENTIALS" |
| 155 | fi | 124 | fi |
| 125 | if [ -n "${SOTA_AUTOPROVISION_URL}" ]; then | ||
| 126 | bbwarn "SOTA_AUTOPROVISION_URL is ignored. Please use SOTA_PACKED_CREDENTIALS" | ||
| 127 | fi | ||
| 128 | if [ -n "${SOTA_AUTOPROVISION_URL_FILE}" ]; then | ||
| 129 | bbwarn "SOTA_AUTOPROVISION_URL_FILE is ignored. Please use SOTA_PACKED_CREDENTIALS" | ||
| 130 | fi | ||
| 131 | if [ -n "${OSTREE_PUSH_CREDENTIALS}" ]; then | ||
| 132 | bbwarn "OSTREE_PUSH_CREDENTIALS is ignored. Please use SOTA_PACKED_CREDENTIALS" | ||
| 133 | fi | ||
| 156 | 134 | ||
| 157 | mkdir -p var/sota | 135 | # deploy SOTA credentials |
| 158 | cp ${SOTA_AUTOPROVISION_CREDENTIALS} var/sota/sota_provisioning_credentials.p12 | 136 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
| 159 | if [ -n "${SOTA_AUTOPROVISION_URL_FILE}" ]; then | 137 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
| 160 | export SOTA_AUTOPROVISION_URL=`cat ${SOTA_AUTOPROVISION_URL_FILE}` | 138 | cp ${SOTA_PACKED_CREDENTIALS} var/sota/sota_provisioning_credentials.zip |
| 161 | fi | 139 | # Device should not be able to push data to treehub |
| 162 | echo "SOTA_GATEWAY_URI=${SOTA_AUTOPROVISION_URL}" > var/sota/sota_provisioning_url.env | 140 | zip -d var/sota/sota_provisioning_credentials.zip treehub.json |
| 141 | fi | ||
| 163 | fi | 142 | fi |
| 164 | 143 | ||
| 144 | if [ -n "${SOTA_SECONDARY_ECUS}" ]; then | ||
| 145 | cp ${SOTA_SECONDARY_ECUS} var/sota/ecus | ||
| 146 | fi | ||
| 165 | 147 | ||
| 166 | # Creating boot directories is required for "ostree admin deploy" | 148 | # Creating boot directories is required for "ostree admin deploy" |
| 167 | 149 | ||
| @@ -204,10 +186,17 @@ IMAGE_CMD_ostree () { | |||
| 204 | IMAGE_TYPEDEP_ostreepush = "ostree" | 186 | IMAGE_TYPEDEP_ostreepush = "ostree" |
| 205 | IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot" | 187 | IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot" |
| 206 | IMAGE_CMD_ostreepush () { | 188 | IMAGE_CMD_ostreepush () { |
| 207 | if [ -n "${OSTREE_PUSH_CREDENTIALS}" ]; then | 189 | # Print warnings if credetials are not set or if the file has not been found. |
| 208 | garage-push --repo=${OSTREE_REPO} \ | 190 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
| 209 | --ref=${OSTREE_BRANCHNAME} \ | 191 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
| 210 | --credentials=${OSTREE_PUSH_CREDENTIALS} \ | 192 | garage-push --repo=${OSTREE_REPO} \ |
| 211 | --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt | 193 | --ref=${OSTREE_BRANCHNAME} \ |
| 194 | --credentials=${SOTA_PACKED_CREDENTIALS} \ | ||
| 195 | --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt | ||
| 196 | else | ||
| 197 | bbwarn "SOTA_PACKED_CREDENTIALS file does not exist." | ||
| 198 | fi | ||
| 199 | else | ||
| 200 | bbwarn "SOTA_PACKED_CREDENTIALS not set. Please add SOTA_PACKED_CREDENTIALS." | ||
| 212 | fi | 201 | fi |
| 213 | } | 202 | } |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 359c9fb..8bc580d 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
| @@ -13,8 +13,9 @@ SRC_URI = " \ | |||
| 13 | file://aktualizr-autoprovision.service \ | 13 | file://aktualizr-autoprovision.service \ |
| 14 | file://sota_autoprov.toml \ | 14 | file://sota_autoprov.toml \ |
| 15 | " | 15 | " |
| 16 | SRCREV = "c24f1fc9b600113cf9f2d3d7215e406cbbb70ac4" | 16 | SRCREV = "1004efa3f86cef90c012b34620992b5762b741e3" |
| 17 | PV = "1.0+git${SRCPV}" | 17 | PV = "1.0+git${SRCPV}" |
| 18 | PR = "6" | ||
| 18 | 19 | ||
| 19 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
| 20 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" | 21 | SYSTEMD_SERVICE_${PN} = "aktualizr.service" |
| @@ -23,11 +24,10 @@ inherit cmake systemd | |||
| 23 | 24 | ||
| 24 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}" | 25 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}" |
| 25 | 26 | ||
| 26 | export SOTA_AUTOPROVISION_CREDENTIALS | ||
| 27 | export SOTA_PACKED_CREDENTIALS | 27 | export SOTA_PACKED_CREDENTIALS |
| 28 | 28 | ||
| 29 | do_install_append() { | 29 | do_install_append() { |
| 30 | if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" -o -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 30 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
| 31 | install -d ${D}/${systemd_unitdir}/system | 31 | install -d ${D}/${systemd_unitdir}/system |
| 32 | install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service | 32 | install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service |
| 33 | install -d ${D}/usr/lib/sota | 33 | install -d ${D}/usr/lib/sota |
diff --git a/recipes-sota/aktualizr/files/aktualizr-autoprovision.service b/recipes-sota/aktualizr/files/aktualizr-autoprovision.service index fd0ab09..4a595f0 100644 --- a/recipes-sota/aktualizr/files/aktualizr-autoprovision.service +++ b/recipes-sota/aktualizr/files/aktualizr-autoprovision.service | |||
| @@ -7,8 +7,7 @@ Requires=network-online.target | |||
| 7 | [Service] | 7 | [Service] |
| 8 | RestartSec=10 | 8 | RestartSec=10 |
| 9 | Restart=always | 9 | Restart=always |
| 10 | EnvironmentFile=/var/sota/sota_provisioning_url.env | 10 | ExecStart=/usr/bin/aktualizr --disable-keyid-validation --config /usr/lib/sota/sota.toml |
| 11 | ExecStart=/usr/bin/aktualizr --disable-keyid-validation --tls-server ${SOTA_GATEWAY_URI} --config /usr/lib/sota/sota.toml | ||
| 12 | 11 | ||
| 13 | [Install] | 12 | [Install] |
| 14 | WantedBy=multi-user.target | 13 | WantedBy=multi-user.target |
diff --git a/recipes-sota/aktualizr/files/sota_autoprov.toml b/recipes-sota/aktualizr/files/sota_autoprov.toml index 8799553..9fbb093 100644 --- a/recipes-sota/aktualizr/files/sota_autoprov.toml +++ b/recipes-sota/aktualizr/files/sota_autoprov.toml | |||
| @@ -1,9 +1,5 @@ | |||
| 1 | [device] | ||
| 2 | packages_dir = "/tmp/packages_dir" | ||
| 3 | certificates_directory = "/var/sota" | ||
| 4 | system_info = "system_info.sh" | ||
| 5 | |||
| 6 | [tls] | 1 | [tls] |
| 2 | certificates_directory = "/var/sota/" | ||
| 7 | ca_file = "root.crt" | 3 | ca_file = "root.crt" |
| 8 | client_certificate = "client.pem" | 4 | client_certificate = "client.pem" |
| 9 | pkey_file = "pkey.pem" | 5 | pkey_file = "pkey.pem" |
| @@ -14,5 +10,5 @@ private_key_path = "ecukey.der" | |||
| 14 | public_key_path = "ecukey.pub" | 10 | public_key_path = "ecukey.pub" |
| 15 | 11 | ||
| 16 | [provision] | 12 | [provision] |
| 17 | p12_path = "sota_provisioning_credentials.p12" | 13 | provision_path = "/var/sota/sota_provisioning_credentials.zip" |
| 18 | 14 | ||
diff --git a/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service b/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service index 0431455..11b1354 100644 --- a/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service +++ b/recipes-sota/rvi-sota-client/files/sota-client-autoprovision.service | |||
| @@ -6,7 +6,6 @@ After=network-online.target | |||
| 6 | [Service] | 6 | [Service] |
| 7 | Type=oneshot | 7 | Type=oneshot |
| 8 | WorkingDirectory=/var/sota | 8 | WorkingDirectory=/var/sota |
| 9 | EnvironmentFile=/var/sota/sota_provisioning_url.env | ||
| 10 | Environment=SOTA_CERT_DIR=/var/sota | 9 | Environment=SOTA_CERT_DIR=/var/sota |
| 11 | ExecStart=/usr/bin/sota_provision.sh sota_provisioning_credentials | 10 | ExecStart=/usr/bin/sota_provision.sh sota_provisioning_credentials |
| 12 | RemainAfterExit=true | 11 | RemainAfterExit=true |
diff --git a/recipes-sota/rvi-sota-client/files/sota-installer.service b/recipes-sota/rvi-sota-client/files/sota-installer.service new file mode 100644 index 0000000..a4fd99e --- /dev/null +++ b/recipes-sota/rvi-sota-client/files/sota-installer.service | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=SOTA Secondary ECU Installer | ||
| 3 | Requires=network-online.target | ||
| 4 | After=network-online.target | ||
| 5 | |||
| 6 | [Service] | ||
| 7 | RestartSec=10 | ||
| 8 | Restart=always | ||
| 9 | ExecStart=/usr/bin/sota-installer --level debug --oneshot --config /var/sota/installer.toml | ||
| 10 | |||
| 11 | [Install] | ||
| 12 | WantedBy=multi-user.target | ||
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client.inc b/recipes-sota/rvi-sota-client/rvi-sota-client.inc new file mode 100644 index 0000000..6718bab --- /dev/null +++ b/recipes-sota/rvi-sota-client/rvi-sota-client.inc | |||
| @@ -0,0 +1,145 @@ | |||
| 1 | inherit cargo systemd | ||
| 2 | |||
| 3 | DESCRIPTION = "rvi-sota-client recipe" | ||
| 4 | HOMEPAGE = "https://github.com/advancedtelematic/rvi_sota_client" | ||
| 5 | LICENSE = "MPL-2.0" | ||
| 6 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea" | ||
| 7 | |||
| 8 | BBCLASSEXTEND = "native" | ||
| 9 | |||
| 10 | S = "${WORKDIR}/git" | ||
| 11 | |||
| 12 | SRC_URI[index.md5sum] = "6a635e8a081b4d4ba4cebffd721c2d7d" | ||
| 13 | SRC_URI[index.sha256sum] = "1913c41d4b8de89a931b6f9e418f83e70a083e12e6c247e8510ee932571ebae2" | ||
| 14 | |||
| 15 | # also update PV and SRC_URI crates when updating SRCREV | ||
| 16 | SRCREV = "d41540a54ee7bba20835b337f3a477d5f1386c76" | ||
| 17 | |||
| 18 | PR = "1" | ||
| 19 | |||
| 20 | # generate with: `make package-version` | ||
| 21 | PV = "0.2.33-76-gd41540a" | ||
| 22 | |||
| 23 | # generate with: `make yocto-version` | ||
| 24 | SRC_URI = " \ | ||
| 25 | git://github.com/advancedtelematic/rvi_sota_client \ | ||
| 26 | file://sota-client-autoprovision.service \ | ||
| 27 | file://sota-client-ostree.service \ | ||
| 28 | file://sota-client-uptane.service \ | ||
| 29 | file://sota-installer.service \ | ||
| 30 | crate://crates.io/advapi32-sys/0.2.0 \ | ||
| 31 | crate://crates.io/aho-corasick/0.6.3 \ | ||
| 32 | crate://crates.io/ansi_term/0.9.0 \ | ||
| 33 | crate://crates.io/antidote/1.0.0 \ | ||
| 34 | crate://crates.io/atty/0.2.2 \ | ||
| 35 | crate://crates.io/backtrace/0.3.2 \ | ||
| 36 | crate://crates.io/backtrace-sys/0.1.11 \ | ||
| 37 | crate://crates.io/base64/0.5.2 \ | ||
| 38 | crate://crates.io/bit-set/0.4.0 \ | ||
| 39 | crate://crates.io/bit-vec/0.4.4 \ | ||
| 40 | crate://crates.io/bitflags/0.9.1 \ | ||
| 41 | crate://crates.io/byteorder/1.1.0 \ | ||
| 42 | crate://crates.io/bytes/0.4.4 \ | ||
| 43 | crate://crates.io/cfg-if/0.1.2 \ | ||
| 44 | crate://crates.io/chan/0.1.19 \ | ||
| 45 | crate://crates.io/chan-signal/0.2.0 \ | ||
| 46 | crate://crates.io/chrono/0.4.0 \ | ||
| 47 | crate://crates.io/clap/2.25.0 \ | ||
| 48 | crate://crates.io/core-foundation/0.2.3 \ | ||
| 49 | crate://crates.io/core-foundation-sys/0.2.3 \ | ||
| 50 | crate://crates.io/crossbeam/0.2.10 \ | ||
| 51 | crate://crates.io/crypt32-sys/0.2.0 \ | ||
| 52 | crate://crates.io/dbghelp-sys/0.2.0 \ | ||
| 53 | crate://crates.io/dbus/0.5.3 \ | ||
| 54 | crate://crates.io/dtoa/0.4.1 \ | ||
| 55 | crate://crates.io/env_logger/0.4.3 \ | ||
| 56 | crate://crates.io/error-chain/0.10.0 \ | ||
| 57 | crate://crates.io/filetime/0.1.10 \ | ||
| 58 | crate://crates.io/foreign-types/0.2.0 \ | ||
| 59 | crate://crates.io/gcc/0.3.51 \ | ||
| 60 | crate://crates.io/getopts/0.2.14 \ | ||
| 61 | crate://crates.io/hex/0.2.0 \ | ||
| 62 | crate://crates.io/httparse/1.2.3 \ | ||
| 63 | crate://crates.io/hyper/0.10.12 \ | ||
| 64 | crate://crates.io/hyper-native-tls/0.2.4 \ | ||
| 65 | crate://crates.io/idna/0.1.4 \ | ||
| 66 | crate://crates.io/iovec/0.1.0 \ | ||
| 67 | crate://crates.io/itoa/0.3.1 \ | ||
| 68 | crate://crates.io/kernel32-sys/0.2.2 \ | ||
| 69 | crate://crates.io/language-tags/0.2.2 \ | ||
| 70 | crate://crates.io/lazy_static/0.2.8 \ | ||
| 71 | crate://crates.io/libc/0.2.26 \ | ||
| 72 | crate://crates.io/libflate/0.1.5 \ | ||
| 73 | crate://crates.io/log/0.3.8 \ | ||
| 74 | crate://crates.io/maplit/0.1.4 \ | ||
| 75 | crate://crates.io/matches/0.1.6 \ | ||
| 76 | crate://crates.io/memchr/1.0.1 \ | ||
| 77 | crate://crates.io/metadeps/1.1.2 \ | ||
| 78 | crate://crates.io/mime/0.2.6 \ | ||
| 79 | crate://crates.io/native-tls/0.1.4 \ | ||
| 80 | crate://crates.io/net2/0.2.29 \ | ||
| 81 | crate://crates.io/num/0.1.40 \ | ||
| 82 | crate://crates.io/num-integer/0.1.35 \ | ||
| 83 | crate://crates.io/num-iter/0.1.34 \ | ||
| 84 | crate://crates.io/num-traits/0.1.40 \ | ||
| 85 | crate://crates.io/num_cpus/1.6.2 \ | ||
| 86 | crate://crates.io/openssl/0.9.14 \ | ||
| 87 | crate://crates.io/openssl-sys/0.9.14 \ | ||
| 88 | crate://crates.io/pem/0.4.0 \ | ||
| 89 | crate://crates.io/percent-encoding/1.0.0 \ | ||
| 90 | crate://crates.io/pkg-config/0.3.9 \ | ||
| 91 | crate://crates.io/quote/0.3.15 \ | ||
| 92 | crate://crates.io/rand/0.3.15 \ | ||
| 93 | crate://crates.io/redox_syscall/0.1.26 \ | ||
| 94 | crate://crates.io/regex/0.2.2 \ | ||
| 95 | crate://crates.io/regex-syntax/0.4.1 \ | ||
| 96 | crate://crates.io/reqwest/0.6.2 \ | ||
| 97 | crate://crates.io/ring/0.7.1 \ | ||
| 98 | crate://crates.io/rust-crypto/0.2.36 \ | ||
| 99 | crate://crates.io/rustc-demangle/0.1.4 \ | ||
| 100 | crate://crates.io/rustc-serialize/0.3.24 \ | ||
| 101 | crate://crates.io/schannel/0.1.7 \ | ||
| 102 | crate://crates.io/secur32-sys/0.2.0 \ | ||
| 103 | crate://crates.io/security-framework/0.1.14 \ | ||
| 104 | crate://crates.io/security-framework-sys/0.1.14 \ | ||
| 105 | crate://crates.io/serde/1.0.10 \ | ||
| 106 | crate://crates.io/serde_derive/1.0.10 \ | ||
| 107 | crate://crates.io/serde_derive_internals/0.15.1 \ | ||
| 108 | crate://crates.io/serde_json/1.0.2 \ | ||
| 109 | crate://crates.io/serde_urlencoded/0.5.1 \ | ||
| 110 | crate://crates.io/sha1/0.2.0 \ | ||
| 111 | crate://crates.io/strsim/0.6.0 \ | ||
| 112 | crate://crates.io/syn/0.11.11 \ | ||
| 113 | crate://crates.io/synom/0.11.3 \ | ||
| 114 | crate://crates.io/tar/0.4.13 \ | ||
| 115 | crate://crates.io/tempdir/0.3.5 \ | ||
| 116 | crate://crates.io/term_size/0.3.0 \ | ||
| 117 | crate://crates.io/textwrap/0.6.0 \ | ||
| 118 | crate://crates.io/thread_local/0.3.4 \ | ||
| 119 | crate://crates.io/time/0.1.38 \ | ||
| 120 | crate://crates.io/toml/0.2.1 \ | ||
| 121 | crate://crates.io/toml/0.4.2 \ | ||
| 122 | crate://crates.io/traitobject/0.1.0 \ | ||
| 123 | crate://crates.io/tungstenite/0.2.4 \ | ||
| 124 | crate://crates.io/typeable/0.1.2 \ | ||
| 125 | crate://crates.io/unicase/1.4.2 \ | ||
| 126 | crate://crates.io/unicode-bidi/0.3.3 \ | ||
| 127 | crate://crates.io/unicode-normalization/0.1.5 \ | ||
| 128 | crate://crates.io/unicode-segmentation/1.1.0 \ | ||
| 129 | crate://crates.io/unicode-width/0.1.4 \ | ||
| 130 | crate://crates.io/unicode-xid/0.0.4 \ | ||
| 131 | crate://crates.io/unix_socket/0.5.0 \ | ||
| 132 | crate://crates.io/unreachable/1.0.0 \ | ||
| 133 | crate://crates.io/untrusted/0.3.2 \ | ||
| 134 | crate://crates.io/url/1.5.1 \ | ||
| 135 | crate://crates.io/utf-8/0.7.1 \ | ||
| 136 | crate://crates.io/utf8-ranges/1.0.0 \ | ||
| 137 | crate://crates.io/uuid/0.5.1 \ | ||
| 138 | crate://crates.io/vec_map/0.8.0 \ | ||
| 139 | crate://crates.io/version_check/0.1.3 \ | ||
| 140 | crate://crates.io/void/1.0.2 \ | ||
| 141 | crate://crates.io/winapi/0.2.8 \ | ||
| 142 | crate://crates.io/winapi-build/0.1.1 \ | ||
| 143 | crate://crates.io/ws2_32-sys/0.2.1 \ | ||
| 144 | crate://crates.io/xattr/0.1.11 \ | ||
| 145 | " | ||
diff --git a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb index 753488a..e286598 100644 --- a/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb +++ b/recipes-sota/rvi-sota-client/rvi-sota-client_git.bb | |||
| @@ -1,25 +1,7 @@ | |||
| 1 | DESCRIPTION = "sota-client rust recipe" | 1 | require rvi-sota-client.inc |
| 2 | HOMEPAGE = "https://github.com/advancedtelematic/rvi_sota_client" | ||
| 3 | 2 | ||
| 4 | LICENSE = "MPL-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea" | ||
| 6 | 3 | ||
| 7 | inherit cargo systemd | 4 | SYSTEMD_SERVICE_${PN} = "sota-client.service sota-client-autoprovision.service" |
| 8 | |||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | |||
| 11 | # When changing this, don't forget to: | ||
| 12 | # 1) Update PV | ||
| 13 | # 2) Check that Cargo.lock hasn't changed with git diff old..new Cargo.lock | ||
| 14 | SRCREV = "b6cf6957203fc406b3723d046f1b705e1bd08d7d" | ||
| 15 | |||
| 16 | # Generate with: | ||
| 17 | # git describe --tags | cut -b2- | ||
| 18 | # or from the rvi_sota_client repo: | ||
| 19 | # make package-version | ||
| 20 | PV = "0.2.33-41-gb6cf695" | ||
| 21 | |||
| 22 | BBCLASSEXTEND = "native" | ||
| 23 | 5 | ||
| 24 | FILES_${PN} = " \ | 6 | FILES_${PN} = " \ |
| 25 | /lib64 \ | 7 | /lib64 \ |
| @@ -32,151 +14,20 @@ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/so | |||
| 32 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-client-autoprovision.service', '', d)} \ | 14 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-client-autoprovision.service', '', d)} \ |
| 33 | " | 15 | " |
| 34 | 16 | ||
| 35 | |||
| 36 | # list of dependencies can be generated from Cargo.lock by running | ||
| 37 | # cat Cargo.lock | sed -e '1,/metadata/ d' Cargo.lock | awk '{print "crate://crates.io/"$2 "/" $3" \\"}' | ||
| 38 | SRC_URI = " \ | ||
| 39 | crate://crates.io/advapi32-sys/0.2.0 \ | ||
| 40 | crate://crates.io/aho-corasick/0.6.3 \ | ||
| 41 | crate://crates.io/ansi_term/0.9.0 \ | ||
| 42 | crate://crates.io/antidote/1.0.0 \ | ||
| 43 | crate://crates.io/atty/0.2.2 \ | ||
| 44 | crate://crates.io/backtrace/0.3.2 \ | ||
| 45 | crate://crates.io/backtrace-sys/0.1.11 \ | ||
| 46 | crate://crates.io/base64/0.5.2 \ | ||
| 47 | crate://crates.io/bit-set/0.4.0 \ | ||
| 48 | crate://crates.io/bit-vec/0.4.4 \ | ||
| 49 | crate://crates.io/bitflags/0.9.1 \ | ||
| 50 | crate://crates.io/byteorder/1.0.0 \ | ||
| 51 | crate://crates.io/bytes/0.4.4 \ | ||
| 52 | crate://crates.io/cfg-if/0.1.2 \ | ||
| 53 | crate://crates.io/chan/0.1.19 \ | ||
| 54 | crate://crates.io/chan-signal/0.2.0 \ | ||
| 55 | crate://crates.io/chrono/0.4.0 \ | ||
| 56 | crate://crates.io/clap/2.25.0 \ | ||
| 57 | crate://crates.io/core-foundation/0.2.3 \ | ||
| 58 | crate://crates.io/core-foundation-sys/0.2.3 \ | ||
| 59 | crate://crates.io/crossbeam/0.2.10 \ | ||
| 60 | crate://crates.io/crypt32-sys/0.2.0 \ | ||
| 61 | crate://crates.io/dbghelp-sys/0.2.0 \ | ||
| 62 | crate://crates.io/dbus/0.5.3 \ | ||
| 63 | crate://crates.io/dtoa/0.4.1 \ | ||
| 64 | crate://crates.io/env_logger/0.4.3 \ | ||
| 65 | crate://crates.io/error-chain/0.10.0 \ | ||
| 66 | crate://crates.io/filetime/0.1.10 \ | ||
| 67 | crate://crates.io/foreign-types/0.2.0 \ | ||
| 68 | crate://crates.io/gcc/0.3.51 \ | ||
| 69 | crate://crates.io/getopts/0.2.14 \ | ||
| 70 | crate://crates.io/hex/0.2.0 \ | ||
| 71 | crate://crates.io/httparse/1.2.3 \ | ||
| 72 | crate://crates.io/hyper/0.10.12 \ | ||
| 73 | crate://crates.io/hyper-native-tls/0.2.4 \ | ||
| 74 | crate://crates.io/idna/0.1.2 \ | ||
| 75 | crate://crates.io/iovec/0.1.0 \ | ||
| 76 | crate://crates.io/itoa/0.3.1 \ | ||
| 77 | crate://crates.io/kernel32-sys/0.2.2 \ | ||
| 78 | crate://crates.io/language-tags/0.2.2 \ | ||
| 79 | crate://crates.io/lazy_static/0.2.8 \ | ||
| 80 | crate://crates.io/libc/0.2.24 \ | ||
| 81 | crate://crates.io/libflate/0.1.9 \ | ||
| 82 | crate://crates.io/log/0.3.8 \ | ||
| 83 | crate://crates.io/maplit/0.1.4 \ | ||
| 84 | crate://crates.io/matches/0.1.6 \ | ||
| 85 | crate://crates.io/memchr/1.0.1 \ | ||
| 86 | crate://crates.io/metadeps/1.1.2 \ | ||
| 87 | crate://crates.io/mime/0.2.6 \ | ||
| 88 | crate://crates.io/native-tls/0.1.4 \ | ||
| 89 | crate://crates.io/net2/0.2.29 \ | ||
| 90 | crate://crates.io/num/0.1.39 \ | ||
| 91 | crate://crates.io/num-integer/0.1.34 \ | ||
| 92 | crate://crates.io/num-iter/0.1.33 \ | ||
| 93 | crate://crates.io/num-traits/0.1.39 \ | ||
| 94 | crate://crates.io/num_cpus/1.6.2 \ | ||
| 95 | crate://crates.io/openssl/0.9.14 \ | ||
| 96 | crate://crates.io/openssl-sys/0.9.14 \ | ||
| 97 | crate://crates.io/pem/0.4.0 \ | ||
| 98 | crate://crates.io/percent-encoding/1.0.0 \ | ||
| 99 | crate://crates.io/pkg-config/0.3.9 \ | ||
| 100 | crate://crates.io/quote/0.3.15 \ | ||
| 101 | crate://crates.io/rand/0.3.15 \ | ||
| 102 | crate://crates.io/redox_syscall/0.1.21 \ | ||
| 103 | crate://crates.io/regex/0.2.2 \ | ||
| 104 | crate://crates.io/regex-syntax/0.4.1 \ | ||
| 105 | crate://crates.io/reqwest/0.6.2 \ | ||
| 106 | crate://crates.io/ring/0.7.1 \ | ||
| 107 | crate://crates.io/rust-crypto/0.2.36 \ | ||
| 108 | crate://crates.io/rustc-demangle/0.1.4 \ | ||
| 109 | crate://crates.io/rustc-serialize/0.3.24 \ | ||
| 110 | crate://crates.io/schannel/0.1.7 \ | ||
| 111 | crate://crates.io/secur32-sys/0.2.0 \ | ||
| 112 | crate://crates.io/security-framework/0.1.14 \ | ||
| 113 | crate://crates.io/security-framework-sys/0.1.14 \ | ||
| 114 | crate://crates.io/serde/1.0.9 \ | ||
| 115 | crate://crates.io/serde_derive/1.0.9 \ | ||
| 116 | crate://crates.io/serde_derive_internals/0.15.1 \ | ||
| 117 | crate://crates.io/serde_json/1.0.2 \ | ||
| 118 | crate://crates.io/serde_urlencoded/0.5.1 \ | ||
| 119 | crate://crates.io/sha1/0.2.0 \ | ||
| 120 | crate://crates.io/strsim/0.6.0 \ | ||
| 121 | crate://crates.io/syn/0.11.11 \ | ||
| 122 | crate://crates.io/synom/0.11.3 \ | ||
| 123 | crate://crates.io/tar/0.4.13 \ | ||
| 124 | crate://crates.io/tempdir/0.3.5 \ | ||
| 125 | crate://crates.io/term_size/0.3.0 \ | ||
| 126 | crate://crates.io/textwrap/0.6.0 \ | ||
| 127 | crate://crates.io/thread_local/0.3.4 \ | ||
| 128 | crate://crates.io/time/0.1.37 \ | ||
| 129 | crate://crates.io/toml/0.2.1 \ | ||
| 130 | crate://crates.io/toml/0.4.2 \ | ||
| 131 | crate://crates.io/traitobject/0.1.0 \ | ||
| 132 | crate://crates.io/tungstenite/0.2.4 \ | ||
| 133 | crate://crates.io/typeable/0.1.2 \ | ||
| 134 | crate://crates.io/unicase/1.4.2 \ | ||
| 135 | crate://crates.io/unicode-bidi/0.3.3 \ | ||
| 136 | crate://crates.io/unicode-normalization/0.1.5 \ | ||
| 137 | crate://crates.io/unicode-segmentation/1.1.0 \ | ||
| 138 | crate://crates.io/unicode-width/0.1.4 \ | ||
| 139 | crate://crates.io/unicode-xid/0.0.4 \ | ||
| 140 | crate://crates.io/unix_socket/0.5.0 \ | ||
| 141 | crate://crates.io/unreachable/1.0.0 \ | ||
| 142 | crate://crates.io/untrusted/0.3.2 \ | ||
| 143 | crate://crates.io/url/1.5.1 \ | ||
| 144 | crate://crates.io/utf-8/0.7.1 \ | ||
| 145 | crate://crates.io/utf8-ranges/1.0.0 \ | ||
| 146 | crate://crates.io/uuid/0.5.1 \ | ||
| 147 | crate://crates.io/vec_map/0.8.0 \ | ||
| 148 | crate://crates.io/version_check/0.1.2 \ | ||
| 149 | crate://crates.io/void/1.0.2 \ | ||
| 150 | crate://crates.io/winapi/0.2.8 \ | ||
| 151 | crate://crates.io/winapi-build/0.1.1 \ | ||
| 152 | crate://crates.io/ws2_32-sys/0.2.1 \ | ||
| 153 | crate://crates.io/xattr/0.1.11 \ | ||
| 154 | git://github.com/advancedtelematic/rvi_sota_client \ | ||
| 155 | file://sota-client-autoprovision.service \ | ||
| 156 | file://sota-client-ostree.service \ | ||
| 157 | file://sota-client-uptane.service \ | ||
| 158 | " | ||
| 159 | |||
| 160 | SRC_URI[index.md5sum] = "6a635e8a081b4d4ba4cebffd721c2d7d" | ||
| 161 | SRC_URI[index.sha256sum] = "1913c41d4b8de89a931b6f9e418f83e70a083e12e6c247e8510ee932571ebae2" | ||
| 162 | |||
| 163 | SYSTEMD_SERVICE_${PN} = "sota-client.service sota-client-autoprovision.service" | ||
| 164 | |||
| 165 | DEPENDS += " openssl openssl-native dbus " | 17 | DEPENDS += " openssl openssl-native dbus " |
| 166 | RDEPENDS_${PN} = " libcrypto \ | 18 | RDEPENDS_${PN} = " \ |
| 167 | libssl \ | 19 | bash \ |
| 168 | bash \ | 20 | curl \ |
| 169 | lshw \ | 21 | libcrypto \ |
| 170 | jq \ | 22 | libssl \ |
| 171 | curl \ | 23 | lshw \ |
| 172 | python \ | 24 | jq \ |
| 173 | python-json \ | 25 | python-petname \ |
| 174 | python-petname \ | 26 | sota-launcher \ |
| 175 | " | 27 | zip \ |
| 28 | " | ||
| 176 | 29 | ||
| 177 | export SOTA_PACKED_CREDENTIALS | 30 | export SOTA_PACKED_CREDENTIALS |
| 178 | export SOTA_AUTOPROVISION_CREDENTIALS | ||
| 179 | export SOTA_AUTOPROVISION_URL | ||
| 180 | 31 | ||
| 181 | do_compile_prepend() { | 32 | do_compile_prepend() { |
| 182 | export SOTA_VERSION=$(make sota-version) | 33 | export SOTA_VERSION=$(make sota-version) |
| @@ -198,7 +49,7 @@ do_install() { | |||
| 198 | 49 | ||
| 199 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 50 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 200 | install -d ${D}/${systemd_unitdir}/system | 51 | install -d ${D}/${systemd_unitdir}/system |
| 201 | if [ -n "$SOTA_AUTOPROVISION_CREDENTIALS" -o -n "$SOTA_PACKED_CREDENTIALS" ]; then | 52 | if [ -n "$SOTA_PACKED_CREDENTIALS" ]; then |
| 202 | install -m 0644 ${WORKDIR}/sota-client-uptane.service ${D}/${systemd_unitdir}/system/sota-client.service | 53 | install -m 0644 ${WORKDIR}/sota-client-uptane.service ${D}/${systemd_unitdir}/system/sota-client.service |
| 203 | else | 54 | else |
| 204 | install -m 0644 ${WORKDIR}/sota-client-ostree.service ${D}/${systemd_unitdir}/system/sota-client.service | 55 | install -m 0644 ${WORKDIR}/sota-client-ostree.service ${D}/${systemd_unitdir}/system/sota-client.service |
diff --git a/recipes-sota/rvi-sota-client/sota-installer_git.bb b/recipes-sota/rvi-sota-client/sota-installer_git.bb new file mode 100644 index 0000000..09f6e5d --- /dev/null +++ b/recipes-sota/rvi-sota-client/sota-installer_git.bb | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | require rvi-sota-client.inc | ||
| 2 | |||
| 3 | |||
| 4 | SYSTEMD_SERVICE_${PN} = "sota-installer.service" | ||
| 5 | |||
| 6 | DEPENDS += " rvi-sota-client " | ||
| 7 | |||
| 8 | FILES_${PN} = " \ | ||
| 9 | ${bindir}/sota-installer \ | ||
| 10 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/sota-installer.service', '', d)} \ | ||
| 11 | " | ||
| 12 | |||
| 13 | do_compile_prepend() { | ||
| 14 | cd sota-installer | ||
| 15 | } | ||
| 16 | |||
| 17 | do_install() { | ||
| 18 | install -d ${D}${bindir} | ||
| 19 | install -m 0755 target/${TARGET_SYS}/release/sota-installer ${D}${bindir} | ||
| 20 | |||
| 21 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 22 | install -d ${D}/${systemd_unitdir}/system | ||
| 23 | install -m 0644 ${WORKDIR}/sota-installer.service ${D}/${systemd_unitdir}/system/sota-installer.service | ||
| 24 | fi | ||
| 25 | } | ||
diff --git a/recipes-sota/rvi-sota-client/sota-launcher_git.bb b/recipes-sota/rvi-sota-client/sota-launcher_git.bb new file mode 100644 index 0000000..e9874e7 --- /dev/null +++ b/recipes-sota/rvi-sota-client/sota-launcher_git.bb | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | require rvi-sota-client.inc | ||
| 2 | |||
| 3 | |||
| 4 | DEPENDS += " rvi-sota-client " | ||
| 5 | FILES_${PN} = "${bindir}/sota-launcher" | ||
| 6 | |||
| 7 | |||
| 8 | do_compile_prepend() { | ||
| 9 | cd sota-launcher | ||
| 10 | } | ||
| 11 | |||
| 12 | do_install() { | ||
| 13 | install -d ${D}${bindir} | ||
| 14 | install -m 0755 target/${TARGET_SYS}/release/sota-launcher ${D}${bindir} | ||
| 15 | } | ||
diff --git a/recipes-sota/sota-tools/sota-tools_git.bb b/recipes-sota/sota-tools/sota-tools_git.bb index 326ff20..2b9d0cb 100644 --- a/recipes-sota/sota-tools/sota-tools_git.bb +++ b/recipes-sota/sota-tools/sota-tools_git.bb | |||
| @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea" | |||
| 6 | S = "${WORKDIR}/git" | 6 | S = "${WORKDIR}/git" |
| 7 | 7 | ||
| 8 | SRC_URI = "gitsm://github.com/advancedtelematic/sota-tools.git;branch=master" | 8 | SRC_URI = "gitsm://github.com/advancedtelematic/sota-tools.git;branch=master" |
| 9 | SRCREV = "4d7f22f50ab43be5bee61ad3e96cd9db4ef3a372" | 9 | SRCREV = "216cb84db98e9b0f8c6c1c407f480c5dd0b3cf62" |
| 10 | 10 | ||
| 11 | inherit cmake | 11 | inherit cmake |
| 12 | 12 | ||
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index ff78681..260b048 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh | |||
| @@ -24,7 +24,15 @@ fi | |||
| 24 | METADIR="${SOURCEDIR}/../.." | 24 | METADIR="${SOURCEDIR}/../.." |
| 25 | 25 | ||
| 26 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then | 26 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then |
| 27 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 27 | if [ -z "$TEMPLATECONF" ] && [ -d ${METADIR}/meta-updater-${MACHINE}/conf ]; then |
| 28 | # Use the template configurations for the specified machine | ||
| 29 | TEMPLATECONF=${METADIR}/meta-updater-${MACHINE}/conf | ||
| 30 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | ||
| 31 | unset TEMPLATECONF | ||
| 32 | else | ||
| 33 | # Use the default configurations or TEMPLATECONF set by the user | ||
| 34 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | ||
| 35 | fi | ||
| 28 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf | 36 | echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf |
| 29 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf | 37 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf |
| 30 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf | 38 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf |
