Thread (8 messages) 8 messages, 3 authors, 2021-01-13

Re: [cip-dev] [isar-cip-core] [PATCH] swupdate-img.bbclass: add checksum in non signed case as well

From: Claudius Heine <hidden>
Date: 2021-01-13 12:51:51

Hi Jan,

On 2021-01-13 11:46, Jan Kiszka wrote:
On 11.01.21 16:48, Henning Schild wrote:
quoted
From: Claudius Heine <redacted>
Can you also provide a reasoning here?
I can, but I guess you mean that a commit message should be added here.

Our swupdate has `DISABLE_CPIO_CRC=y` (because our images might be >2GB) 
and we also currently support update via usb stick without any 
signatures. So the only checksum that we have would be the sha256sum 
inside the swdescription.

regards,
Claudius
quoted
Signed-off-by: Claudius Heine <redacted>
Signed-off-by: Henning Schild <redacted>
---
  classes/swupdate-img.bbclass | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/classes/swupdate-img.bbclass b/classes/swupdate-img.bbclass
index a21d6ec..a7a70f6 100644
--- a/classes/swupdate-img.bbclass
+++ b/classes/swupdate-img.bbclass
@@ -39,14 +39,14 @@ do_swupdate_image() {
          image_do_mounts
          cp -f '${SIGN_KEY}' '${WORKDIR}/dev.key'
          test -e '${SIGN_CRT}' && cp -f '${SIGN_CRT}' '${WORKDIR}/dev.crt'
-
-        # Fill in file check sums
-        for file in ${SWU_ADDITIONAL_FILES}; do
-            sed -i "s:$file-sha256:$(sha256sum '${WORKDIR}/swu/'$file | cut -f 1 -d ' '):g" \
-                '${WORKDIR}/swu/${SWU_DESCRIPTION_FILE}'
-        done
      fi
  
+    # Fill in file check sums
+    for file in ${SWU_ADDITIONAL_FILES}; do
+        sed -i "s:$file-sha256:$(sha256sum '${WORKDIR}/swu/'$file | cut -f 1 -d ' '):g" \
+            '${WORKDIR}/swu/${SWU_DESCRIPTION_FILE}'
+    done
+
      cd "${WORKDIR}/swu"
      for file in '${SWU_DESCRIPTION_FILE}' ${SWU_ADDITIONAL_FILES}; do
          echo "$file"
Jan
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

            PGP key: 6FF2 E59F 00C6 BC28 31D8 64C1 1173 CB19 9808 B153
                              Keyserver: hkp://pool.sks-keyservers.net

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help