question

dvescovi avatar image
0 Votes"
dvescovi asked Criszhan-msft commented

Iot Core build with DeviceLayoutPackages with MBR

I created a new workspace for a new arm64 target using the ADK PS script.
This worked fine.
I created a new BSP using the "newbsp" command.
This also worked fine.
Did a "newproduct ProductA MYBSP:, "buildpkg ALL" and a "buildimage ProductA Test" again this all worked fine and I was able to generate a small default Flash.ffu image.

As I want to use a MBR disk instead of the default GPT partition I edited my MYBSPFM.xml file and ONLY changed the following two lines:

   <DeviceLayoutPackages>
     <!-- GPT 4GB layout  -->
     <PackageFile SOC="MYBSP_SOC" Path="%PKGBLD_DIR%" Name="%OEM_NAME%.DeviceLayout.GPT4GB.cab"/>
   </DeviceLayoutPackages>
    
   <OEMDevicePlatformPackages>
     <!-- GPT 4GB layout  -->
     <PackageFile Device="MYBSP_Device" Path="%PKGBLD_DIR%" Name="%OEM_NAME%.DeviceLayout.GPT4GB.cab"/>
   </OEMDevicePlatformPackages>

changed to:

   <DeviceLayoutPackages>
     <!-- MBR 4GB layout  -->
     <PackageFile SOC="MYBSP_SOC" Path="%PKGBLD_DIR%" Name="%OEM_NAME%.DeviceLayout.MBR4GB.cab"/>
   </DeviceLayoutPackages>
    
   <OEMDevicePlatformPackages>
     <!-- MBR 4GB layout  -->
     <PackageFile Device="MYBSP_Device" Path="%PKGBLD_DIR%" Name="%OEM_NAME%.DeviceLayout.MBR4GB.cab"/>
   </OEMDevicePlatformPackages>

That was the only change.
I then created a new ProductB, buildpkg All and buildimage ProductB Test.

The image generation fails with:

 PS C:\RPI\iotcore\myworkspace2>buildimage ProductB Test
 ADK_VERSION : 10.0.17763.1
 IOTCORE_VER : 10.0.17763.253
 BSP_VERSION : 10.0.0.0
 ADDONKITVER : 7.0.210203.1200
 HostOS Info : Microsoft Windows 10 Pro - 10.0.19043 - en-US
 Error: Host OS Enterprise Edition required for using Security functions such as Device Guard
 Validating product feature ids
 Reading feature ids in C:\iotcore\myworkspace2\Source-arm64\BSP\MYBSP\Packages\MYBSPFM.xml
 Reading feature ids in C:\iotcore\myworkspace2\Common\Packages\OEMCommonFM.xml
 Checking Microsoft features in OEMInput file..
 Checking OEM features in OEMInput file..
 Building product specific packages
 Processing Registry.Version.wm.xml
 Processing Custom.Cmd.wm.xml
 Processing Provisioning.Auto.wm.xml
 Building FM files..
 Exporting OEM FM files..
 Processing OEMFMList..
 Exporting MYBSP BSP FM files
 Processing MYBSPFMFileList.xml
 Creating Image..
 See C:\iotcore\myworkspace2\Build\arm64\ProductA_Test.log for progress
 This will take a while...
 ThreadId1000 ERROR: Imaging!FinalizeImage: Failed to finalize the FFU: ReadFromRegistry: There was a problem accessing the Description key for object {01de5a27-8705-40db-bad6-96fa5187d4a6}
 ThreadId1000 ERROR:     ReadFromRegistry: There was a problem accessing the Description key for object {01de5a27-8705-40db-bad6-96fa5187d4a6}System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.WindowsPhone.Imaging.BcdObject.ReadFromRegistry(OfflineRegistryHandle objectKey)
 Error: Build failed
 False
 IoTCorePShell arm64 10.0.0.0 Test
 PS C:\iotcore\myworkspace2>


Can anyone explain this error and how to resolve?





windows-iot-10core
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I used the BSP provided by Raspberry Pi 2 for testing, and no errors were encountered. I also only modified DeviceLayoutPackages and OEMDevicePlatformPackages in BSPFM.xml, but from MBR to GPT, because Raspberry Pi 2 uses MBR-style partitions.

Because this is a BSP created by youself, the problem is always difficult to diagnose.

0 Votes 0 ·

0 Answers