From afce451aaaadcee4f72bd373f49244b9cf5c0777 Mon Sep 17 00:00:00 2001 From: Matt Madison Date: Tue, 21 Jan 2025 04:04:46 -0800 Subject: [PATCH] tegra-helper-scripts: disable initrd-flash USB instance check USB instances might not be consistent between the Jetson boot ROM and the mass storage USB gadget in the running OS, so make the cross-check of the instance ID optional, and off by default. This means that when flashing secureboot-enabled devices using pre-signed binaries, only one target can be flashed at a time from a given host. Signed-off-by: Matt Madison --- .../tegra-binaries/tegra-helper-scripts/initrd-flash.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh b/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh index 901a34d2..49040033 100644 --- a/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh +++ b/recipes-bsp/tegra-binaries/tegra-helper-scripts/initrd-flash.sh @@ -48,6 +48,7 @@ sbk_keyfile= skip_bootloader=0 early_final_status=0 erase_nvme=0 +check_usb_instance="${TEGRAFLASH_CHECK_USB_INSTANCE:-no}" ARGS=$(getopt -n $(basename "$0") -l "usb-instance:,help,skip-bootloader,erase-nvme" -o "u:v:h" -- "$@") if [ $? -ne 0 ]; then @@ -267,7 +268,7 @@ wait_for_usb_storage() { if [ "$cand_model" = "$sessid" ]; then ok=yes fi - elif [ -n "$usbi" ]; then + elif [ -n "$usbi" -a "$check_usb_instance" = "yes" ]; then cand_devpath=$(udevadm info --query=property $candidate | grep '^DEVPATH=' | cut -d= -f2) if echo "$cand_devpath" | grep -q "/$usbi/" 2>/dev/null; then ok=yes