Git Product home page Git Product logo

windows-drivers's Introduction

Raspberry Pi Board Support Package for Windows 10

Welcome to the Raspberry Pi Board Support Package (BSP) for Windows 10

This repository contains BSP components for the Raspberry Pi 2, 3 and Compute Modules running 32-bit Windows 10 IoT Core (version 1809). It also contains BSP components for the Raspberry Pi 2 (v1.2), 3, 4 and corresponding Compute Modules running 64-bit Windows 10.

This BSP repository is under community support; it is not actively maintained by Microsoft. For Raspberry Pi 4 onwards, it's designed for use with Windows 10 version 2004 and later, because of use of newer driver frameworks which are not available on earlier releases.

64-bit firmware

For the Raspberry Pi 4, firmware from the Pi Firmware Task Force is used, which provides UEFI and ACPI support. It is available at https://github.com/pftf/RPi4/releases.

For the Raspberry Pi 2 (v1.2) and Raspberry Pi 3, the Pi Firmware Task Force provides firmware at https://github.com/pftf/RPi3/releases, which provides UEFI and ACPI support.

32-bit firmware

Sample binaries of the firmware is included in RPi.BootFirmware to enable quick prototyping. The sources for these binaries are listed below.

  1. Firmware binaries : RaspberryPi/Firmware
  2. UEFI Sources : RPi/UEFI

32-bit EFI Customisations

Note: this section is only applicable to 32-bit Windows 10 IoT Core on Raspberry Pi 3 and earlier.

SMBIOS requirements of Windows 10 IoT Core OEM Licensing requires a custom version of kernel.img file with the proper SMBIOS values.

See PlatformSmbiosDxe.c to update the SMBIOS data. Steps to build the kernel.img is provided in the RPi/UEFI Github.

Build the drivers

  1. Clone https://github.com/raspberrypi/windows-drivers
  2. Open Visual Studio with Administrator privileges
  3. In Visual Studio: File -> Open -> Project/Solution -> Select windows-drivers\build\bcm2836\buildbcm2836.sln
  4. Set your build configuration (Release or Debug)
  5. Build -> Build Solution

The resulting driver binaries will be located in the windows-drivers\build\bcm2836\ARM\Output folder, or windows-drivers\build\bcm2836\ARM64\Output if you picked an Arm 64-bit configuration.

Export the bsp

Note: this section is only applicable to Windows 10 IoT Core.

We provide a binexport.ps1 script to scrape the BSP components together into a zip file for easy use with the IoT ADK AddonKit.

  1. Open Powershell
  2. Navigate to rpi-iotcore\tools
  3. Run binexport.ps1 with the appropriate arguments.
    .\binexport.ps1 C:\Release
    (or)
    .\binexport.ps1 C:\Release -IsDebug # for debug binaries
  4. The script will generate a zip file RPi_BSP_xx.zip that can be imported into the IoT-ADK-Addonkit shell using Import-IoTBSP.
    Import-IoTBSP RPi C:\Temp\RPi_BSP_xx.zip

windows-drivers's People

Contributors

alotipac avatar andreiw avatar asherkariv avatar bfjelds avatar christopherco avatar chsha avatar driver1998 avatar googulator avatar henie avatar idigdoug avatar jordanrh1 avatar mahmoudgsaleh avatar mariobalanica avatar mhesham avatar ooeygui avatar parameshbabu avatar saraclay avatar serusako avatar woachk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windows-drivers's Issues

error importing ARM64 BSP using script

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

Driver packages should be isolated

  • Copy driver files to the driver store rather than Windows\System32\drivers
  • Use device interfaces instead of hardcoded driver paths for:
    • bcm2836pwm
    • rpiq
    • vchiq

[Question] Dual monitor support with basic driver on Pi 4?

Hi, there is any way to enable dual screen support also if actualy there is no working driver video for a Pi 4?

For helping in build the driver video there are some resource (or documentation) about the work to do and the actual stete of the driver?

Booting from USB 3.0 with UASP enabled results in a BSoD

  • With rpiuxflt installed and uaspstor enabled, booting from UAS drives connected to USB 3.0 results in an INACCESSIBLE_BOOT_DEVICE BSoD.
    Connecting the drives after Windows has booted (from SD for example) works fine in this case. (I haven't done any stress testing yet, so they might as well fail under load).

  • With rpiuxflt installed and uaspstor disabled, booting from UAS drives connected to USB 3.0 works fine.

  • Without rpiuxflt + the 3 GB RAM limit enabled in UEFI and uaspstor enabled, users have reported that USB 3.0 boot from UAS drives works fine (though I'm personally not able to replicate the success in this case, as my drive keeps on hanging Explorer and anything trying to access it, so booting from it is out of the question).

UAS drives connected to USB 2.0 and non-UAS ones connected to any port work flawlessly in every scenario.

Releases of built RPI BSP zips

Is there a location that builds the zips for use? I am struggling to build the libraries and get the right combination of tools and SDKs. I just want to download the ARM64 version RPi BSP, but that doesn't seem to be an option. Could you please publish these as releases on this repo? I am trying to build a Win 10 IOT RPi 4 ARM64 FFU and that needs the RPi BSP ARM64 drivers.

bcm2836sdhc & rpisdhc cause a crash when unloaded

From WinDbg:

PNP_DETECTED_FATAL_ERROR (ca)
PnP encountered a severe error, either as a result of a problem in a driver or
a problem in PnP itself. The first argument describes the nature of the
problem, the second argument is the address of the PDO. The other arguments
vary depending on argument 1.
Arguments:
Arg1: 0000000000000014, Device removed without disconnecting interrupts
Driver failed to disconnect interrupts when the device was
removed.
Arg2: ffffe00b37049b20, PDO.
Arg3: 0000000000000008
Arg4: 0000000000000000

All drivers based on https://github.com/microsoft/Windows-driver-samples/tree/master/sd/miniport/sdhc exhibit this issue.

Recent updates to the final release of Windows seem to cause a driver reset during the first boot, so users are not able to complete the installation process.

bcmgenet can only be installed on Windows build 1904x

bcmgenet is written using the NetAdapterCx API, which is unstable and already had breaking changes for 2 times.
@alotipac, the creator of the driver, has pushed some fixes to his fork of the old ms-iot repo: https://github.com/alotipac/rpi-iotcore/commits/rpi4-insider that make the driver work on the latest insider builds too (although it is unstable and significantly slower on builds 21301+).

We cannot merge those changes as Github Actions only provide the 19041 SDK/WDK, so CI builds will fail. The fixes are also not backwards compatible, meaning that we'd have to build 3 versions of the driver (and possibly more than that if Microsoft breaks the API again).

As a temporary workaround (until the API becomes stable), we could bundle our own version of NetAdapterCx with the driver, thus making it work with older versions of Windows too.

Better support for the Broadcom eMMC2 controller

The sequential R/W speeds max out at around 23-24 MB/s with a SanDisk Ultra UHS-I A1 card.
The chip can do much better than this, but it is currently constrained by the following issues:

  • DMA is disabled because sdbus doesn't honor the _DMA method in ACPI, so it's not able to do the required address translation without a lower filter driver.

  • UHS-I support is disabled because the controller can't switch the voltage in a standard way, so it's always running at 3.3V.

bcm2836pwm doesn't work on BCM2711

This is being used by rpiwav to generate analog audio.

The first change is that now there are two PWM peripherals (and PWM0, which is the only PWM peripheral currently described in ACPI, can't be muxed to the audio jack pins anymore).

From what I've seen, the addresses for PWM0 haven't changed, but the driver now fails to do DMA (even with the range being limited at the first 1 GB).

Cannot build some of the drivers after the VS 16.10 update

Hello, I'm a beginner. Today, when I tried to compile the driver, I found that there were some errors in the compilation process of some drivers, which could not be solved. I hope I can get help from big brother here( If you send it in the wrong place, please forgive me

The error message is as follows: (Build Error Driver Project List)
1:rpiq
2:SerPL011
3:vchiq
4:vchiq_arm_kern
5:vcos_win32_kern
6:vcos_win32_kern_generic
image

"rpiq" and "SerPL011" driver project:I also disable the 'Spectre' of 'rpiq & SerPL011', However, other errors are displayed after disabling. This error should be an error during link.
error message list:
1: 严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2001 无法解析的外部符号 __stdio_common_vswprintf rpiq C:\Users\Administrator\Desktop\windows-drivers\drivers\mailbox\bcm2836\device.obj 1

2:严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK1120 1 个无法解析的外部命令 rpiq C:\Users\Administrator\Desktop\windows-drivers\build\bcm2836\ARM64\Release\Output\rpiq.sys 1

image:
image

"vcos_win32_kern_generic" driver project:I also disable the 'Spectre' of 'vcos_win32_kern_generic', However, other errors are displayed after disabling. This error should be an error during link.
error message list:
1:严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C2011 “timespec”:“struct”类型重定义 vcos_win32_kern_generic C:\Users\Administrator\Desktop\windows-drivers\drivers\misc\userland\interface\vcos\win32\vcos_platform.h 139
image

I tried to delete this structure, but I couldn't solve it。
image
image

WiFi driver

Im using win11 preview using WOR. There is not wifi driver right now on the other hand Bluetooth working.

Is there any plan to get wifi for

VCHIQ doesn't work on ARM64

The ACT led starts blinking 8 times in a pattern when the driver is loaded, indicating a VCHI error.
It doesn't respond to any commands afterwards (tested using some of the ported userland apps here: https://github.com/ms-iot/userland)

I recall seeing the hello_jpeg sample work on ARM32 (RPi 3), but subsequent runs resulted in either the driver hanging or a bug check.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.