You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation for Raspberry Pi provisioning
- Enhanced README with links to configuration reference documentation and added troubleshooting sections for device provisioning.
- Introduced detailed guidance for connecting Raspberry Pi 4, 5, and Zero 2 W devices, including GPIO configuration and troubleshooting tips.
- Added a new document for mass provisioning scaling guidance, outlining connection requirements, provisioning strategies, and performance optimization.
- Updated API documentation to clarify manufacturing database access and error response formats.
At the minimum, you must consult the 'Options' and 'Images' pages, having uploaded your OS image and set the options as guided by the inline
72
-
help text (which is generated from the reference documentation in docs/)
72
+
help text (which is generated from the <<docs/config_vars.adoc,configuration reference documentation>>)
73
73
74
74
Once you have followed all those steps, `rpi-sb-provisioner` should be correctly configured and ready to run.
75
75
76
+
[#using-rpi-sb-provisioner]
76
77
== Using rpi-sb-provisioner
77
78
`rpi-sb-provisioner` is composed of three `systemd` services that are triggered by the connection of a device in RPIBOOT mode to a USB port. With `rpi-sb-provisioner` configured to your requirements, all that is therefore required is to connect your target Raspberry Pi device in RPIBOOT mode.
78
79
80
+
NOTE: For non-compute module connection instructions, see: <<docs/device-guidance/pi4.adoc,Raspberry Pi 4>>, <<docs/device-guidance/pi5.adoc,Raspberry Pi 5>>, or <<docs/device-guidance/zero2.adoc,Zero 2 W>> guidance documents.
81
+
79
82
For any Raspberry Pi Compute Module on the matching Raspberry Pi Compute Module IO Board, you can do this by using the single Jumper Wire to connect the `disable eMMC Boot` pins on the 12-pin header at the top of the board.
80
83
81
84
[pdfwidth=90%]
@@ -114,13 +117,22 @@ After these steps have been completed, your device should display both the `acti
114
117
115
118
No further intervention is required in the success case.
116
119
117
-
WARNING: `rpi-sb-provisioner` will not, by default, block JTAG access. If you wish to make use of this facility, you _must_ use the `RPI_DEVICE_LOCK_JTAG` configuration option.
120
+
WARNING: `rpi-sb-provisioner` will not, by default, block JTAG access. If you wish to make use of this facility, you _must_ use the <<docs/config_vars.adoc#rpi_device_lock_jtag,RPI_DEVICE_LOCK_JTAG>> configuration option.
118
121
119
-
== Tips and Tricks
122
+
[#troubleshooting]
123
+
== Troubleshooting
120
124
121
125
=== Observing active provisioning operations
122
126
123
-
As `rpi-sb-provisioner` is implemented using `systemd` services, you can use the typical `systemctl` commands to observe the services as they provision your device.
127
+
The easiest way to observe active provisioning operations is through the **Web UI**:
128
+
129
+
1. **Open your browser** and navigate to `http://localhost:3142`
130
+
2. **Click the 'Services' tab** to see all provisioning services and their current status
131
+
3. **View real-time updates** of device provisioning progress, including serial numbers and current phases
132
+
133
+
==== Command Line Alternative
134
+
135
+
As `rpi-sb-provisioner` is implemented using `systemd` services, you can also use the typical `systemctl` commands to observe the services as they provision your device.
124
136
125
137
To see active provisioning operations, and the serial numbers of the devices involved, type into a Terminal window:
Logs are stored on a per-device, per-phase basis, where logs for a given device are stored at `/var/log/rpi-sb-provisioner/<serial>/<phase>.log`.
145
+
The most convenient way to observe device provisioning logs is through the **Web UI**:
146
+
147
+
1. **Open your browser** and navigate to `http://localhost:3142`
148
+
2. **Click the 'Services' tab** to see all provisioning services
149
+
3. **Click on any service** to view its detailed logs with real-time updates
150
+
4. **Monitor progress** as logs are automatically refreshed during provisioning
151
+
152
+
==== Command Line Alternatives
153
+
154
+
Logs are also stored on a per-device, per-phase basis, where logs for a given device are stored at `/var/log/rpi-sb-provisioner/<serial>/<phase>.log`.
134
155
135
156
For example, to observe the progress of an individual device through a phase, you could use `tail`:
136
157
@@ -149,9 +170,16 @@ Where the `-f` flag will follow the logs as they are written, letting you observ
149
170
150
171
=== Processing the manufacturing database
151
172
152
-
If you have enabled the manufacturing database (using RPI_SB_PROVISIONER_MANUFACTURING_DB), you can create a comma-separated value (CSV) file from the manufacturing database for use with other software.
173
+
If you have enabled the manufacturing database (using <<docs/config_vars.adoc#rpi_sb_provisioner_manufacturing_db,RPI_SB_PROVISIONER_MANUFACTURING_DB>>), you can view and export the manufacturing data through the **Web UI**:
174
+
175
+
1. **Open your browser** and navigate to `http://localhost:3142`
176
+
2. **Navigate to the Manufacturing Database section** to view all provisioned devices
177
+
3. **Review device information** including serial numbers, board types, MAC addresses, and provisioning status
178
+
4. **Export as CSV** using the built-in export function to create a comma-separated values file for use with other software
179
+
180
+
==== Command Line Alternative
153
181
154
-
To do so, you must use the *sqlite3* program:
182
+
You can also create a CSV file directly using the *sqlite3* program:
Copy file name to clipboardExpand all lines: docs/api_endpoints.adoc
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
6
6
This document describes the API endpoints available in the provisioner-service. These endpoints can be used for integration with other systems, building custom dashboards, or automating operations.
7
7
8
+
[#manufacturing-database-api]
8
9
== Manufacturing Database API
9
10
10
11
The Manufacturing Database API provides access to device provisioning data collected during the provisioning process. This API allows for integration with other systems and custom UIs.
@@ -70,7 +71,7 @@ The endpoint returns a JSON array where each element represents a provisioned de
70
71
|processor|Processor type (e.g., "BCM2712")
71
72
|memory|Device memory size (e.g., "2GB")
72
73
|manufacturer|Device manufacturer
73
-
|secure|Whether secure boot is enabled ("yes" or "no")
74
+
|secure|Whether a device has been provisioned with a device unique identity
74
75
|provision_ts|Timestamp of when the device was provisioned
75
76
|===
76
77
@@ -118,7 +119,7 @@ On error, the endpoint returns a JSON object with error details:
118
119
- This endpoint can be used for building custom dashboards or integrating with other monitoring systems.
119
120
- The data is ordered by provision timestamp in descending order (newest first).
120
121
- For large datasets, it is recommended to use pagination to improve performance.
121
-
- The database path is configured using the `RPI_SB_PROVISIONER_MANUFACTURING_DB` setting as described in the configuration documentation.
122
+
- The database path is configured using the <<config_vars.adoc#rpi_sb_provisioner_manufacturing_db,RPI_SB_PROVISIONER_MANUFACTURING_DB>> setting as described in the configuration documentation.
122
123
123
124
== Devices API
124
125
@@ -513,6 +514,7 @@ If accessing an unauthorized service:
513
514
- Access is restricted to services with approved prefixes for security
514
515
- This endpoint is optimized for polling and provides lighter responses than the HTML view
515
516
517
+
[#error-response-format]
516
518
== Error Response Format
517
519
518
520
All API endpoints follow a standard error response format:
Copy file name to clipboardExpand all lines: docs/config_vars.adoc
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ This document describes the configuration variables used in /etc/rpi-sb-provisio
10
10
=== PROVISIONING_STYLE
11
11
*Mandatory, with a default*
12
12
13
-
Select the provisioning style you wish to use. Supported values are `secure-boot`, `fde-only` and `naked`.
13
+
Select the provisioning style you wish to use. Supported values are `secure-boot`, `fde-only` and `naked`. For details on what each provisioning style does, see the <<../README.adoc#using-rpi-sb-provisioner,main documentation>>.
14
14
15
15
If `PROVISIONING_STYLE` is not specified, it defaults to `secure-boot`.
16
16
@@ -89,6 +89,7 @@ This setting is typically configured through the firmware selection web interfac
89
89
90
90
WARNING: Ensure the specified firmware file exists and is compatible with your target device family before provisioning.
91
91
92
+
[#rpi_device_lock_jtag]
92
93
=== RPI_DEVICE_LOCK_JTAG
93
94
*Optional*
94
95
@@ -105,12 +106,13 @@ Raspberry Pi devices that use an EEPROM as part of their boot flow can configure
105
106
106
107
Set to any value to enable EEPROM write protection.
107
108
109
+
[#rpi_sb_provisioner_manufacturing_db]
108
110
=== RPI_SB_PROVISIONER_MANUFACTURING_DB
109
111
*Optional*
110
112
111
113
Store manufacturing data in a sqlite3 database. This will include the board serial, board revision, the boot ROM version, the MAC address of the ethernet port, any set hash of the customer signing key, the JTAG lock state, the board attributes and the advanced boot flags.
112
114
113
-
You must not specify the path of a database stored on a network drive or similar storage, as this mechanism is only safe to use on a single provisioning system. For merging the output with multiple provisioning systems, consider "Processing the manufacturing database" later in this document.
115
+
You must not specify the path of a database stored on a network drive or similar storage, as this mechanism is only safe to use on a single provisioning system. For merging the output with multiple provisioning systems, consider <<../README.adoc#_processing_the_manufacturing_database,Processing the manufacturing database>> in the main documentation.
114
116
115
117
Set to the path of a file to contain a SQLite database stored on local storage. The WebUI will create this file if it does not exist.
== Connecting Raspberry Pi 4 to rpi-sb-provisioner
4
+
5
+
=== Prerequisites - GPIO Configuration
6
+
7
+
Unlike Raspberry Pi 5, the Raspberry Pi 4 does not have a built-in power button to force RPIBOOT mode. Before attempting to use rpi-sb-provisioner with a Raspberry Pi 4 device, you must first configure the nRPIBOOT GPIO pin.
8
+
9
+
**Recommended GPIO**: GPIO 8
10
+
11
+
=== Step 1 - Configure nRPIBOOT GPIO using recovery.bin
12
+
13
+
Before provisioning, you must assign the nRPIBOOT function to a specific GPIO pin using recovery.bin:
14
+
15
+
1. **Download and prepare recovery.bin** following the instructions at https://github.com/raspberrypi/usbboot/tree/master/secure-boot-recovery#step-2---select-the-nrpiboot-gpio[GitHub usbboot secure-boot-recovery documentation]
16
+
2. **Configure GPIO 8** as the nRPIBOOT pin using the recovery.bin process
17
+
3. **Verify the configuration** has been applied to the device EEPROM (see <<verifying-gpio-8-configuration,Verifying GPIO 8 Configuration>> below)
18
+
19
+
This configuration step only needs to be performed **once per device** and will persist in the device EEPROM.
20
+
21
+
=== Step 2 - Provisioning Connection
22
+
23
+
To provision a Raspberry Pi 4 device after GPIO configuration:
24
+
25
+
1. **Prepare a jumper wire or connection** to short GPIO 8 to ground
26
+
2. **Connect GPIO 8 to ground** (GND pin) on the Raspberry Pi 4
27
+
3. **While maintaining the GPIO 8 to ground connection**, plug the USB cable into the device to connect it to your provisioning machine
28
+
4. **Keep the GPIO connection in place throughout the entire provisioning process**
29
+
30
+
Unlike Raspberry Pi 5, **no re-connection procedure is required** - the device will proceed through all provisioning phases automatically while the GPIO remains connected to ground.
31
+
32
+
=== Important Notes
33
+
34
+
* **One-time setup**: The GPIO configuration using recovery.bin only needs to be done once per device
35
+
* **GPIO 8 recommended**: We recommend using GPIO 8 for consistency, as referenced in the https://github.com/raspberrypi/usbboot/tree/master/secure-boot-recovery#step-2---select-the-nrpiboot-gpio[usbboot documentation]
36
+
* **Maintain connection**: The GPIO 8 to ground connection must be maintained throughout the entire provisioning process
37
+
* **No re-plug required**: Unlike Raspberry Pi 5, no disconnection and re-connection is needed
38
+
* **Cable quality**: Ensure you are using a high-quality USB cable as specified in the main documentation
39
+
* **Complete process**: Do not release the GPIO connection until provisioning is fully complete
40
+
41
+
[#verifying-gpio-8-configuration]
42
+
== Verifying GPIO 8 Configuration
43
+
44
+
To verify that GPIO 8 has been successfully assigned as the nRPIBOOT pin:
45
+
46
+
1. **Boot the device normally** (without shorting any GPIO pins)
47
+
2. **Run the following command** to read the current EEPROM configuration:
48
+
+
49
+
----
50
+
$ sudo rpi-eeprom-config
51
+
----
52
+
53
+
3. **Look for the GPIO configuration** in the output. You should see a line similar to:
54
+
+
55
+
----
56
+
WAKE_ON_GPIO=1
57
+
GPIO_EXPANDER_CFG=0x00000008
58
+
----
59
+
+
60
+
Or other GPIO-related configuration entries that indicate GPIO 8 has been configured for nRPIBOOT functionality.
61
+
62
+
4. **Alternative verification**: You can also extract the full EEPROM image and inspect it:
If the GPIO configuration is not present or incorrect, you will need to repeat the recovery.bin process to properly configure GPIO 8.
70
+
71
+
== Troubleshooting
72
+
73
+
=== GPIO Configuration Issues
74
+
75
+
If you encounter issues with the initial GPIO configuration:
76
+
77
+
* **Follow official documentation**: Refer to the complete instructions at https://github.com/raspberrypi/usbboot/tree/master/secure-boot-recovery#step-2---select-the-nrpiboot-gpio[GitHub usbboot documentation]
78
+
* **Verify EEPROM update**: Use the verification commands above (`sudo rpi-eeprom-config`) to confirm the GPIO configuration was successfully written to EEPROM
79
+
* **Check for configuration entries**: Look for `WAKE_ON_GPIO=1` and `GPIO_EXPANDER_CFG` entries in the EEPROM output
80
+
* **Repeat recovery.bin process**: If verification shows incorrect or missing GPIO configuration, repeat the recovery.bin configuration process
81
+
* **Try alternative GPIO**: Consider using a different GPIO pin if GPIO 8 is not accessible on your setup
82
+
83
+
=== Device not entering RPIBOOT mode
84
+
85
+
If your Raspberry Pi 4 device does not enter RPIBOOT mode:
86
+
87
+
* **Verify GPIO configuration**: Use the verification steps above to confirm GPIO 8 was successfully configured as nRPIBOOT
88
+
* **Check physical connection**: Verify GPIO 8 is properly connected to a ground (GND) pin
89
+
* **Try different GPIO**: If GPIO 8 doesn't work, try configuring and using a different GPIO pin
90
+
* **Cable and port**: Try a shorter, higher quality USB cable and different USB port on your host machine
91
+
* **Power supply**: Ensure the provisioning machine has sufficient power supply capability
92
+
93
+
=== Device not proceeding through provisioning
94
+
95
+
If the device does not proceed through the provisioning phases:
96
+
97
+
* **Maintain GPIO connection**: Ensure GPIO 8 to ground connection is maintained throughout the entire process
98
+
* **Check provisioning logs**: Review logs for any error messages
99
+
* **Verify device recognition**: Confirm the device was initially recognized by the provisioning system
100
+
* **Restart procedure**: Disconnect the device, ensure GPIO connection is secure, and try again
Copy file name to clipboardExpand all lines: docs/device-guidance/zero2.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,4 @@ If your Zero 2 W device does not enter RPIBOOT mode, try the following:
16
16
17
17
== Using secure-boot provisioning style on Zero 2 W devices
18
18
19
-
=== Secure boot is not available on Zero 2 W devices, and forcing the provisioning style will produce undefined results.
19
+
=== Secure boot is not available on Zero 2 W devices. Provisioning with secure boot will produce undefined results - but absolutely nothing that will work as expected.
0 commit comments