diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index 1065b5fb7..d532eae21 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -69,3 +69,7 @@ UBOOT_ENV_SIZE ?= "0x20000" # the U-Boot environment can take up (if undefined, it will take up all the # available space in the environment partition) UBOOT_ENV_RANGE ?= "" + +# Partitions to blacklist for swupdate: +# bootloader, environment, safe +SWUPDATE_MTD_BLACKLIST = "0 1 2" diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index 7e8324486..0189ba36b 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -76,3 +76,7 @@ do_create_flashlayout_config[noexec] = "1" # Include boot script into the FIT image UBOOT_ENV = "${@bb.utils.contains('TRUSTFENCE_FIT_IMG', '1', 'boot', '', d)}" + +# Partitions to blacklist for swupdate: +# fsbl1, fsbl2, metadata1, metadata2, fip-a, fip-b +SWUPDATE_MTD_BLACKLIST = "0 1 2 3 4 5" diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate/swupdate.cfg b/meta-digi-dey/recipes-support/swupdate/swupdate/swupdate.cfg index 2481ec914..6b754a834 100644 --- a/meta-digi-dey/recipes-support/swupdate/swupdate/swupdate.cfg +++ b/meta-digi-dey/recipes-support/swupdate/swupdate/swupdate.cfg @@ -12,7 +12,7 @@ globals : { verbose = true; loglevel = 5; syslog = true; - mtd-blacklist = "0 1 2"; + #mtd-blacklist #public-key-file }; diff --git a/meta-digi-dey/recipes-support/swupdate/swupdate_%.bbappend b/meta-digi-dey/recipes-support/swupdate/swupdate_%.bbappend index 94595b8b5..acf5d6dd0 100644 --- a/meta-digi-dey/recipes-support/swupdate/swupdate_%.bbappend +++ b/meta-digi-dey/recipes-support/swupdate/swupdate_%.bbappend @@ -24,6 +24,11 @@ do_install:append() { install -d ${D}${sysconfdir}/ install -m 0755 ${WORKDIR}/swupdate.cfg ${D}${sysconfdir} + # Add MTD blacklist + if ${@oe.utils.conditional('STORAGE_MEDIA', 'mtd', 'true', 'false', d)}; then + sed -i "s,\(^\s*\)#mtd-blacklist,\1mtd-blacklist = \"${SWUPDATE_MTD_BLACKLIST}\",g" ${D}${sysconfdir}/swupdate.cfg + fi + # Add public-key-file setting to config file if TrustFence is enabled if ${@oe.utils.conditional('TRUSTFENCE_ENABLED', '1', 'true', 'false', d)}; then sed -i "s,\(^\s*\)#public-key-file,\1public-key-file = \"${sysconfdir}/ssl/certs/key.pub\",g" ${D}${sysconfdir}/swupdate.cfg