diff --git a/classes-recipe/swupdate-common.bbclass
b/classes-recipe/swupdate-common.bbclass
index
ad3c0a02393688d9bdeeba19c2912a1419775db0..366aec8a3c3d2d12988ed127b4b432b3d221ac8a
100644
--- a/classes-recipe/swupdate-common.bbclass
+++ b/classes-recipe/swupdate-common.bbclass
@@ -169,7 +169,7 @@ def prepare_sw_description(d):
     import shutil
     import subprocess

-    s = d.getVar('S', True)
+    s = d.getVar('UNPACKDIR', True)
     swupdate_expand_bitbake_variables(d, s)

     swupdate_write_sha256(s)
@@ -228,7 +228,7 @@ def prepare_sw_description(d):
 def swupdate_add_src_uri(d, list_for_cpio):
     import shutil

-    s = d.getVar('S', True)
+    s = d.getVar('UNPACKDIR', True)
     exclude = (d.getVar("SWUPDATE_SRC_URI_EXCLUDE") or "").split()

     fetch = bb.fetch2.Fetch([], d)
@@ -277,7 +277,7 @@ def swupdate_add_artifacts(d, list_for_cpio):
     images = (d.getVar('SWUPDATE_IMAGES', True) or "").split()
     deploydir = d.getVar('DEPLOY_DIR_IMAGE', True)
     imgdeploydir = d.getVar('SWUDEPLOYDIR', True)
-    s = d.getVar('S', True)
+    s = d.getVar('UNPACKDIR', True)
     for image in images:
         fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image, True) or
"").split()
         encrypted = (d.getVarFlag("SWUPDATE_IMAGES_ENCRYPTED", image,
True) or "")
@@ -299,11 +299,13 @@ def swupdate_add_artifacts(d, list_for_cpio):
                     bb.fatal("swupdate cannot find image file: %s" %
os.path.join(deploydir, imagebase + fstype))
         else:  # Allow also complete entries like "image.ext4.gz" in
SWUPDATE_IMAGES
             if not add_image_to_swu(d, deploydir, image, s, encrypted,
list_for_cpio):
-                bb.fatal("swupdate cannot find %s image file" % image)
+                devicetreedir = os.path.join(deploydir ,"devicetree")
+                if not add_image_to_swu(d, devicetreedir, image, s,
encrypted, list_for_cpio):
+                    bb.fatal("swupdate cannot find %s image file" % image)


 def swupdate_create_cpio(d, swudeploydir, list_for_cpio):
-    s = d.getVar('S', True)
+    s = d.getVar('UNPACKDIR', True)
     os.chdir(s)
     updateimage = d.getVar('IMAGE_NAME', True) + '.swu'
     line = 'for i in ' + ' '.join(list_for_cpio) + '; do echo $i;done |
cpio -ov -H crc --reproducible > ' + os.path.join(swudeploydir, updateimage)
@@ -320,10 +322,9 @@ python do_swuimage () {

     list_for_cpio = ["sw-description"]
     workdir = d.getVar('WORKDIR', True)
-    s = d.getVar('S', True)
+    unpackdir = d.getVar('UNPACKDIR', True)
     imgdeploydir = d.getVar('SWUDEPLOYDIR', True)
-    shutil.copyfile(os.path.join(workdir, "sw-description"),
os.path.join(s, "sw-description"))
-
+    shutil.copyfile(os.path.join(unpackdir, "sw-description"),
os.path.join(workdir, "sw-description"))
     if d.getVar('SWUPDATE_SIGNING', True):
         list_for_cpio.append('sw-description.sig')

diff --git a/classes-recipe/swupdate-image.bbclass
b/classes-recipe/swupdate-image.bbclass
index
e9c67a6ff1a54bf1d9c0c33729a51484978566f3..22df58070aadc0b025377e8f8f8ea99946b86eab
100644
--- a/classes-recipe/swupdate-image.bbclass
+++ b/classes-recipe/swupdate-image.bbclass
@@ -13,7 +13,8 @@
 inherit swupdate-common
 inherit image-artifact-names

-S = "${WORKDIR}/${PN}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"

 SRC_URI += "file://sw-description"
 SWUPDATE_IMAGES += "${IMAGE_LINK_NAME}"
diff --git a/classes-recipe/swupdate.bbclass
b/classes-recipe/swupdate.bbclass
index
3656b1cb9d8bd55a9561feeffb9f19711846a4e4..ae000854f7728b429f1403b014c83330f51e8e3e
100644
--- a/classes-recipe/swupdate.bbclass
+++ b/classes-recipe/swupdate.bbclass
@@ -36,7 +36,8 @@
 inherit swupdate-common
 inherit image-artifact-names

-S = "${WORKDIR}/${PN}"
+S = "${WORKDIR}/sources"
+UNPACKDIR = "${S}"

 IMAGE_DEPENDS ?= ""

diff --git a/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb
b/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb
index
044cad2171387ffd25536ef88c83c13dac339644..5da4c6424530aca1077bf01d7d8fda6b52e58011
100644
--- a/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb
+++ b/recipes-lua/swupdate-lualoader/swupdate-lualoader_1.0.bb
@@ -2,7 +2,7 @@ SUMMARY = "Loader for swupdate"
 LICENSE = "MIT"
 SECTION = "devel/lua"
 DEPENDS = "lua"
-LIC_FILES_CHKSUM =
"file://${WORKDIR}/swupdate_handlers.lua;md5=354cf4af377edd962d2e8d78085d3ed7;beginline=1;endline=19"
+LIC_FILES_CHKSUM =
"file://${UNPACKDIR}/swupdate_handlers.lua;md5=354cf4af377edd962d2e8d78085d3ed7;beginline=1;endline=19"

