Skip to content

Commit 722fb4b

Browse files
committed
Update documents for the new ARM64 BSP
1 parent 793c08c commit 722fb4b

File tree

2 files changed

+168
-9
lines changed

2 files changed

+168
-9
lines changed

IOTARM64.md

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# 64-bit IoT Core
2+
3+
This repo currently provides experimental ARM64 IoT Core support for Raspberry Pi 3 and 4.
4+
5+
The supported version is 1809 (Build 17763).
6+
7+
## 64-bit firmware
8+
9+
A 64-bit UEFI firmware for the corresponding platform is required to export the BSP.
10+
11+
### Raspberry Pi 4
12+
13+
For the Raspberry Pi 4, firmware from the [Pi Firmware Task Force](https://rpi4-uefi.dev) is used, which provides UEFI and ACPI support. It is available at https://github.com/pftf/RPi4/releases.
14+
15+
Place the firmware files in `bspfiles/RPi4.ARM64/Packages/RPi.BootFirmware`, the following files are required.
16+
17+
```text
18+
config.txt
19+
fixup4.dat
20+
RPI_EFI.fd
21+
start4.elf
22+
bcm2711-rpi-4-b.dtb
23+
bcm2711-rpi-400.dtb
24+
bcm2711-rpi-cm4.dtb
25+
```
26+
27+
### Raspberry Pi 3
28+
29+
For the Raspberry Pi 3, the Pi Firmware Task Force provides firmware at https://github.com/pftf/RPi3/releases, which provides UEFI and ACPI support.
30+
31+
Place the firmware files in `bspfiles/RPi3.ARM64/Packages/RPi.BootFirmware`, the following files are required.
32+
33+
```text
34+
bootcode.bin
35+
config.txt
36+
fixup.dat
37+
RPI_EFI.fd
38+
start.elf
39+
bcm2710-rpi-3-b.dtb
40+
bcm2710-rpi-3-b-plus.dtb
41+
bcm2710-rpi-cm3.dtb
42+
```
43+
44+
### 64-bit EFI Customisations
45+
46+
[SMBIOS requirements of Windows 10 IoT Core OEM Licensing](https://docs.microsoft.com/en-us/windows-hardware/manufacture/iot/license-requirements#smbios-support) requires a custom version of RPI_EFI.fd with the proper SMBIOS values.
47+
48+
See [PlatformSmbiosDxe.c](https://github.com/tianocore/edk2-platforms/blob/master/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c) to update the SMBIOS data. Steps to build the RPI_EFI.fd is provided in the [edk2-platforms Github](https://github.com/tianocore/edk2-platforms).
49+
50+
## Export the 64-bit BSP
51+
52+
We provide a `binexport.ps1` script to scrape the BSP components together into a zip file for easy use with the IoT ADK AddonKit.
53+
1. Open Powershell
54+
2. Navigate to rpi-iotcore\tools
55+
3. Run `binexport.ps1` with the appropriate arguments.
56+
```powershell
57+
# Platform:
58+
# RPi - Raspberry Pi 2/3 32-bit BSP
59+
# RPi3.ARM64 - Raspberry Pi 3 64-bit BSP (experimental)
60+
# RPi4.ARM64 - Raspberry Pi 4 64-bit BSP (experimental)
61+
62+
# OutputDir
63+
# The output directory for the BSP zip file.
64+
65+
# IsDebug
66+
# Specify to package debug binaries. Default is Release binaries.
67+
.\binexport.ps1 [Platform] [OutputDir] [-IsDebug]
68+
69+
# Samples
70+
# 64-bit BSP for Raspberry Pi 3, release binaries
71+
.\binexport.ps1 RPi3.ARM64 C:\Release
72+
73+
# 64-bit BSP for Raspberry Pi 4, debug binaries
74+
.\binexport.ps1 RPi4.ARM64 C:\Debug -IsDebug
75+
```
76+
4. The script will generate a zip file **RPix.ARM64.BSP.xx.zip** that can be imported into the IoT-ADK-Addonkit shell using [Import-IoTBSP](https://github.com/ms-iot/iot-adk-addonkit/blob/master/Tools/IoTCoreImaging/Docs/Import-IoTBSP.md).
77+
```powershell
78+
Import-IoTBSP RPi3.ARM64 C:\Temp\RPi3.ARM64.BSP.xx.zip
79+
(or)
80+
Import-IoTBSP RPi4.ARM64 C:\Temp\RPi4.ARM64.BSP.xx.zip
81+
```
82+
## Additional Drivers
83+
84+
Some additional drivers are required for a usable image.
85+
86+
You'll need the INF-style driver packages. For each INF file, use the following command to create a IoT driver package:
87+
88+
```powershell
89+
Add-IoTDriverPackage sample_driver.inf Drivers.Sample
90+
```
91+
92+
To add driver packages to your IoT Core image, refer to [Add a driver to an image](https://docs.microsoft.com/en-us/windows-hardware/manufacture/iot/add-a-driver-to-an-image) of the IoT Core manufacturing guide.
93+
94+
**WARNING:** If you are going to commercialize your IoT device, please make sure you have valid licenses for the drivers you use.
95+
96+
### USB Driver for Raspberry Pi 3
97+
98+
The DWCUSBOTG USB controller driver for Raspberry Pi 2 and 3 is included in the ARM32 IoT Core packages, but not the ARM64 ones.
99+
100+
The original author of this driver, MCCI, released an ARM64 version of the same driver under a **non commercial** license. The driver is available at https://pi64.win/download-usb-drivers/.
101+
102+
Download the standalone driver EXE, run the EXE file to extract the driver files. You'll need to add both `mcci_dwchsotg_hub.inf` and `mcci_dwchsotg_hcd.inf`.
103+
104+
### Drivers for LAN adapters
105+
106+
The ARM64 IoT Core has drivers for the ASIX AX88772 USB 2.0 to Fast Ethernet Adapter builtin, for other adapters, you'll need to provide your own driver.
107+
108+
**WARNING:** The bcmgenet driver in this repo, for the GENET Gigabit LAN adapter on Raspberry Pi 4, is currently **NOT** supported on IoT Core.
109+
110+
- For the builtin adapter on Rasberry Pi 2/3, ARM64 drivers are available from Microchip. \
111+
To download, go to https://www.microchip.com/en-us/software-library, search for LAN9500 (for Pi 2/3B) or LAN78xx (for Pi 3B+), and select the one listed as "LANxxxx Windows (OneCore) Device Drivers".\
112+
Download the zip package, and extract the files at `ndis650/arm64`.
113+
114+
- For Realtek USB LAN adapters (RTL8152, RTL8153, etc), ARM64 drivers are available on Realtek website at https://www.realtek.com/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software. \
115+
Download the "Win10 Auto Installation Program", open the install EXE with 7-zip, and extract the files at `WIN10/arm64`.
116+
117+
- **For testing purposes,** you may also extract drivers from a Windows 10 ARM64 v1809 (Build 17763) Desktop image. \
118+
You can get drivers for these adapters in the following locations: \
119+
Realtek USB adapters: `Windows\System32\DriverStore\FileRepository\rtuarm64w10.inf_arm64_15e06ca8abe46b2a` \
120+
ASIX AX88179: `Windows\System32\DriverStore\FileRepository\netax88179_178a.inf_arm64_c5dc3d41b0e4583b`
121+
122+
## User Interface and App Compatibility
123+
124+
ARM64 IoT Core does not contain the default graphical user interface. By default, the resulting image will boot to a blank screen and have to be managed via the Device Portal web interface or SSH.
125+
126+
The UI App, IoTCoreDefaultApp, is available in source at https://github.com/Microsoft/Windows-iotcore-samples/tree/master/Samples/IoTCoreDefaultApp. To add this app to your image, refer to [Add an app to your image](https://docs.microsoft.com/en-us/windows-hardware/manufacture/iot/deploy-your-app-with-a-standard-board) of the IoT Core manufacturing guide.
127+
128+
IoT Core does not support WOW (Windows on Windows), so only ARM64 apps run on ARM64 IoT Core.
129+
130+
## GPIO, I2C, SPI Access via WinRT API
131+
132+
GPIO should work out of the box via the `Windows.Device.Gpio` API.
133+
134+
I2C and SPI access will **not** work on PFTF / upstream TianoCore firmware, since upstream TianoCore has updated the pin muxing declaration from the Microsoft-proprietary `MsftFunctionConfig` to the new standardized `PinFunction`.
135+
136+
Windows support for `PinFunction` is added in v1903 (Build 18362), therefore I2C and SPI will not work on IoT Core unless this change is reverted.
137+
138+
For more information, check out https://edk2.groups.io/g/devel/message/56396, https://github.com/andreiw/RaspberryPiPkg/issues/132, and https://github.com/andreiw/RaspberryPiPkg/commit/87f3611f9da37f594421bbaf513b9aaccee72176.

README.md

+30-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For the Raspberry Pi 2 (v1.2) and Raspberry Pi 3, the Pi Firmware Task Force pro
1717

1818
## 32-bit firmware
1919

20-
Sample binaries of the firmware is included in [RPi.BootFirmware](bspfiles/Packages/RPi.BootFirmware) to enable quick prototyping. The sources for these binaries are listed below.
20+
Sample binaries of the firmware is included in [RPi.BootFirmware](bspfiles/RPi/Packages/RPi.BootFirmware) to enable quick prototyping. The sources for these binaries are listed below.
2121

2222
1. Firmware binaries : [RaspberryPi/Firmware](https://github.com/raspberrypi/firmware)
2323
2. UEFI Sources : [RPi/UEFI](https://github.com/ms-iot/RPi-UEFI)
@@ -40,20 +40,41 @@ See [PlatformSmbiosDxe.c](https://github.com/ms-iot/RPi-UEFI/blob/ms-iot/Pi3Boar
4040

4141
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.
4242

43-
## Export the bsp
43+
## 64-bit IoT Core
4444

45-
Note: this section is only applicable to Windows 10 IoT Core.
45+
This repo provides experimental ARM64 IoT Core support for Raspberry Pi 3 and 4.
46+
47+
Please refer to [IOTARM64.md](IOTARM64.md) for more information.
48+
49+
## Export the 32-bit BSP
50+
51+
Note: this section is only applicable to 32-bit Windows 10 IoT Core for Raspberry Pi 3 and earlier, please refer to [IOTARM64.md](IOTARM64.md) for the experimental 64-bit BSP.
4652

4753
We provide a `binexport.ps1` script to scrape the BSP components together into a zip file for easy use with the IoT ADK AddonKit.
4854
1. Open Powershell
4955
2. Navigate to rpi-iotcore\tools
5056
3. Run `binexport.ps1` with the appropriate arguments.
5157
```powershell
52-
.\binexport.ps1 C:\Release
53-
(or)
54-
.\binexport.ps1 C:\Release -IsDebug # for debug binaries
58+
# Platform:
59+
# RPi - Raspberry Pi 2/3 32-bit BSP
60+
# RPi3.ARM64 - Raspberry Pi 3 64-bit BSP (experimental)
61+
# RPi4.ARM64 - Raspberry Pi 4 64-bit BSP (experimental)
62+
63+
# OutputDir
64+
# The output directory for the BSP zip file.
65+
66+
# IsDebug
67+
# Specify to package debug binaries. Default is Release binaries.
68+
.\binexport.ps1 [Platform] [OutputDir] [-IsDebug]
69+
70+
# Samples
71+
# 32-bit BSP for Raspberry Pi 2/3, release binaries
72+
.\binexport.ps1 RPi C:\Release
73+
74+
# 32-bit BSP for Raspberry Pi 2/3, debug binaries
75+
.\binexport.ps1 RPi C:\Debug -IsDebug
5576
```
56-
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](https://github.com/ms-iot/iot-adk-addonkit/blob/master/Tools/IoTCoreImaging/Docs/Import-IoTBSP.md).
57-
```powershell
58-
Import-IoTBSP RPi C:\Temp\RPi_BSP_xx.zip
77+
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](https://github.com/ms-iot/iot-adk-addonkit/blob/master/Tools/IoTCoreImaging/Docs/Import-IoTBSP.md).
78+
```powershell
79+
Import-IoTBSP RPi C:\Temp\RPi.BSP.xx.zip
5980
```

0 commit comments

Comments
 (0)