diff options
Diffstat (limited to 'recipes-sota/aktualizr')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb | 12 | ||||
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 10 |
2 files changed, 13 insertions, 9 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb index a729e6b..7420983 100644 --- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb +++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov-creds.bb | |||
@@ -21,11 +21,11 @@ do_install() { | |||
21 | SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem | 21 | SOTA_CACERT_PATH=${DEPLOY_DIR_IMAGE}/CA/cacert.pem |
22 | SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem | 22 | SOTA_CAKEY_PATH=${DEPLOY_DIR_IMAGE}/CA/ca.private.pem |
23 | mkdir -p ${DEPLOY_DIR_IMAGE}/CA | 23 | mkdir -p ${DEPLOY_DIR_IMAGE}/CA |
24 | bbwarn "SOTA_CACERT_PATH is not specified, use default one at $SOTA_CACERT_PATH" | 24 | bbwarn "SOTA_CACERT_PATH is not specified, use default one at ${SOTA_CACERT_PATH}" |
25 | 25 | ||
26 | if [ ! -f ${SOTA_CACERT_PATH} ]; then | 26 | if [ ! -f ${SOTA_CACERT_PATH} ]; then |
27 | bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA" | 27 | bbwarn "${SOTA_CACERT_PATH} does not exist, generate a new CA" |
28 | SOTA_CACERT_DIR_PATH="$(dirname "$SOTA_CACERT_PATH")" | 28 | SOTA_CACERT_DIR_PATH="$(dirname "${SOTA_CACERT_PATH}")" |
29 | openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096 | 29 | openssl genrsa -out ${SOTA_CACERT_DIR_PATH}/ca.private.pem 4096 |
30 | openssl req -key ${SOTA_CACERT_DIR_PATH}/ca.private.pem -new -x509 -days 7300 -out ${SOTA_CACERT_PATH} -subj "/C=DE/ST=Berlin/O=Reis und Kichererbsen e.V/commonName=meta-updater" -batch -config ${WORKDIR}/ca.cnf -extensions cacert | 30 | openssl req -key ${SOTA_CACERT_DIR_PATH}/ca.private.pem -new -x509 -days 7300 -out ${SOTA_CACERT_PATH} -subj "/C=DE/ST=Berlin/O=Reis und Kichererbsen e.V/commonName=meta-updater" -batch -config ${WORKDIR}/ca.cnf -extensions cacert |
31 | bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server" | 31 | bbwarn "${SOTA_CACERT_PATH} has been created, you'll need to upload it to the server" |
@@ -33,13 +33,13 @@ do_install() { | |||
33 | fi | 33 | fi |
34 | 34 | ||
35 | if [ -z ${SOTA_CAKEY_PATH} ]; then | 35 | if [ -z ${SOTA_CAKEY_PATH} ]; then |
36 | bberror "SOTA_CAKEY_PATH should be set when using implicit provisioning" | 36 | bbfatal "SOTA_CAKEY_PATH should be set when using implicit provisioning" |
37 | fi | 37 | fi |
38 | 38 | ||
39 | install -m 0700 -d ${D}${localstatedir}/sota | 39 | install -m 0700 -d ${D}${localstatedir}/sota |
40 | aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ | 40 | aktualizr-cert-provider --credentials ${SOTA_PACKED_CREDENTIALS} \ |
41 | --device-ca ${SOTA_CACERT_PATH} \ | 41 | --fleet-ca ${SOTA_CACERT_PATH} \ |
42 | --device-ca-key ${SOTA_CAKEY_PATH} \ | 42 | --fleet-ca-key ${SOTA_CAKEY_PATH} \ |
43 | --root-ca \ | 43 | --root-ca \ |
44 | --server-url \ | 44 | --server-url \ |
45 | --local ${D} \ | 45 | --local ${D} \ |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 14de9fa..82449f0 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -27,7 +27,7 @@ SRC_URI = " \ | |||
27 | file://aktualizr-serialcan.service \ | 27 | file://aktualizr-serialcan.service \ |
28 | " | 28 | " |
29 | 29 | ||
30 | SRCREV = "4621a15779db38531fb386478232a9e8593e53f4" | 30 | SRCREV = "348822d914f422a8d7b34a1e98cfdd1fa3cf816c" |
31 | BRANCH ?= "master" | 31 | BRANCH ?= "master" |
32 | 32 | ||
33 | S = "${WORKDIR}/git" | 33 | S = "${WORKDIR}/git" |
@@ -70,6 +70,10 @@ do_install_append () { | |||
70 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 70 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
71 | install -m 0700 -d ${D}${sysconfdir}/sota/conf.d | 71 | install -m 0700 -d ${D}${sysconfdir}/sota/conf.d |
72 | 72 | ||
73 | if [ -n "${SOTA_HARDWARE_ID}" ]; then | ||
74 | echo "[provision]\nprimary_ecu_hardware_id = ${SOTA_HARDWARE_ID}\n" > ${D}${libdir}/sota/conf.d/40-hardware-id.toml | ||
75 | fi | ||
76 | |||
73 | if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then | 77 | if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then |
74 | if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then | 78 | if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then |
75 | install -m 0700 -d ${D}${sysconfdir}/sota/ecus | 79 | install -m 0700 -d ${D}${sysconfdir}/sota/ecus |
@@ -106,12 +110,12 @@ FILES_${PN} = " \ | |||
106 | " | 110 | " |
107 | 111 | ||
108 | FILES_${PN}-examples = " \ | 112 | FILES_${PN}-examples = " \ |
109 | ${bindir}/hmi_stub \ | 113 | ${bindir}/hmi-stub \ |
110 | " | 114 | " |
111 | 115 | ||
112 | FILES_${PN}-host-tools = " \ | 116 | FILES_${PN}-host-tools = " \ |
113 | ${bindir}/aktualizr-repo \ | 117 | ${bindir}/aktualizr-repo \ |
114 | ${bindir}/aktualizr_cert_provider \ | 118 | ${bindir}/aktualizr-cert-provider \ |
115 | ${bindir}/garage-deploy \ | 119 | ${bindir}/garage-deploy \ |
116 | ${bindir}/garage-push \ | 120 | ${bindir}/garage-push \ |
117 | ${libdir}/sota/sota_autoprov.toml \ | 121 | ${libdir}/sota/sota_autoprov.toml \ |