mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-28 19:12:39 +00:00
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 <matt@madison.systems>
This commit is contained in:
@@ -48,6 +48,7 @@ sbk_keyfile=
|
|||||||
skip_bootloader=0
|
skip_bootloader=0
|
||||||
early_final_status=0
|
early_final_status=0
|
||||||
erase_nvme=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" -- "$@")
|
ARGS=$(getopt -n $(basename "$0") -l "usb-instance:,help,skip-bootloader,erase-nvme" -o "u:v:h" -- "$@")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
@@ -267,7 +268,7 @@ wait_for_usb_storage() {
|
|||||||
if [ "$cand_model" = "$sessid" ]; then
|
if [ "$cand_model" = "$sessid" ]; then
|
||||||
ok=yes
|
ok=yes
|
||||||
fi
|
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)
|
cand_devpath=$(udevadm info --query=property $candidate | grep '^DEVPATH=' | cut -d= -f2)
|
||||||
if echo "$cand_devpath" | grep -q "/$usbi/" 2>/dev/null; then
|
if echo "$cand_devpath" | grep -q "/$usbi/" 2>/dev/null; then
|
||||||
ok=yes
|
ok=yes
|
||||||
|
|||||||
Reference in New Issue
Block a user