Commit cbdb479c3ed9776be0b27ba9f3ee578973067ef8

Authored by Eric Lee
1 parent e854d88f22

Fix flash eMMC script

Showing 1 changed file with 62 additions and 4 deletions Side-by-side Diff

scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
... ... @@ -386,10 +386,68 @@
386 386 mkdir -p ${P2_MOUNT_DIR}/opt/images/Yocto
387 387  
388 388 # Copy image for eMMC
389   - if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-${MACHINE}.tar.bz2 ]; then
390   - pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-${MACHINE}.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
391   - else
392   - echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  389 + if [[ "${MACHINE}" = "smarcimx8mp2gdesktop" ]]; then
  390 +
  391 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mp2g.tar.bz2 ]; then
  392 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mp2g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  393 + else
  394 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  395 + fi
  396 + elif [[ "${MACHINE}" = "smarcimx8mp4gdesktop" ]]; then
  397 +
  398 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mp4g.tar.bz2 ]; then
  399 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mp4g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  400 + else
  401 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  402 + fi
  403 + elif [[ "${MACHINE}" = "smarcimx8mp6gdesktop" ]]; then
  404 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mp6g.tar.bz2 ]; then
  405 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mp6g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  406 + else
  407 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  408 + fi
  409 + elif [[ "${MACHINE}" = "pitximx8mp2gdesktop" ]]; then
  410 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-pitximx8mp2g.tar.bz2 ]; then
  411 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-pitximx8mp2g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  412 + else
  413 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  414 + fi
  415 + elif [[ "${MACHINE}" = "pitximx8mp4gdesktop" ]]; then
  416 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-pitximx8mp4g.tar.bz2 ]; then
  417 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-pitximx8mp4g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  418 + else
  419 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  420 + fi
  421 + elif [[ "${MACHINE}" = "pitximx8mp6gdesktop" ]]; then
  422 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-pitximx8mp6g.tar.bz2 ]; then
  423 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-pitximx8mp6g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  424 + else
  425 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  426 + fi
  427 + elif [[ "${MACHINE}" = "smarcimx8qm8gdesktop" ]]; then
  428 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8qm8g.tar.bz2 ]; then
  429 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8qm8g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  430 + else
  431 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  432 + fi
  433 + elif [[ "${MACHINE}" = "smarcimx8qm4gdesktop" ]]; then
  434 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8qm4g.tar.bz2 ]; then
  435 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8qm4g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  436 + else
  437 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  438 + fi
  439 + elif [[ "${MACHINE}" = "smarcimx8mq2gdesktop" ]]; then
  440 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mq2g.tar.bz2 ]; then
  441 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mq2g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  442 + else
  443 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  444 + fi
  445 + elif [[ "${MACHINE}" = "smarcimx8mq4gdesktop" ]]; then
  446 + if [ -f ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mq4g.tar.bz2 ]; then
  447 + pv ${YOCTO_IMGS_PATH}/${YOCTO_DEFAULT_IMAGE}-smarcimx8mq4g.tar.bz2 > ${P2_MOUNT_DIR}/opt/images/Yocto/rootfs.tar.bz2
  448 + else
  449 + echo "rootfs.tar.gz file is not present. Installation on \"eMMC\" will not be supported."
  450 + fi
393 451 fi
394 452  
395 453 echo