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: "Jan Kiszka" <jan.kiszka@siemens.com>
Date: 2021-01-13 10:55:12

On 13.01.21 11:52, Claudius Heine wrote:
Hi Jan,

On 2021-01-13 11:46, Jan Kiszka wrote:
quoted
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.
...or that you provide me a text I can fill in on merge.

Jan
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
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

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

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