none
How to replace an existed driver with new one when building IoT Core image? RRS feed

  • Question

  • Hi,

    I am trying to build IoT Core image and want to add a new version driver into it.

    However, after following the instruction to build the image, I found that the driver version is still the old one.

    I also tried to follow step 3 of this instruction to update the cab file and it shew an error 0x80188306.

    Could anyone help me to solve this problem?

    Tuesday, September 3, 2019 6:29 AM

All replies

  • Hello Petercoin,

    You can try to use command devcon.exe remove to remove the device and unload the driver, and then reinstall the new version with the cab file or use DevCon Install to install the new driver with inf file.

    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, September 3, 2019 9:07 AM
    Moderator
  • Hi Michael,

    Thank you, I will try it.

    The driver is from Realtek and the driver version is 10.33.0419.2019.

    The original one in IoT Core is 10.5.920.2015.

    Tuesday, September 3, 2019 9:12 AM
  • Hello Petercoin,

    Please feel free let me know if you fix the issue. BTW, please note which platform(x86 or arm) the driver is compatible with.

    Best Regards,

    Michael


    Tuesday, September 3, 2019 9:50 AM
    Moderator
  • Hi Michael,

    It works after using devcon remove to remove the driver, and using devcon install to install new driver.

    However, is there any ways to integrate the driver into the ffu image?

    Besides, the Realtek USB LAN dongle driver is for x86 platform with x64 Windows only.

    Tuesday, September 3, 2019 10:15 AM
  • Were you able to successfully create the driver package using Add-IoTDriverPackage and then create the CAB file?

    Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com

    Tuesday, September 3, 2019 7:34 PM
  • Hi Sean,

    I used Add-IoTDriverPackage rtux64w10.inf Drivers.RTUX64W10 APLx64 to create the cab file and then

    use New-IoTCabPackage Drivers.RUTX64W10 to build the package.

    After that, I used Add-IoTProductFeature Product Test DRIVERS_RTUX64W10 -OEM to update the project configuration file.

    Finally, I used New-IoTFFUImage Product Test to build the ffu image.

    However, I got some error messages as below:

    imageapp : ERROR : ThreadId24188 [00:00:01] 'Error - File collision detected, file '\Windows\System32\Drivers\rtux64w10.sys' found in packages 'Microsoft-IoTUAP-Product-Package~31bf3856ad364e35~amd64~~' and 'MiTAC.Drivers.RTUX64W10~31bf3856ad364e35~amd64~~'.': 80188306 [Error,Facility=(0018),Code=33542 (0x8306)]
    imageapp : ERROR : ThreadId24188 [00:00:01] 'Failed to calculate update order': 80188306 [Error,Facility=(0018),Code=33542 (0x8306)]
    imageapp : ERROR : ThreadId24188 [00:00:01] 'Package verification failed': 80188306 [Error,Facility=(0018),Code=33542 (0x8306)]
    imageapp : ERROR : ThreadId24188 Imaging!UpdateImage: Failed call to UpdateDLL::PrepareUpdate with error code: -2145877242 (0x80188306)

    Could you help to check this?

    Wednesday, September 4, 2019 2:39 AM
  • Hello Petercoin,

    The driver is packed in the package Microsoft-IoTUAP-Product-Package~31bf3856ad364e35~amd64~~.cab, which you can find in folder 'Windows Kits\10\MSPackages\retail\amd64\fre'. When you unzip the cab file, you will find rtux64w10.inf in 'amd64_dual_rtux64w10.inf_31bf3856ad364e35_10.0.17763.1_none_586db0bc0f206fbf'.

    You may try to replace rtux64w10.inf and rtux64w10.sys with new version, and then re-zip the cab file, and then build the image. In general, New-IoTCabPackage is used to add a non-exist package.

    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 4, 2019 3:28 AM
    Moderator
  • Hi Michael,

    Does it mean I need to modify the IoT Core package downloaded from Microsoft?

    And then I may need to maintain cab files for different projects?

    If yes, this doesn't make sense because I need to modify the original source directly.

    Will Microsoft provide other way to do this such as patch it when build the image?

    Wednesday, September 4, 2019 6:03 AM
  • Hello Petercoin,

    Yes, that means you need to modify the IoT Core package for upgrading the OS driver. As far as i know, Microsoft does not provide other way to update the OS driver. You can post this issue via Feedback Hub App.

    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Petercoin Wednesday, September 4, 2019 7:33 AM
    • Unmarked as answer by Petercoin Tuesday, September 10, 2019 2:12 AM
    Wednesday, September 4, 2019 7:29 AM
    Moderator
  • Hi Michael,

    Thank you!

    I will post for this issue.

    Wednesday, September 4, 2019 7:33 AM
  • Hello Petercoin,

    I also contacted with related group for asking help. If there is any response, i will update here.

    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 4, 2019 8:29 AM
    Moderator
  • Hi Michael,

    I am able to use makecab to repack all the files now.

    However, when I executed buildimage, there was an error occurred.

    System.Exception: Failed to read manifest in \\?\C:\Program Files (x86)\Windows Kits\10\MSPackages\Retail\AMD64\fre\Microsoft-IoTUAP-Product-Package~31bf3856ad364e35~AMD64~~.cab ---> System.Exception: CabToolBox::ExtractToBuffer: Cab extract failed with error code '-2145877310' for package '\\?\C:\Program Files (x86)\Windows Kits\10\MSPackages\Retail\AMD64\fre\Microsoft-IoTUAP-Product-Package~31bf3856ad364e35~AMD64~~.cab' and file name 'update.mum'.

    It seems that I need to update the update.mum file.

    Therefore, I tried to check the mum file and found that it looked like this:

    <file name="$(runtime.bootdrive)\Windows\System32\Drivers\rtux64w10.sys" size="411648" staged="223037" compressed="223037" sourcePackage="Microsoft-OneCore-IoTUAP-Network-Drivers-Package" cabpath="amd64_dual_rtux64w10.inf_31bf3856ad364e35_10.0.17763.253_none_dc6381533caadb12\rtux64w10.sys" />

    I am not sure what staged and compressed stand for.

    Could you kindly advise on this?

    Friday, September 6, 2019 10:20 AM
  • Hi Michael,

    Is there any comments?

    Thank you~

    Wednesday, September 11, 2019 6:31 AM
  • Hello Petercoin,

    I did not find the description about staged and compressed in Manifest File Schema. But i find the content in the origin update.mum.

    <file name="amd64_dual_rtux64w10.inf_31bf3856ad364e35_10.0.17763.1_none_586db0bc0f206fbf.manifest" size="422905" staged="86026" compressed="86026" sourcePackage="Microsoft-OneCore-IoTUAP-Network-Drivers-Package" cabpath="amd64_dual_rtux64w10.inf_31bf3856ad364e35_10.0.17763.1_none_586db0bc0f206fbf.manifest" />

    I'm not sure why the size is so big difference. Which CompressionType did you use when making the cab file?

    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 11, 2019 7:02 AM
    Moderator
  • Hi Michael,

    The size is for the source file and the inf file I have includes a lot of information because it is not minimized like the original one in IoT Core package.

    After doing some researches, I think the update.cat and update.mum files may be for validating if the files are modified after the cab file is published.

    Therefore, once I want to replace the files in cab file, I think I may need to update these two files.

    Is it correct?

    If yes, is there any way to create this two files for uses to create a correct cab package?

    Thanks.

    Wednesday, September 11, 2019 8:42 AM
  • Hello Petercoin,

    Yes, the size is used to verify the file. You may try to use Dism tool to add the package to the mum file. 

    DISM /Online /Add-Package /PackagePath:"<full file specification, including path>"

    We can use Dism tool  to Compress operating system and provisioning packages in Windows 10.

    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 11, 2019 9:17 AM
    Moderator
  • Hi Michael,

    Could you give me more information?

    As I know, DISM is used to add package for a running OS or image, is it correct?

    Do you mean I can use DISM to update the driver in the IoT Core ffu image?

    Thanks.

    Peter

    Wednesday, September 11, 2019 9:30 AM
  • Hi Michael,

    Any comments?

    Wednesday, September 18, 2019 10:20 AM
  • Hello Petercoin,

    Yes, you may try to use DISM tool to update the driver in the ffu image.

    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, September 23, 2019 5:58 AM
    Moderator
  • Hi Michael,

    I have tried offline modification but IoT Core ffu seems not be supported by dism.

    Please refer to below link.

    Use DISM to flash Windows 10 IoT Core

    And online modification is not what I want because my purpose is to create a ffu image with updated driver before releasing it to user.

    It seems there is no way to do it at this time, is it correct?


    • Edited by Petercoin Monday, October 7, 2019 3:04 AM
    Monday, October 7, 2019 3:03 AM