Skip to content

Commit 75331a7

Browse files
Merge pull request #675 from raspberrypi/develop
Pogo pin replacement, checking scripts, layout rework for command tables
2 parents c197720 + 96dd486 commit 75331a7

10 files changed

Lines changed: 861 additions & 601 deletions

File tree

.github/workflows/check_cr.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Check line endings
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
check-line-endings:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
13+
14+
- name: Check line endings
15+
run: |
16+
scripts/check_line_endings.py
17+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ venv
88
.venv
99
.env
1010
.vscode
11+
live_urls.csv
12+
dead_urls.csv

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,7 @@ serve_html: run_ninja
123123
# Delete all the files created by the 'html' target
124124
clean_html:
125125
rm -rf $(HTML_DIR)
126+
127+
# Check external links in all adoc files.
128+
link_check:
129+
python3 $(SCRIPTS_DIR)/link_check.py

documentation/asciidoc/accessories/cm5-programming-jig/about.adoc

Lines changed: 546 additions & 519 deletions
Large diffs are not rendered by default.

documentation/asciidoc/computers/camera/rpicam_apps_post_processing_writing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This class delegates model execution to a separate thread to prevent camera stut
4343
The `TfStage` class implements all the `PostProcessingStage` member functions post-processing stages must normally implement, _except for_ ``Name``.
4444
All `TfStage`-derived stages must implement the ``Name`` function, and should implement some or all of the following virtual member functions:
4545

46-
`void readExtras()`:: The base class reads the named model and certain other parameters like the `refresh_rate`. Use this function to read extra parameters for the derived stage and check that the loaded model is correct (for example, has right input and output dimensions).
46+
`void readExtras()`:: The base class reads the named model and certain other parameters like the `refresh_rate`. Use this function to read extra parameters for the derived stage and check that the loaded model is correct (for example, has right input and output dimensions).
4747
`void checkConfiguration()`:: The base class fetches the low resolution stream that TFLite operates on and the full resolution stream in case the derived stage needs it. Use this function to check for the streams required by your stage. If your stage can't access one of the required streams, you might skip processing or throw an error.
4848
`void interpretOutputs()`:: Use this function to read and interpret the model output. _Runs in the same thread as the model when the model completes_.
4949
`void applyResults()`:: Use this function to apply results of the model (could be several frames old) to the current frame. Typically involves attaching metadata or drawing. _Runs in the main thread, before frames are delivered_.

documentation/asciidoc/computers/config_txt/boot.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Default: ``
242242

243243
If set to a non-zero value (in seconds), this property enables a hardware watchdog timer that is handed over to the operating system (OS) at boot. If the OS does not regularly "kick" or reset the watchdog, the system will be reset after the specified timeout.
244244

245-
This property sets the `systemd` `watchdog.open_timeout` parameter, which controls how long the OS has to initialize and start servicing the watchdog. The value is passed to the OS via the kernel command line. For ongoing operation, the OS must also regularly reset the watchdog, typically controlled by the `RuntimeWatchdogSec` parameter in `systemd`. For more information, see https://www.freedesktop.org/software/systemd/man/latest/systemd-system.conf.html#RuntimeWatchdogSec=[systemd watchdog documentation].
245+
This property sets the `systemd` `watchdog.open_timeout` parameter, which controls how long the OS has to initialize and start servicing the watchdog. The value is passed to the OS via the kernel command line. For ongoing operation, the OS must also regularly reset the watchdog, typically controlled by the `RuntimeWatchdogSec` parameter in `systemd`. For more information, see https://www.freedesktop.org/software/systemd/man/latest/systemd-system.conf.html#RuntimeWatchdogSec=[systemd watchdog documentation].
246246

247247
[NOTE]
248248
====

documentation/asciidoc/computers/linux_kernel/building.adoc

Lines changed: 42 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -60,83 +60,62 @@ This section describes how to apply the default configuration when you build a k
6060
* xref:linux_kernel.adoc#configure-the-kernel[enable and disable kernel features]
6161
* xref:linux_kernel.adoc#patch-the-kernel[apply patches from another source]
6262

63-
To prepare the default configuration, run the appropriate commands from the table below for your Raspberry Pi model.
63+
To prepare the default configuration, run the appropriate commands from the sections below depending on your architecture and Raspberry Pi model.
6464

65-
[cols="8,<.^20a,60a"]
66-
|===
67-
| Architecture | Raspberry Pi Model | Command
65+
===== 64-bit architecture
6866

69-
.12+^.^| 64-bit
70-
| 3
71-
.9+.^|
67+
[tabs]
68+
======
69+
Raspberry Pi 3, 3+, CM3, CM3+, Zero 2 W, 4, 400, CM4, CM4S::
70+
+
7271
[source,console]
7372
----
7473
$ cd linux
7574
$ KERNEL=kernel8
7675
$ make bcm2711_defconfig
7776
----
78-
| Compute Module 3
79-
| 3+
80-
| Compute Module 3+
81-
| Zero 2 W
82-
| 4
83-
| 400
84-
| Compute Module 4
85-
| Compute Module 4S
86-
8777
88-
.^| 5
89-
.3+.^|
78+
Raspberry Pi 5, 500, 500+, CM5::
79+
+
9080
[source,console]
9181
----
9282
$ cd linux
9383
$ KERNEL=kernel_2712
9484
$ make bcm2712_defconfig
9585
----
96-
| 500/500+
97-
| Compute Module 5
86+
======
9887

99-
.14+^.^| 32-bit
100-
| 1
101-
.4+.^|
88+
===== 32-bit architecture
89+
90+
[tabs]
91+
======
92+
Raspberry Pi 1, CM1, Zero, Zero W::
93+
+
10294
[source,console]
10395
----
10496
$ cd linux
10597
$ KERNEL=kernel
10698
$ make bcmrpi_defconfig
10799
----
108-
| Compute Module 1
109-
| Zero
110-
| Zero W
111100
112-
113-
| 2
114-
.6+.^|
101+
Raspberry Pi 2, 3, 3+, CM3, CM3+, Zero 2 W::
102+
+
115103
[source,console]
116104
----
117105
$ cd linux
118106
$ KERNEL=kernel7
119107
$ make bcm2709_defconfig
120108
----
121-
| 3
122-
| Compute Module 3
123-
| 3+
124-
| Compute Module 3+
125-
| Zero 2 W
126109
127-
128-
| 4
129-
.4+.^|
110+
Raspberry Pi 4, 400, CM4, CM4S::
111+
+
130112
[source,console]
131113
----
132114
$ cd linux
133115
$ KERNEL=kernel7l
134116
$ make bcm2711_defconfig
135117
----
136-
| 400
137-
| Compute Module 4
138-
| Compute Module 4S
139-
|===
118+
======
140119

141120
[NOTE]
142121
====
@@ -292,78 +271,62 @@ This section describes how to apply the default configuration when you build a k
292271
* xref:linux_kernel.adoc#configure-the-kernel[enable and disable kernel features]
293272
* xref:linux_kernel.adoc#patch-the-kernel[apply patches from another source]
294273

295-
Enter the following commands to build the sources and Device Tree files:
274+
To build the sources and Device Tree files, run the appropriate commands from the sections below depending on your architecture and Raspberry Pi model.
296275

297-
[cols="8,<.^20a,60a"]
298-
|===
299-
| Target Architecture | Target Raspberry Pi Model | Command
276+
===== 64-bit architecture
300277

301-
.12+^.^| 64-bit
302-
| 3
303-
.9+.^| [source,console]
278+
[tabs]
279+
======
280+
Raspberry Pi 3, 3+, CM3, CM3+, Zero 2 W, 4, 400, CM4, CM4S::
281+
+
282+
[source,console]
304283
----
305284
$ cd linux
306285
$ KERNEL=kernel8
307286
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfig
308287
----
309-
| Compute Module 3
310-
| 3+
311-
| Compute Module 3+
312-
| Zero 2 W
313-
| 4
314-
| 400
315-
| Compute Module 4
316-
| Compute Module 4S
317288
318-
.^| 5
319-
.3+.^|
289+
Raspberry Pi 5, 500, 500+, CM5::
290+
+
320291
[source,console]
321292
----
322293
$ cd linux
323294
$ KERNEL=kernel_2712
324295
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2712_defconfig
325296
----
326-
| 500/500+
327-
| Compute Module 5
297+
======
298+
299+
===== 32-bit architecture
328300

329-
.14+^.^| 32-bit
330-
| 1
331-
.4+.^| [source,console]
301+
[tabs]
302+
======
303+
Raspberry Pi 1, CM1, Zero, Zero W::
304+
+
305+
[source,console]
332306
----
333307
$ cd linux
334308
$ KERNEL=kernel
335309
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig
336310
----
337-
| Compute Module 1
338-
| Zero
339-
| Zero W
340311
341-
| 2
342-
.6+.^|
312+
Raspberry Pi 2, 3, 3+, CM3, CM3+, Zero 2 W::
313+
+
343314
[source,console]
344315
----
345316
$ cd linux
346317
$ KERNEL=kernel7
347318
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
348319
----
349-
| 3
350-
| Compute Module 3
351-
| 3+
352-
| Compute Module 3+
353-
| Zero 2 W
354320
355-
| 4
356-
.4+.^|
321+
Raspberry Pi 4, 400, CM4, CM4S::
322+
+
357323
[source,console]
358324
----
359325
$ cd linux
360326
$ KERNEL=kernel7l
361327
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2711_defconfig
362328
----
363-
| 400
364-
| Compute Module 4
365-
| Compute Module 4S
366-
|===
329+
======
367330

368331
[[cross-compiled-customisation]]
369332
==== Customise the kernel version using `LOCALVERSION`

documentation/asciidoc/computers/processors/bcm2712.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ Vulnerability Spectre v2: Mitigation; CSV2, BHB
4040

4141
WARNING: The list above was correct as of April 2025 but may have been superseded. You should use `lscpu` on your Raspberry Pi to get up to date information. This is especially important when using a third-party operating system, as these may not include all the latest mitigations in their Linux kernel builds. The Arm processors used by Raspberry Pi Ltd do not use microcode, so all mitigations are at the kernel level.
4242

43-
The vulnerability information reported by `lscpu` is based on the currently executing kernel's detection scheme. It may not accurately reflect the true vulnerability status of the hardware, especially if the OS lacks recent kernel updates. Further vulnerability information on the CPU vendor advisories can be obtained from https://support.arm.com/documentation/#cf-navigationhierarchiesproducts=Arm%20Security%20Center,CPU%20Product%20Security[Arm support] referencing the Vendor ID and Model name reported by `lscpu`.
43+
The vulnerability information reported by `lscpu` is based on the currently executing kernel's detection scheme. It may not accurately reflect the true vulnerability status of the hardware, especially if the OS lacks recent kernel updates. Further vulnerability information on the CPU vendor advisories can be obtained from https://support.arm.com/documentation/#cf-navigationhierarchiesproducts=Arm%20Security%20Center,CPU%20Product%20Security[Arm support] referencing the Vendor ID and Model name reported by `lscpu`.

scripts/check_line_endings.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env python3
2+
3+
import os
4+
import sys
5+
6+
SEARCH_PATHS = set(["documentation/asciidoc"])
7+
SEARCH_EXTENSIONS = set([".adoc"])
8+
9+
def contains_cr(filepath):
10+
with open(filepath, "rb") as fh:
11+
return b"\r" in fh.read()
12+
13+
if __name__ == "__main__":
14+
bad_files = set()
15+
for path in SEARCH_PATHS:
16+
for root, dirs, files in os.walk(path):
17+
for name in files:
18+
if os.path.splitext(name)[1] in SEARCH_EXTENSIONS:
19+
filepath = os.path.join(root, name)
20+
if contains_cr(filepath):
21+
bad_files.add(filepath)
22+
23+
if bad_files:
24+
print("The following files contain a CR character (please convert them to UNIX line-endings):")
25+
print("\n".join(sorted(bad_files)))
26+
sys.exit(1)

0 commit comments

Comments
 (0)