Feat: Automate driver selection during FFU deployment

Adds a `DriverMapping.json` file to automate driver injection during image deployment.

Driver download tasks now generate or update this mapping file with the relative path for each successfully downloaded driver package.

The deployment script now uses this file to automatically detect and select the correct drivers for the target hardware, removing the need for manual selection. The manual driver selection prompt is retained as a fallback.
This commit is contained in:
rbalsleyMSFT
2025-06-26 17:45:31 -07:00
parent 40fd739b2c
commit 98c5946efd
9 changed files with 532 additions and 227 deletions
@@ -276,11 +276,17 @@ function Invoke-ParallelProcessing {
$localProgressQueue.Enqueue(@{ Identifier = $resultIdentifier; Status = $resultStatus })
}
$driverPathValue = $null
if ($null -ne $taskResult -and $taskResult.PSObject.Properties.Name -contains 'DriverPath') {
$driverPathValue = $taskResult.DriverPath
}
# Return a consistent hashtable structure (final result)
return @{
Identifier = $resultIdentifier
Status = $resultStatus # Return the final status
ResultCode = $resultCode
DriverPath = $driverPathValue
}
} -ThrottleLimit 5 -AsJob
@@ -383,10 +389,9 @@ function Invoke-ParallelProcessing {
$finalStatus = "$ErrorStatusPrefix Invalid Result Format"
$processedCount++ # Count as processed to avoid loop issues
}
# Add the received result (even if format was unexpected, for logging)
if ($null -ne $result) { $resultsCollection.Add($result) }
break # Only process first result from this job
}
# Add the received result (even if format was unexpected, for logging)
if ($null -ne $result) { $resultsCollection.Add($result) }
}
}
else {
# Job completed but had no data