소스 검색

swupdate class: add a way to add unconditionally files from deploy

Note: this was cherry-picked from:

	 8d49223205c4f65a853e0343273805c17fd6dfee

changing list_for_cpio.append not available in fido.

Signed-off-by: Thomas Gagneret <tgagneret@witekio.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Thomas Gagneret 9 년 전
부모
커밋
d9851069ce
1개의 변경된 파일9개의 추가작업 그리고 2개의 파일을 삭제
  1. 9 2
      classes/swupdate.bbclass

+ 9 - 2
classes/swupdate.bbclass

@@ -76,13 +76,20 @@ python do_swuimage () {
         if (filename != 'sw-description'):
             list_for_cpio += " " + 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)