You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/03 13:22:04 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #3648: tools/esp32/mk_qemu_img.sh: Refactor the dd commands.

Ouss4 commented on a change in pull request #3648:
URL: https://github.com/apache/incubator-nuttx/pull/3648#discussion_r625081034



##########
File path: tools/esp32/mk_qemu_img.sh
##########
@@ -82,10 +89,10 @@ printf "Generating %s...\n" "${FLASH_IMG}"
 printf "\tBootloader: %s\n" "${BOOTLOADER_IMG}"
 printf "\tPartition Table: %s\n" "${PARTITION_IMG}"
 
-dd if=/dev/zero bs=1024 count=4096 of="${FLASH_IMG}" && \
-dd if="${BOOTLOADER_IMG}" bs=1 seek="$(printf '%d' 0x1000)" of="${FLASH_IMG}" conv=notrunc && \
-dd if="${PARTITION_IMG}" bs=1 seek="$(printf '%d' 0x8000)" of="${FLASH_IMG}" conv=notrunc && \
-dd if="${NUTTX_IMG}" bs=1 seek="$(printf '%d' 0x10000)" of="${FLASH_IMG}" conv=notrunc
+dd if=/dev/zero bs=1024 count=4096 of="${FLASH_IMG}" status=none
+imgappend ${FLASH_IMG} ${BOOTLOADER_IMG} ${BOOTLOADER_OFFSET}

Review comment:
       It will do the same thing the older version was doing.  (Not so) Silently writing the given binaries.  This isn't a test we can do with `dd`.  Maybe `esptool.py` can do that.
   In both case, with wrong binaries, that's a boot loop for us.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org