ソースを参照

swupdate-common: Make cpio archive reproducible

To be able to regenerate cpio files such as .swu files, we need
to remove sources of differences that can't be easily controlled,
such as c_dev and c_ino in the CPIO header.
This can be done by providing parameter --reproducible to cpio.
From `cpio --help` :
      --device-independent, --reproducible
                             Create device-independent (reproducible)
archives
Reviewed-by: Stefano Babic <sbabic@denx.de>
Bertrand Roussel 2 年 前
コミット
9181ddc637
1 ファイル変更1 行追加1 行削除
  1. 1 1
      classes/swupdate-common.bbclass

+ 1 - 1
classes/swupdate-common.bbclass

@@ -289,7 +289,7 @@ def swupdate_create_cpio(d, swudeploydir, list_for_cpio):
     s = d.getVar('S', 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 > ' + os.path.join(swudeploydir, updateimage)
+    line = 'for i in ' + ' '.join(list_for_cpio) + '; do echo $i;done | cpio -ov -H crc --reproducible > ' + os.path.join(swudeploydir, updateimage)
     os.system(line)
     os.chdir(swudeploydir)
     updateimage_link = d.getVar('IMAGE_LINK_NAME', True)