소스 검색

Flag to disable packing of fetched files into SWU

Add INHIBIT_SWUPDATE_ADD_SRC_URI that disable to pack automatically all
files fetched into the SWU. This is useful when some files are required
to build the image, but they should not deployed. When
INHIBIT_SWUPDATE_ADD_SRC_URI is set, no fetched file is added to SWU.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Peter Marko 3 년 전
부모
커밋
482e049a52
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      classes/swupdate-common.bbclass

+ 6 - 3
classes/swupdate-common.bbclass

@@ -296,8 +296,6 @@ def swupdate_add_src_uri(d, list_for_cpio):
 
     s = d.getVar('S', True)
 
-    if d.getVar('SWUPDATE_SIGNING', True):
-        list_for_cpio.append('sw-description.sig')
     fetch = bb.fetch2.Fetch([], d)
 
     # Add files listed in SRC_URI to the swu file
@@ -386,8 +384,13 @@ python do_swuimage () {
     imgdeploydir = d.getVar('SWUDEPLOYDIR', True)
     shutil.copyfile(os.path.join(workdir, "sw-description"), os.path.join(s, "sw-description"))
 
+    if d.getVar('SWUPDATE_SIGNING', True):
+        list_for_cpio.append('sw-description.sig')
+
     # Add artifacts added via SRC_URI
-    swupdate_add_src_uri(d, list_for_cpio)
+    if not d.getVar('INHIBIT_SWUPDATE_ADD_SRC_URI', True):
+        swupdate_add_src_uri(d, list_for_cpio)
+
     # Add artifacts set via SWUPDATE_IMAGES
     swupdate_add_artifacts(d, list_for_cpio)