sdcard_image-rpi.bbclass: remove redundant IMAGEDATESTAMP
PATCH 1/1 sdcard_image-rpi.bbclass: remove redundant IMAGEDATESTAMP
The IMAGE_NAME variable already contains the date and time so it is redundant to also include the date again with IMAGEDATESTAMP when writing to image-version-info in the boot partition.
--- classes/sdcard_image-rpi.bbclass | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
classes/sdcard_image-rpi.bbclass +2 -6
@@ -71,10 +71,6 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" -IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "IMAGEDATESTAMP" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "DATETIME" - IMAGE_CMD_rpi-sdimg () { # Align partitions
@@ -143,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () { fi # Add stamp file - echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info :: # Burn Partitions dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
Signature · 1 line
2.9.3
Quoted 36 lines · Jonathan Liu
The
IMAGE_NAMEvariable already contains the date and time so it is redundant to also include the date again with IMAGEDATESTAMP when writing to image-version-info in the boot partition.Signed-off-by Jonathan Liu <[email protected]>--- classes/sdcard_image-rpi.bbclass | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)classes/sdcard_image-rpi.bbclass +2
-7@@ -71,10 +71,6 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" -IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "IMAGEDATESTAMP" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "DATETIME" - IMAGE_CMD_rpi-sdimg () { # Align partitions@@ -143,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () { fi # Add stamp file - echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info :: # Burn Partitions dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync --
Quoted 2 lines
2.9.3
Yes this is better solution than Khem's and mine
Andreas
Quoted 37 lines · Andreas Müller
Quoted 33 lines · Jonathan Liu
The
IMAGE_NAMEvariable already contains the date and time so it is redundant to also include the date again with IMAGEDATESTAMP when writing to image-version-info in the boot partition.Signed-off-by Jonathan Liu <[email protected]>---
classes/sdcard_image-rpi.bbclass | 8 ++------1 file changed, 2 insertions(+), 6 deletions(-)classes/sdcard_image-rpi.bbclass +0
-0@@ -71,10 +71,6 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.FATPAYLOAD ?= ""
classes/sdcard_image-rpi.bbclass +0
-4-IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "IMAGEDATESTAMP" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "DATETIME" -IMAGE_CMD_rpi-sdimg () {
# Align partitions
classes/sdcard_image-rpi.bbclass +2
-2@@ -143,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () { fi # Add stamp file - echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
Quoted 6 lines
Quoted 5 lines
classes/sdcard_image-rpi.bbclass +0
-1# Burn Partitions dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync --2.9.3
Yes this is better solution than Khem's and mine
seems so, I have staged it into kraj/master
Quoted 25 lines · Jonathan Liu
The
IMAGE_NAMEvariable already contains the date and time so it is redundant to also include the date again with IMAGEDATESTAMP when writing to image-version-info in the boot partition.Signed-off-by Jonathan Liu <[email protected]>--- classes/sdcard_image-rpi.bbclass | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)classes/sdcard_image-rpi.bbclass +0
-4@@ -71,10 +71,6 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" -IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "IMAGEDATESTAMP" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "DATETIME" - IMAGE_CMD_rpi-sdimg () { # Align partitions
classes/sdcard_image-rpi.bbclass IMAGE_CMD_rpi-sdimg () { · line 144
Quoted 8 lines
classes/sdcard_image-rpi.bbclass +2
-2@@ -143,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () { fi # Add stamp file - echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
I like this. Merged to master.
--
Andrei Gherzan
Unfortunately it doesn't fix the taskhash problem. It still happens on every build I perform:
core-image-minimal-1.0-r0 do_image_rpi_sdimg: Taskhash mismatch 536a3bcf4ac29225841c369636b533ff versus 8fadff5d0ef51aa648ed359d5dd7f944
In fact, every time I run a build I get the exact same two hashes.
Quoted 46 lines · Andrei Gherzan
Quoted 25 lines · Jonathan Liu
The
IMAGE_NAMEvariable already contains the date and time so it is redundant to also include the date again with IMAGEDATESTAMP when writing to image-version-info in the boot partition.Signed-off-by Jonathan Liu <[email protected]>--- classes/sdcard_image-rpi.bbclass | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)classes/sdcard_image-rpi.bbclass +0
-4@@ -71,10 +71,6 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" -IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "IMAGEDATESTAMP" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "DATETIME" - IMAGE_CMD_rpi-sdimg () { # Align partitionsclasses/sdcard_image-rpi.bbclass IMAGE_CMD_rpi-sdimg () { · line 144
Quoted 8 lines
classes/sdcard_image-rpi.bbclass +2
-2@@ -143,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () { fi # Add stamp file - echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::I like this. Merged to master.
--
Andrei Gherzan--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Hi Trevor,
See if the following helps:
bitbake -c cleanall core-image-minimal && bitbake core-image-minimal
Regards,
Jonathan
Quoted 56 lines · Trevor Woerner
Unfortunately it doesn't fix the taskhash problem. It still happens on every build I perform:
core-image-minimal-1.0-r0
do_image_rpi_sdimg: Taskhash mismatch536a3bcf4ac29225841c369636b533ffversus8fadff5d0ef51aa648ed359d5dd7f944In fact, every time I run a build I get the exact same two hashes.
Quoted 46 lines · Andrei Gherzan
Quoted 25 lines · Jonathan Liu
The
IMAGE_NAMEvariable already contains the date and time so it is redundant to also include the date again with IMAGEDATESTAMP when writing to image-version-info in the boot partition.Signed-off-by Jonathan Liu <[email protected]>--- classes/sdcard_image-rpi.bbclass | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)classes/sdcard_image-rpi.bbclass +0
-4@@ -71,10 +71,6 @@ SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. FATPAYLOAD ?= "" -IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "IMAGEDATESTAMP" -IMAGE_CMD_rpi-sdimg[vardepsexclude] += "DATETIME" - IMAGE_CMD_rpi-sdimg () { # Align partitionsclasses/sdcard_image-rpi.bbclass IMAGE_CMD_rpi-sdimg () { · line 144
Quoted 8 lines
classes/sdcard_image-rpi.bbclass +2
-2@@ -143,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () { fi # Add stamp file - echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info :: + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::I like this. Merged to master.
--
Andrei Gherzan--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Quoted 8 lines · Jonathan Liu
Hi Trevor,
See if the following helps:
bitbake -c cleanall core-image-minimal && bitbake core-image-minimalRegards,
Jonathan
Hi,
I would try a cleansstate for virtual/kernel too. In my meta.. fork I did:
* kick out huge parts of linux-raspberrypi-base.bbclass
* finally removed stamp file creation in sdcard_image-rpi.bbclass
* build from scratch
and did not see this message again - up to now...
Andreas
Quoted 2 lines · Jonathan Liu
See if the following helps:
bitbake -c cleanall core-image-minimal && bitbake core-image-minimal
Odd. I had started this email to say that this wasn't working (since this is exactly what I had tried a couple times over the last several days) and I find I can't reproduce the issue.
I was able to reproduce the issue a couple times earlier today, but to write this email I updates all repositories. There was no change (since yesterday) to meta-raspberrypi but openembedded-core had updates, and some of those updates required an update to bitbake. Now everything seems to work.
I'll keep an eye on it ;-)
Thanks and best regards,
Trevor
Quoted 13 lines · Trevor Woerner
Quoted 2 lines · Jonathan Liu
See if the following helps:
bitbake -c cleanall core-image-minimal && bitbake core-image-minimalOdd. I had started this email to say that this wasn't working (since this is exactly what I had tried a couple times over the last several days) and I find I can't reproduce the issue.
I was able to reproduce the issue a couple times earlier today, but to write this email I updates all repositories. There was no change (since yesterday) to meta-raspberrypi but openembedded-core had updates, and some of those updates required an update to bitbake. Now everything seems to work.
Quoted 4 lines
I'll keep an eye on it ;-)
Thanks and best regards,
Trevor
I ran into this issue again after wiping my build directory. I suspect it may be the kernel version checking logic causing the issue.
For a clean build directory:
$ bitbake -e core-image-minimal | grep ^RPI_KERNEL_VERSION RPI_KERNEL_VERSION="None"
For a used build directory:
$ bitbake -e core-image-minimal | grep ^RPI_KERNEL_VERSION RPI_KERNEL_VERSION="4.4.16"
Regards,
Jonathan