diff --git a/scripts/yocto_cache_setup.sh b/scripts/yocto_cache_setup.sh
index 2742283cbfc05998f317386fbbcadec83b6d99af..0d97aeb0ad78b952aecc04334a5098372290e68e 100644
--- a/scripts/yocto_cache_setup.sh
+++ b/scripts/yocto_cache_setup.sh
@@ -3,14 +3,22 @@ PROCESSOR=$1
 
 sed -i -e '/DL_DIR ?=/d' conf/local.conf;
 echo 'DL_DIR = \"/var/cache/edgehog_downloads\"' >> conf/local.conf;
-if [[ $PROCESSOR == *imx6* ]]; 
+if [[ $PROCESSOR == *imx6* && "$CI_JOB_NAME" != *"embedded"* ]]; 
   then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-imx6\"' >> conf/local.conf;
-elif [[ $PROCESSOR == *imx8* ]];
+elif [[ $PROCESSOR == *imx8* && "$CI_JOB_NAME" != *"embedded"* ]];
   then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-imx8\"' >> conf/local.conf;
-elif [[ $PROCESSOR == *rk* ]];
+elif [[ $PROCESSOR == *rk* && "$CI_JOB_NAME" != *"embedded"* ]];
   then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-rk\"' >> conf/local.conf;
-elif [[ $PROCESSOR == *intel* ]];
+elif [[ $PROCESSOR == *intel* && "$CI_JOB_NAME" != *"embedded"* ]];
   then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-intel\"' >> conf/local.conf;
+elif [[ $PROCESSOR == *imx6* && "$CI_JOB_NAME" == *"embedded"* ]]; 
+  then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-imx6-embedded\"' >> conf/local.conf;
+elif [[ $PROCESSOR == *imx8* && "$CI_JOB_NAME" == *"embedded"* ]];
+  then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-imx8-embedded\"' >> conf/local.conf;
+elif [[ $PROCESSOR == *rk* && "$CI_JOB_NAME" == *"embedded"* ]];
+  then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-rk-embedded\"' >> conf/local.conf;
+elif [[ $PROCESSOR == *intel* && "$CI_JOB_NAME" == *"embedded"* ]];
+  then echo 'SSTATE_DIR = \"/var/cache/edgehog_sstate-intel-embedded\"' >> conf/local.conf;
 fi
 
 echo '###############################'