raspberrypi / windows-drivers

Windows IOT drivers
MIT License
121 stars 33 forks source link

error importing ARM64 BSP using script #35

Closed dvescovi1 closed 3 years ago

dvescovi1 commented 3 years ago

I generated an ARM64 workspace using this IoT ADK add on kit. like:

PS C:\iot-adk-addonkit\Workspace>new-ws C:\RPI\iotcore\myrpi4arm64workspace Contoso arm64
New IoTWorkSpace available at C:\RPI\iotcore\myrpi4arm64workspace for arm64
Opening workspace : C:\RPI\iotcore\myrpi4arm64workspace\IoTWorkspace.xml
arm64 IoT Core kit version 10.0.17763.253 found
Corekit install path found OK
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
IOTWKSPACE  : C:\RPI\iotcore\myrpi4arm64workspace
OEM_NAME    : Contoso
BSP_ARCH    : arm64
BSPPKG_DIR  : C:\RPI\iotcore\myrpi4arm64workspace\Build\arm64\pkgs
MSPKG_DIR   : C:\Program Files (x86)\Windows Kits\10\MSPackages\Retail\arm64\fre
Copying Registry.Version
Copying Custom.Cmd
Copying Provisioning.Auto
Copying OEM.Sample
Copying Device.SystemInformation
Copying DeviceLayout.GPT4GB
Copying DeviceLayout.GPT8GB-R
Copying DeviceLayout.MBR4GB
Copying DeviceLayout.MBR8GB-R
Workspace ready!
IoTCorePShell arm64 10.0.0.0 Test
PS C:\RPI\iotcore\myrpi4arm64workspace>importpkg *
Copying Appx.Certs
Copying Custom.BCD
Copying Custom.OOBEApp
Copying Custom.Settings
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\Packages\Device.SystemInformation already exist.
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\Packages\DeviceLayout.GPT4GB already exist.
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\Packages\DeviceLayout.GPT8GB-R already exist.
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\Packages\DeviceLayout.MBR4GB already exist.
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\Packages\DeviceLayout.MBR8GB-R already exist.
Copying Recovery.GPT-BCD
Copying Recovery.GPT-BcdEdit
Copying Recovery.MBR-BCD
Copying Recovery.MBR-BcdEdit
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\Packages\Registry.Version already exist.
Copying Security.BitLocker
Copying Security.DeviceGuard
Copying Security.DeviceGuardTest
Copying Security.RootCerts
Copying Security.SecureBoot
Copying Security.SecureBootTest
Copying Settings.HotKey
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Source-arm64\Packages\OEM.Sample already exist.
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\ProdPackages\Custom.Cmd already exist.
Warning: C:\RPI\iotcore\myrpi4arm64workspace\Common\ProdPackages\Provisioning.Auto already exist.
Copying Recovery.WinPE
IoTCorePShell arm64 10.0.0.0 Test
PS C:\RPI\iotcore\myrpi4arm64workspace>importbsp RPi c:\Release\RPi_BSP_ARM64_Release.zip
Extracting BSP zip into the temporary directory C:\RPI\iotcore\myrpi4arm64workspace\BSPDIR
Processing C:\RPI\iotcore\myrpi4arm64workspace\BSPDIR\RPi
Error: Incorrect BSP arch. Found arm, expected arm64
IoTCorePShell arm64 10.0.0.0 Test
PS C:\RPI\iotcore\myrpi4arm64workspace>

This looks like it created my ARM64 workspace correctly. I then imported all packages using the "importpkg *" This also seems to have worked fine. I then tried to import my "built for ARM64" BSP and got the failure "Incorrect BSP arch. Found arm, expected arm64" I am not sure this is an ADK import problem or the fact I used the "binexport.ps1" script from the github https://github.com/raspberrypi/windows-drivers

That script seems to have a hard coded path at line 30:

$bindir = $RootDir + "build\bcm2836\ARM\$buildconfig\"

I changed the "ARM" to "ARM64" and was able to generate to RPi_BSP_Release.zip but it has problems importing

driver1998 commented 3 years ago

XHCI USB doesn't work on 17763 on Pi4, so I don't think that would be that useful. If you are working on Pi3, I do have a semi-working script on my local machine...

driver1998 commented 2 years ago

Check out https://github.com/raspberrypi/windows-drivers/pull/43 if you are still interested.