mirror of
				https://github.com/lingble/meta-tegra.git
				synced 2025-10-30 20:07:55 +00:00 
			
		
		
		
	init-flash.sh: Handle missing UDC initialization
This update adds a check for a missing UDC (USB Device Controller) variable to prevent errors related to uninitialized or absent UDCs, stopping the execution of the boot process if none is found. A missing UDC can result from various issues, such as an incorrect Device Tree Blob (DTB) configuration or misconfigured power regulators. By exiting early with a clear error message, this change helps diagnose and address the root cause more effectively. Signed-off-by: Pablo Rodriguez Quesada <pablo.aarch64@gmail.com>
This commit is contained in:
		| @@ -34,6 +34,10 @@ fi | |||||||
| [ -n "$sernum" ] || sernum="UNKNOWN" | [ -n "$sernum" ] || sernum="UNKNOWN" | ||||||
| echo "Serial number: $sernum" | echo "Serial number: $sernum" | ||||||
| UDC=$(ls -1 /sys/class/udc | head -n 1) | UDC=$(ls -1 /sys/class/udc | head -n 1) | ||||||
|  | if [ -z "$UDC" ]; then | ||||||
|  |     echo "Error: No UDC found in /sys/class/udc" >&2 | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
|  |  | ||||||
| wait_for_storage() { | wait_for_storage() { | ||||||
|     local file_or_dev="$1" |     local file_or_dev="$1" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Pablo Rodriguez
					Pablo Rodriguez