Skip to content

Commit ff94109

Browse files
author
Alasdair Allan
authored
Merge branch 'develop' into edit_this_page
2 parents e0f5131 + 13984dd commit ff94109

File tree

12 files changed

+138
-49
lines changed

12 files changed

+138
-49
lines changed

CONTRIBUTING.md

+11-23
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,23 @@
11
# Contributing to Raspberry Pi Documentation
22

3-
Although you won't be able to directly change documentation on the official repository, you can take a look at all the source files and see how everything is arranged. The sources files and folders follow the hierarchical documentation as found on the Raspberry Pi website.
3+
The Raspberry Pi Documentation website is built from Asciidoc source using a Jekyll and Python toolchain. The website is automatically deployed to the raspberrypi.org site — pushed to production — using GitHub Actions when a push to the `master` branch occurs.
44

5-
In order to submit new or corrected documentation, you have to create a GitHub account (if you don't already have one) and **fork** the original repository to your account. You make changes as you see fit, save them in your repository, then make something called a **pull request** to the original Raspberry Pi repository. This pull request (**PR**) then appears in the Raspberry Pi repository where it can be assessed by the maintainers, copy edited, and, if appropriate, merged with the official repository.
5+
Full instructions for building and running the documentation website locally can be found in the top-level [README.md](README.md) file.
66

7-
The documentation which appears on the Raspberry Pi website is generated from the GitHub repository, and is updated approximately hourly.
7+
In order to contribute new or updated documentation, you must first create a GitHub account and fork the original repository to your own account. You can make changes, save them in your repository, then [make a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) against this repository. The pull request will appear [in the repository](https://github.com/raspberrypi/documentation/pulls) where it can be assessed by the maintainers, copy edited, and if appropriate, merged with the official repository.
88

9-
You will need a GitHub account to perform any of the following operations.
9+
**NOTE:** Unless you are opening a pull request which will only make small corrections, for instance to correct a typo, you are more likely to get traction for your changes if you [open an issue](https://github.com/raspberrypi/documentation/issues) first to discuss the proposed changes.
1010

11-
## Forking a repository
11+
## Type of Content
1212

13-
This is easy. Go to the Raspberry Pi repository, https://github.com/raspberrypi/documentation, and look at the top right of the page. There should be a button labelled **Fork**, which will fork a copy of the repository to your own GitHub account.
13+
We welcome contributions from the community, ranging from correcting small typos all the way through to adding entire new sections to the documentation. However going forward we're going to be fairly targetted about what sort of content we add to the documentation. We are looking to keep the repository, and the documentation, focussed on Raspberry Pi-specific things, rather than having generic Linux or computing content.
1414

15-
## Make Changes
15+
**NOTE:** We are willing to consider toolchain-related contributions, but changes to the toolchain may have knock-on effects in other places so it is possible that apparently benign pull requests that make toolchain changes could be refused for fairly opaque reasons.
1616

17-
In your own copy of the repo, you can now alter or add files.
17+
## Third-Party Services
1818

19-
To edit a file, first find the file in the filename tree, and click on it. This displays the page in fully rendered markup, and on the toolbar at the top of the document (not top of the page) is a small icon of a pencil. This is the edit button. Click on it and the file will appear in the Github editor. You can now edit away to your heart's content. You can click on **Preview changes** to see the fully rendered file with your edits.
19+
In general we will not accept content that is specific to an individual third-party service or product. We will also not embed, or add links, to YouTube videos showing tutorials on how to configure your Raspberry Pi.
2020

21-
At the end of the page is a box called **Commit Changes**. You can either commit your changes directly to your own master branch or create a new branch for use as a pull request. Use the master option, as this means you are making changes to your master copy. Using the branch option will create a new branch in your own repository, but that's a little more complicated to deal with so it won't be described here. If you are making a lot of independent changes over time before pushing the changes to Raspberry Pi, you may wish to investigate the branch option. Update the commit title and enter a description of the change at this point.
22-
23-
Selecting **Commit changes** will make the change to your master branch. You now need to take that change and make a pull request from it.
24-
25-
## Opening a Pull Request
26-
27-
This is pretty easy. Click on the **Pull Requests** tab on the toolbar. Afterwards, there should be a green button just below the toolbar that is labelled **New pull request**. Click it, and a page should appear that asks you to compare changes. This PR page is actually on the Raspberry Pi GitHub page, not the contributor's, because a PR requests the Raspberry Pi repository maintainers to 'pull' from the contributor's repository. The left-hand side should be the `raspberrypi/documentation` repository, and the branch should be the master one. The right-hand side is where the PR is coming from: your GitHub account, and your master branch. Further down the page you should see a list of the commits you want to have in the PR, and, below that, the actual changes.
28-
29-
If you are happy for the PR to be created, click on **Create pull request**.
30-
31-
And that's it! The Raspberry Pi documentation PR list will now have your entry in it. It will be read, assessed for technical correctness, passed to copy editors for final checking, and finally merged to the main documentation tree.
32-
33-
34-
This is a very quick guide to contributing via GitHub, but it will get you started and enable you to make a difference!
21+
## Licensing
3522

23+
The documentation is under a [Creative Commons Attribution-Sharealike](https://creativecommons.org/licenses/by-sa/4.0/) (CC BY-SA 4.0) license. By contributing content to this repository you are agreeing to place your contributions under this license.

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ end
3232

3333
# Performance-booster for watching directories on Windows
3434
gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
35-

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,7 @@ To build without an active internet connection, run
105105
$ OFFLINE_MODE=1 make
106106
```
107107
which will copy the `fonts.html` and `header.html` files from `offline_includes` (instead of downloading them from esi.raspberrypi.org).
108+
109+
## License
110+
111+
The Raspberry Pi documentation is [licensed](https://github.com/raspberrypi/documentation/blob/develop/LICENSE.md) under a Creative Commons Attribution 4.0 International Licence.

documentation/asciidoc/computers/configuration/headless.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ network={
5353

5454
NOTE: Some older Raspberry Pi boards and some USB wireless dongles do not support 5GHz networks.
5555

56-
NOTE: With no keyboard or monitor, you will need some way of xref:remote-access.adoc#remote-access[remotely accessing] your headless Raspberry Pi.
56+
NOTE: With no keyboard or monitor, you will need some way of xref:remote-access.adoc#remote-access[remotely accessing] your headless Raspberry Pi. For headless setup, SSH can be enabled by placing a file named `ssh`, without any extension, onto the boot folder of the SD Card. For more information see the section on xref:remote-access.adoc#ssh[setting up an SSH server].

documentation/asciidoc/computers/configuration/kernel-command-line-config.adoc

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Linux kernel accepts a command line of parameters during boot. On the Raspbe
66
sudo nano /boot/cmdline.txt
77
----
88

9-
Note that we have to use `sudo` to edit anything in the boot partition, and that all parameters in `cmdline.txt` must be on the same line (no carriage returns).
9+
NOTE: We have to use `sudo` to edit anything in the boot partition, and all parameters in `cmdline.txt` must be on the same line (no carriage returns).
1010

1111
The command line that was passed to the kernel at boot time can be displayed using `cat /proc/cmdline`. It will not be exactly the same as that in `cmdline.txt` as the firmware can make changes to it prior to launching the kernel.
1212

@@ -68,7 +68,11 @@ Possible options for the display type, the first part of the `video=` entry, ar
6868

6969
* splash: tells the boot to use a splash screen via the Plymouth module.
7070
* plymouth.ignore-serial-consoles: normally if the Plymouth module is enabled it will prevent boot messages from appearing on any serial console which may be present. This flag tells Plymouth to ignore all serial consoles, making boot messages visible again, as they would be if Plymouth was not running.
71-
* dwc_otg.lpm_enable: turns off Link Power Management (LPM) in the dwc_otg driver; the dwc_otg driver is the driver for the USB controller built into the Raspberry Pi.
72-
* dwc_otg.speed: sets the speed of the USB controller. `dwc_otg.speed=1` will set it to full speed (USB 1.0), which is slower than high speed (USB 2.0). This option should not be set except during troubleshooting of problems with USB devices.
71+
* dwc_otg.lpm_enable=0: turns off Link Power Management (LPM) in the dwc_otg driver; the dwc_otg driver is the driver for the USB controller built into the processor used on Raspberry Pi computers.
72+
+
73+
NOTE: On Raspberry Pi 4 this controller is disabled by default, and is only connected to the type C power input jack; the type A USB ports on Pi 4 are driven by a separate USB controller which is not affected by this setting.
74+
* dwc_otg.speed: sets the speed of the USB controller built into the processor on Raspberry Pi computers. `dwc_otg.speed=1` will set it to full speed (USB 1.0), which is slower than high speed (USB 2.0). This option should not be set except during troubleshooting of problems with USB devices.
75+
+
76+
NOTE: On Raspberry Pi 4 this controller is disabled by default, and is only connected to the type C power input connector; the type A USB ports on Pi 4 are driven by a separate USB controller which is not affected by this setting.
7377
* smsc95xx.turbo_mode: enables/disables the wired networking driver turbo mode. `smsc95xx.turbo_mode=N` turns turbo mode off.
7478
* usbhid.mousepoll: specifies the mouse polling interval. If you have problems with a slow or erratic wireless mouse, setting this to 0 might help: `usbhid.mousepoll=0`.

documentation/asciidoc/computers/linux_kernel/building.adoc

+33-13
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ KERNEL=kernel7
7171
make bcm2709_defconfig
7272
----
7373

74-
For Raspberry Pi 4 default build configuration
74+
For Raspberry Pi 4 default build configuration (32 bit)
7575

7676
[,bash]
7777
----
@@ -80,7 +80,15 @@ KERNEL=kernel7l
8080
make bcm2711_defconfig
8181
----
8282

83-
===== Customising the Kernel version using `LOCALVERSION`
83+
For Raspberry Pi 4 default build configuration (64 bit)
84+
[,bash]
85+
----
86+
cd linux
87+
KERNEL=kernel8
88+
make bcm2711_defconfig
89+
----
90+
91+
===== Customising the Kernel Version Using `LOCALVERSION`
8492

8593
In addition to your kernel configuration changes, you may wish to adjust the `LOCALVERSION` to ensure your new kernel does not receive the same version string as the upstream kernel. This both clarifies you are running your own kernel in the output of `uname` and ensures existing modules in `/lib/modules` are not overwritten.
8694

@@ -94,7 +102,7 @@ You can also change that setting graphically as shown in xref:linux_kernel.adoc#
94102

95103
==== Building the Kernel
96104

97-
Build and install the kernel, modules, and Device Tree blobs; this step can take a *long* time depending on the Pi model in use:
105+
Build and install the kernel, modules, and Device Tree blobs; this step can take a *long* time depending on the Pi model in use. For the 32-bit kernel:
98106

99107
[,bash]
100108
----
@@ -106,6 +114,18 @@ sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
106114
sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
107115
----
108116

117+
For the 64-bit kernel:
118+
119+
[,bash]
120+
----
121+
make -j4 Image modules dtbs
122+
sudo make modules_install
123+
sudo cp arch/arm64/boot/dts/*.dtb /boot/
124+
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/
125+
sudo cp arch/arm64/boot/dts/overlays/README /boot/overlays/
126+
sudo cp arch/arm64/boot/zImage /boot/$KERNEL.img
127+
----
128+
109129
NOTE: On a Raspberry Pi 2/3/4, the `-j4` flag splits the work between all four cores, speeding up compilation significantly.
110130

111131
=== Cross-Compiling the Kernel
@@ -115,7 +135,7 @@ also a Debian distribution, it means many aspects are similar, such as the comma
115135

116136
You can either do this using VirtualBox (or VMWare) on Windows, or install it directly onto your computer. For reference, you can follow instructions online http://www.wikihow.com/Install-Ubuntu-on-VirtualBox[at Wikihow].
117137

118-
==== Install required dependencies and toolchain
138+
==== Install Required Dependencies and Toolchain
119139

120140
To build the sources for cross-compilation, make sure you have the dependencies needed on your machine by executing:
121141

@@ -126,21 +146,21 @@ sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
126146

127147
If you find you need other things, please submit a pull request to change the documentation.
128148

129-
===== Install the 32-bit toolchain for a 32-bit kernel
149+
===== Install the 32-bit Toolchain for a 32-bit Kernel
130150

131151
[,bash]
132152
----
133153
sudo apt install crossbuild-essential-armhf
134154
----
135155

136-
===== Or, install the 64-bit toolchain for a 64-bit kernel
156+
===== Install the 64-bit Toolchain for a 64-bit Kernel
137157

138158
[,bash]
139159
----
140160
sudo apt install crossbuild-essential-arm64
141161
----
142162

143-
==== Get sources
163+
==== Get the Kernel Sources
144164

145165
To download the minimal source tree for the current branch, run:
146166

@@ -155,7 +175,7 @@ See <<choosing_sources,*Choosing sources*>> above for instructions on how to cho
155175

156176
Enter the following commands to build the sources and Device Tree files:
157177

158-
===== 32-bit configs
178+
===== 32-bit Configs
159179

160180
For Pi 1, Pi Zero, Pi Zero W, or Compute Module:
161181

@@ -184,7 +204,7 @@ KERNEL=kernel7l
184204
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2711_defconfig
185205
----
186206

187-
===== 64-bit configs
207+
===== 64-bit Configs
188208

189209
For Pi 3, Pi 3+ or Compute Module 3:
190210

@@ -204,18 +224,18 @@ KERNEL=kernel8
204224
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfig
205225
----
206226

207-
===== Build with configs
227+
===== Build with Configs
208228

209229
NOTE: To speed up compilation on multiprocessor systems, and get some improvement on single processor ones, use `-j n`, where n is the number of processors * 1.5. Alternatively, feel free to experiment and see what works!
210230

211-
====== For all 32-bit builds
231+
====== For all 32-bit Builds
212232

213233
[,bash]
214234
----
215235
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
216236
----
217237

218-
====== For all 64-bit builds
238+
====== For all 64-bit Builds
219239

220240
NOTE: Note the difference between Image target between 32 and 64-bit.
221241

@@ -224,7 +244,7 @@ NOTE: Note the difference between Image target between 32 and 64-bit.
224244
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs
225245
----
226246

227-
==== Install directly onto the SD card
247+
==== Install Directly onto the SD Card
228248

229249
Having built the kernel, you need to copy it onto your Raspberry Pi and install the modules; this is best done directly using an SD card reader.
230250

documentation/asciidoc/computers/remote-access/secure-shell.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[ssh]]
2-
== Setting up a SSH Server
2+
== Setting up an SSH Server
33

44
You can access the command line of a Raspberry Pi remotely from another computer or device on the same network using Secure Shell (SSH).
55

documentation/asciidoc/microcontrollers/microcontroller_docs.adoc

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ https://datasheets.raspberrypi.org/pico/raspberry-pi-pico-c-sdk.pdf[Raspberry Pi
2424

2525
https://datasheets.raspberrypi.org/pico/raspberry-pi-pico-python-sdk.pdf[Raspberry Pi Pico Python SDK]:: A MicroPython environment for RP2040 microcontrollers
2626

27-
The API level Doxygen documentation for the Raspberry Pi Pico C/C++ SDK is also available https://rptl.io/pico-doxygen[as a micro-site].
27+
The API level Doxygen documentation for the Raspberry Pi Pico C/C++ SDK is also available https://rptl.io/pico-doxygen[as a micro-site].
28+
29+
[NOTE]
30+
======
31+
If you are building applications with the C/C++ SDK and targetting boards other than the Raspberry Pi Pico, you will need to pass `-DPICO_BOARD=boardname` to CMake. Here `boardname` is the name of your board, e.g. for the Adafruit Feather RP2040 you should pass `-DPICO_BOARD=adafruit_feather_rp2040`. See the https://github.com/raspberrypi/pico-sdk/tree/master/src/boards[`boards/` directory] in the Pico SDK, and the https://www.raspberrypi.org/forums/viewtopic.php?f=147&t=304393[forums], for more information.
32+
======

documentation/asciidoc/microcontrollers/rp2040/rp2040_based_boards.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ image::images/micromod.jpg[]
6060

6161
https://www.sparkfun.com/products/17720[MicroMod RP2040 Processor]:: The SparkFun MicroMod Pi RP2040 Processor Board is part of SparkFun’s MicroMod modular interface system. The MicroMod M.2 connector makes it a breeze to connect your MicroMod Pi RP2040 Processor with the MicroMod carrier board that gives you the inputs and outputs you need for your project.
6262

63+
=== Other Boards
64+
65+
Discussions around other RP2040-based boards can be found on the https://www.raspberrypi.org/forums/viewforum.php?f=147[forums].
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="legal">
22
<div class="legal-inner">
3-
<p id="copyright">The Raspberry Pi Documentation is Copyright (c) 2012-{{ site.time | date: '%Y' }} Raspberry Pi Trading (Ltd) and is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a> (CC BY-SA) Licence.</p>
4-
<p id="copyright">Some content originates from the <a href="http://elinux.org/">eLinux wiki</a>, and is licensed under the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported</a> license.</p>
3+
<p id="copyright">The Raspberry Pi Documentation is Copyright (c) 2012-{{ site.time | date: '%Y' }} Raspberry Pi (Trading) Ltd and is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a> (CC BY-SA) licence.</p>
4+
<p id="copyright">Some content originates from the <a href="http://elinux.org/">eLinux wiki</a>, and is licensed under the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported</a> licence.</p>
55
</div>
6-
</div>
6+
</div>

jekyll-assets/css/style.css

+68-3
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ ul#tocify-header1 > ul.tocify-subheader {
253253
font-size: 30px;
254254
color: var(--pink);
255255
margin-bottom: 60px;
256+
position: relative;
257+
margin-left: -1rem;
258+
padding-left: 1rem;
256259
}
257260

258261
#content h2 {
@@ -261,6 +264,9 @@ ul#tocify-header1 > ul.tocify-subheader {
261264
color: #343434;
262265
margin-top: 40px;
263266
margin-bottom: 0px;
267+
position: relative;
268+
margin-left: -1rem;
269+
padding-left: 1rem;
264270
}
265271

266272
#content h3 {
@@ -269,6 +275,9 @@ ul#tocify-header1 > ul.tocify-subheader {
269275
color: #343434;
270276
margin-top: 40px;
271277
margin-bottom: 15px;
278+
position: relative;
279+
margin-left: -1rem;
280+
padding-left: 1rem;
272281
}
273282

274283
#content h4 {
@@ -277,11 +286,67 @@ ul#tocify-header1 > ul.tocify-subheader {
277286
color: #343434;
278287
margin-top: 40px;
279288
margin-bottom: 15px;
289+
position: relative;
290+
margin-left: -1rem;
291+
padding-left: 1rem;
280292
}
281293

282-
#content h4 {
283-
margin-top: 40px;
284-
margin-bottom: 15px;
294+
#content h5,
295+
#content h6 {
296+
position: relative;
297+
margin-left: -1rem;
298+
padding-left: 1rem;
299+
}
300+
301+
h1 .anchor,
302+
h2 .anchor,
303+
h3 .anchor,
304+
h4 .anchor,
305+
h5 .anchor,
306+
h6 .anchor {
307+
position: absolute;
308+
top: 0px;
309+
text-decoration: none;
310+
width: 1.75ex;
311+
margin-left: -1.5ex;
312+
visibility: hidden;
313+
font-size: .8em;
314+
font-weight: 400;
315+
padding-top: .05em;
316+
}
317+
318+
h1 .anchor,
319+
h2 .anchor {
320+
top: -5px;
321+
}
322+
323+
h3 .anchor {
324+
top: -3px;
325+
}
326+
327+
h4 .anchor,
328+
h5 .anchor,
329+
h6 .anchor {
330+
top: -2px;
331+
}
332+
333+
h1:hover .anchor,
334+
h2:hover .anchor,
335+
h3:hover .anchor,
336+
h4:hover .anchor,
337+
h5:hover .anchor,
338+
h6:hover .anchor {
339+
color: var(--pink);
340+
visibility: visible;
341+
}
342+
343+
h1 .anchor::before,
344+
h2 .anchor::before,
345+
h3 .anchor::before,
346+
h4 .anchor::before,
347+
h5 .anchor::before,
348+
h6 .anchor::before {
349+
content: "\00a7";
285350
}
286351

287352
#content p {

scripts/create_build_adoc.py

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
:includedir: {}
6161
:doctitle: {}
6262
:page-sub_title: {}
63+
:sectanchors:
6364
6465
{}
6566
""".format(output_subdir, build_dir, '{} - {}'.format(site_config['title'], index_title), index_title, new_contents))

0 commit comments

Comments
 (0)