Skip to contentSkip to conversation

sdcard_image-rpi.bbclass: Fix do_image_rpi_sdimg tashhash mismatch

PATCH Applied Jonathan Liu 3 participants 3 messages Apr 29, 2016 – May 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sdcard_image-rpi.bbclass: Fix do_image_rpi_sdimg tashhash mismatch

IMAGE_CMD_rpi-sdimg() uses the IMAGEDATESTAMP variable, so the taskhash of the function keeps changing. This results in a taskhash mismatch error.

Fix this by excluding the IMAGEDATESTAMP variable from the checksum.

Change-Id Ie6f30ad29e279d5312ec655ac4a3bf246c8a04de
---
 classes/sdcard_image-rpi.bbclass | 1 +
 1 file changed, 1 insertion(+)
classes/sdcard_image-rpi.bbclass +1 -0
index 1b055bd..989d77a 100644
@@ -67,6 +67,7 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg"
 FATPAYLOAD ?= ""
 
 IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
+IMAGE_CMD_rpi-sdimg[vardepsexclude] = "IMAGEDATESTAMP"
 
 IMAGE_CMD_rpi-sdimg () {
 
Signature · 1 line
2.8.0
#1 lore raw

2016-04-29 03:57 skrev Jonathan Liu:

Quoted 1 line

IMAGE_CMD_rpi-sdimg() uses

the IMAGEDATESTAMP variable, so the taskhash

Quoted 1 line

of the function keeps

changing. This results in a taskhash mismatch

Quoted 3 lines

error.

Fix this by

excluding the IMAGEDATESTAMP variable from the checksum.

Quoted 2 lines

Change-Id:

Ie6f30ad29e279d5312ec655ac4a3bf246c8a04de

Quoted 1 line
Signed-off-by Jonathan Liu

<[email protected]>

Quoted 3 lines

---
classes/sdcard_image-rpi.bbclass | 1 +
1

file changed, 1 insertion(+)

Quoted 2 lines

diff --git

a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass

Quoted 1 line

index 1b055bd..989d77a 100644

Quoted 2 lines

--- a/classes/sdcard_image-rpi.bbclass

+++ b/classes/sdcard_image-rpi.bbclass

Review SDIMG =

Quoted 1 line
(quoted diff) +0 -0
@@ -67,6 +67,7 @@ SDIMG =

"${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg"

Quoted 1 line

FATPAYLOAD ?=

""

Quoted 3 lines

IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"

+IMAGE_CMD_rpi-sdimg[vardepsexclude] = "IMAGEDATESTAMP"

Quoted 2 lines

IMAGE_CMD_rpi-sdimg () {

Quoted 3 lines
Signature · 2 lines
-- 
2.8.0

Hi Andrei,

Any plans for
merging this patch soon? I have been using it in my tree for quite some time and the fix seems reasonable and solves the annoying taskhash problem when creating the image.

BR Petter

Petter Mabäcker

Technux
<[email protected]>
www.technux.se

#2 lore raw
In reply to Jonathan Liu
Quoted 17 lines · Jonathan Liu

IMAGE_CMD_rpi-sdimg() uses the IMAGEDATESTAMP variable, so the taskhash of the function keeps changing. This results in a taskhash mismatch error.

Fix this by excluding the IMAGEDATESTAMP variable from the checksum.

Change-Id Ie6f30ad29e279d5312ec655ac4a3bf246c8a04de
---
 classes/sdcard_image-rpi.bbclass | 1 +
 1 file changed, 1 insertion(+)
classes/sdcard_image-rpi.bbclass +0 -0
index 1b055bd..989d77a 100644

classes/sdcard_image-rpi.bbclass SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" · line 73

Quoted 7 lines
classes/sdcard_image-rpi.bbclass +1 -0
@@ -67,6 +67,7 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg"
 FATPAYLOAD ?= ""
 
 IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
+IMAGE_CMD_rpi-sdimg[vardepsexclude] = "IMAGEDATESTAMP"
 
 IMAGE_CMD_rpi-sdimg () {
 

Merged to master. Thanks.

--
Andrei Gherzan