diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2023-03-27 17:09:33 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2023-05-10 14:21:56 +0200 |
commit | c94fe755e6dbc24f6558d4490b7de98f2257f3b6 (patch) | |
tree | eaecd982bec0d0757e1f72d5cc0e9bc844775a72 /recipes-bsp | |
parent | d99284cfa23f114de55126af2647d58cf7ba3a54 (diff) |
image_type_dfu: drop this image type
As we now have a working Toradex Easy Installer this bringup way
of flashing images is no longer needed.
Related-to: TEI-1066
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/dfu-metadata/dfu-metadata_0.1.bb | 41 | ||||
-rwxr-xr-x | recipes-bsp/dfu-metadata/files/bmaptool.sh | 66 | ||||
-rwxr-xr-x | recipes-bsp/dfu-metadata/files/recovery-linux.sh | 32 |
3 files changed, 0 insertions, 139 deletions
diff --git a/recipes-bsp/dfu-metadata/dfu-metadata_0.1.bb b/recipes-bsp/dfu-metadata/dfu-metadata_0.1.bb deleted file mode 100644 index 59fdb12..0000000 --- a/recipes-bsp/dfu-metadata/dfu-metadata_0.1.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "DFU installer tarball" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -SRC_URI = " \ - file://recovery-linux.sh \ - file://bmaptool.sh \ -" - -DFU_DEPLOYDIR = "${DEPLOYDIR}/${BPN}" - -inherit deploy nopackages - -DEPENDS = "bmap-tools-native dfu-util-native virtual/bootloader" -do_deploy[mcdepends] = "mc::k3r5-gp:ti-sci-fw:do_deploy" - -do_deploy () { - install -d ${DFU_DEPLOYDIR}/recovery/bmaptools/ - install -m 755 ${WORKDIR}/recovery-linux.sh ${DFU_DEPLOYDIR}/ - install -m 755 ${RECIPE_SYSROOT_NATIVE}/usr/bin/dfu-util ${DFU_DEPLOYDIR}/recovery/ - install -m 755 ${RECIPE_SYSROOT_NATIVE}/usr/bin/bmaptool ${DFU_DEPLOYDIR}/recovery/ - install -m 755 ${WORKDIR}/bmaptool.sh ${DFU_DEPLOYDIR}/recovery/ - install -m 644 ${RECIPE_SYSROOT_NATIVE}/usr/lib/python3.10/site-packages/bmaptools/*.py ${DFU_DEPLOYDIR}/recovery/bmaptools/ - install -m 644 ${DEPLOY_DIR_IMAGE}/tiboot3-am62x-gp-evm.bin-dfu ${DFU_DEPLOYDIR} - install -m 644 ${DEPLOY_DIR_IMAGE}//tiboot3.bin ${DFU_DEPLOYDIR}/ - install -m 644 ${DEPLOY_DIR_IMAGE}/tispl.bin ${DFU_DEPLOYDIR}/ - install -m 644 ${DEPLOY_DIR_IMAGE}/u-boot.img ${DFU_DEPLOYDIR}/ - - # fixup oe specific #! - sed -i 's%.usr.bin.env.*python.*%/usr/bin/env python%' ${DFU_DEPLOYDIR}/recovery/bmaptool - - # fixup oe specific dynamic loader path - INTERPRETER=$(patchelf-uninative --print-interpreter $(which bash)) - patchelf-uninative --set-interpreter $INTERPRETER ${DFU_DEPLOYDIR}/recovery/dfu-util -} - -addtask deploy before do_build after do_install - -COMPATIBLE_MACHINE = "(verdin-am62)" - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/recipes-bsp/dfu-metadata/files/bmaptool.sh b/recipes-bsp/dfu-metadata/files/bmaptool.sh deleted file mode 100755 index 3f589a3..0000000 --- a/recipes-bsp/dfu-metadata/files/bmaptool.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -Usage() { - echo "Writes a diskimage to a block device" - echo "" - echo "Usage: $0 <wic.gz> <block-device>" - echo " eg: $0 Apalis-iMX8_Qt5-X11-Image.rootfs.wic.gz /dev/mmcblk0" - echo "There must be a wic.bmap file at the same place as the wic.gz file" - echo "You need the bmap tools installed and the variable BMAPTOOL must point to it" - exit 0 -} - -[ -z "$BMAPTOOL" ] && BMAPTOOL="/opt/bmap-tools/bmaptool" -if [ ! -x $BMAPTOOL ]; -then - echo "$BMAPTOOL" is not an executable - exit 1 -fi -echo "$BMAPTOOL" - -while getopts "h" Option ; do - case $Option in - h) Usage - exit 0 - ;; - esac -done - -# test for exact 2 arguments -if [ $# -ne 2 ]; -then - Usage - exit 1 -fi - -WIC=$1 -BLK=$2 - -if [ ! -e $WIC ]; -then - echo $WIC does not exist - exit 1 -fi - -BMAP=`dirname $WIC`/`basename -s .gz $WIC`.bmap -if [ ! -e $BMAP ]; -then - BMAP=`dirname $WIC`/`basename -s .xz $WIC`.bmap - if [ ! -e $BMAP ]; - then - echo $BMAP does not exist, creating it - bmaptool create -o $BMAP $WIC - fi -fi - -# test if the blk device might not be a SD-Card -lsblk $BLK -do name,tran | egrep "(usb|mmcblk)" > /dev/null -if [ $? -ne 0 ]; -then - echo $BLK seems to not be removable storage - lsblk -do name,rm,tran - exit 1 -fi - -sudo umount ${BLK}? -sudo $BMAPTOOL copy --bmap $BMAP $WIC $2 diff --git a/recipes-bsp/dfu-metadata/files/recovery-linux.sh b/recipes-bsp/dfu-metadata/files/recovery-linux.sh deleted file mode 100755 index c613b5a..0000000 --- a/recipes-bsp/dfu-metadata/files/recovery-linux.sh +++ /dev/null @@ -1,32 +0,0 @@ -if which dfu-util 2>&1 > /dev/null -then - DFU_UTIL=$(which dfu-util) 2>&1 > /dev/null -else - echo "Install dfu-util from your distro should the provided one not work with your distro" - DFU_UTIL=recovery/dfu-util -fi - -# boot to U-Boot from USB -sudo $DFU_UTIL -w -R -a bootloader --device 0451:6165 -D tiboot3-am62x-gp-evm.bin-dfu -sudo $DFU_UTIL -w -R -a tispl.bin --device 0451:6165 -D tispl.bin -sudo $DFU_UTIL -w -R -a u-boot.img --device 0451:6165 -D u-boot.img - -# U-Boot starts DFU, flash U-Boot to eMMC -sudo $DFU_UTIL -w -a tiboot3.bin.raw --device 0451:6165 -D tiboot3.bin -sudo $DFU_UTIL -w -a tispl.bin.raw --device 0451:6165 -D tispl.bin -sudo $DFU_UTIL -w -R -a u-boot.img.raw --device 0451:6165 -D u-boot.img - -# U-Boot starts UMS, wait for the device to appear -UMS_DEV=$(lsblk -I 8 -dp --output "MODEL,NAME" | grep UMS | sed 's#.*\(/dev/sd[a-z]\).*#\1#') -while [ -z $UMS_DEV ]; do - sleep 1; - echo 'Waiting for UMS...'; - UMS_DEV=$(lsblk -I 8 -dp --output "MODEL,NAME" | grep UMS | sed 's#.*\(/dev/sd[a-z]\).*#\1#') -done -# give it some time to settle in. -sleep 2 -sudo umount ${UMS_DEV}?* - -WIC=$(ls *.wic.??) -# use bmap-tool to flash eMMC user area -BMAPTOOL=$(realpath recovery/bmaptool) recovery/bmaptool.sh $WIC $UMS_DEV |