From a081a1e3d3f5630b77378e2a20d6f0275f661cb4 Mon Sep 17 00:00:00 2001 From: Bumsik Kim Date: Tue, 12 Nov 2019 14:24:41 +0900 Subject: [PATCH] Make sure disabling ST's flashlayout & partitions work as expected The current ST's .bbclass files do not really checks if ENABLE_PARTITIONS_IMAGE and ENABLE_FLASHLAYOUT_CONFIG are unset. This silently breaks third-party distributions that use their own partitions layout and root directory structures. Signed-off-by: Bumsik Kim --- classes/flashlayout-stm32mp.bbclass | 2 +- classes/st-partitions-image.bbclass | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/flashlayout-stm32mp.bbclass b/classes/flashlayout-stm32mp.bbclass index c626024..aa41908 100644 --- a/classes/flashlayout-stm32mp.bbclass +++ b/classes/flashlayout-stm32mp.bbclass @@ -120,7 +120,7 @@ FLASHLAYOUT_CONFIGURE_FILES ??= "" # ----------------------------------------------------------------------------- python __anonymous () { flashlayout_config = d.getVar('ENABLE_FLASHLAYOUT_CONFIG') - if flashlayout_config: + if flashlayout_config == "1": # Gather all current tasks tasks = filter(lambda k: d.getVarFlag(k, "task", True), d.keys()) for task in tasks: diff --git a/classes/st-partitions-image.bbclass b/classes/st-partitions-image.bbclass index dc06fdf..29777a0 100755 --- a/classes/st-partitions-image.bbclass +++ b/classes/st-partitions-image.bbclass @@ -38,6 +38,10 @@ python __anonymous () { } image_rootfs_image_clean_task () { + if [ ${ENABLE_PARTITIONS_IMAGE} -ne "1" ]; then + return + fi + for name in ${PARTITIONS_IMAGE}; do if `echo ${IMAGE_NAME} | grep -q $name` ;