From 4b33b1ac46fb525941c588b0a4c1b3ce132cad71 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 29 Mar 2018 13:45:30 +0200 Subject: Try to set hardware IDs in local.conf. Communicating the IDs to the images works, but getting the IDs in the garage-push commits does not. I can get the variables exported, but the script still uses the wrong (old) value. Not sure why. --- recipes-test/images/secondary-image.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'recipes-test/images/secondary-image.bb') diff --git a/recipes-test/images/secondary-image.bb b/recipes-test/images/secondary-image.bb index 9adbdc5..75deb5a 100644 --- a/recipes-test/images/secondary-image.bb +++ b/recipes-test/images/secondary-image.bb @@ -1,9 +1,22 @@ include recipes-core/images/core-image-minimal.bb +export SOTA_SECONDARY_HARDWARE_ID +export SOTA_HARDWARE_ID + SUMMARY = "A minimal Uptane Secondary image running aktualizr-secondary" LICENSE = "MIT" +IMAGE_TYPEDEP_garagesign_append = " set_hardware_id " +IMAGE_CMD_set_hardware_id() { + if [ -n "${SOTA_SECONDARY_HARDWARE_ID}" ]; then + SOTA_HARDWARE_ID="${SOTA_SECONDARY_HARDWARE_ID}" + fi +} +#python IMAGE_CMD_set_hardware_id() { +# if d.getVar("SOTA_SECONDARY_HARDWARE_ID", True): +# d.setVar("SOTA_HARDWARE_ID", d.getVar("SOTA_SECONDARY_HARDWARE_ID", True)) +#} # Remove default aktualizr primary, and the provisioning configuration (which # RDEPENDS on aktualizr) @@ -19,6 +32,7 @@ IMAGE_INSTALL_remove = " \ IMAGE_INSTALL_append = " \ aktualizr-secondary \ + aktualizr-secondary-conf \ secondary-network-config \ " -- cgit v1.2.3-54-g00ecf