فهرست منبع

swupdate class: add a way to uncondiionally files from deploy

Images in deploy directory are added to the cpio archive and
the resulting filename results from the concatenation of
the image name and MACHINE.

There are cases where files in deploy have no relationship with
the MACHINE - for example, if there are more as one DTB for the
same kernel. The DTB files result from the value set in
KERNEL_DEVICETREE and can have any value.

The new variable SWUPDATE_IMAGES_NOAPPEND_MACHINE is added
and evaluated by the class. If this is set for the specific image,
the file is simply added to the cpio archive without any changes
in the filename.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic 9 سال پیش
والد
کامیت
34feb0b339
1فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 10 2
      classes/swupdate.bbclass

+ 10 - 2
classes/swupdate.bbclass

@@ -111,13 +111,21 @@ python do_swuimage () {
         if (filename != 'sw-description'):
             list_for_cpio.append(filename)
 
+# SWUPDATE_IMAGES refers to images in the DEPLOY directory
+# If they are not there, additional file can be added
+# by fetching from URLs
     deploydir = d.getVar('DEPLOY_DIR_IMAGE', True)
 
     for image in images:
-        imagename = image + '-' + d.getVar('MACHINE', True)
         fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image, True) or "").split()
         for fstype in fstypes:
-            imagebase = image + '-' + d.getVar('MACHINE', True)
+
+            appendmachine = d.getVarFlag("SWUPDATE_IMAGES_NOAPPEND_MACHINE", image, True)
+            if appendmachine == None:
+                imagebase = image + '-' + d.getVar('MACHINE', True)
+            else:
+                imagebase = image
+
             imagename = imagebase + fstype
             src = os.path.join(deploydir, "%s" % imagename)
             dst = os.path.join(s, "%s" % imagename)