Skip to content

Commit 0587a68

Browse files
author
Alasdair Allan
authored
Merge pull request #2669 from raspberrypi/develop
Push to production
2 parents 81e8411 + 1a0170d commit 0587a68

File tree

7 files changed

+64
-56
lines changed

7 files changed

+64
-56
lines changed

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ GEM
5555
jekyll (>= 3.5, < 5.0)
5656
jekyll-feed (~> 0.9)
5757
jekyll-seo-tag (~> 2.1)
58-
nokogiri (1.13.8)
58+
nokogiri (1.13.9)
5959
mini_portile2 (~> 2.8.0)
6060
racc (~> 1.4)
6161
pathutil (0.16.2)

documentation/asciidoc/computers/compute-module/cm-emmc-flashing.adoc

+10-53
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The Compute Module has an on-board eMMC device connected to the primary SD card
44

55
Please also read the section in the xref:compute-module.adoc#datasheets-and-schematics[Compute Module Datasheets]
66

7+
IMPORTANT: For mass provisioning of CM3, CM3+ and CM4 the https://github.com/raspberrypi/cmprovision[Raspberry Pi Compute Module Provisioning System] is recommended.
8+
79
=== Steps to Flash the eMMC
810

911
To flash the Compute Module eMMC, you either need a Linux system (a Raspberry Pi is recommended, or Ubuntu on a PC) or a Windows system (Windows 10 is recommended). For BCM2837 (CM3), a bug which affected the Mac has been fixed, so this will also work.
@@ -44,60 +46,9 @@ Please ensure you are not writing to any USB devices whilst the installer is run
4446
. Once the driver installation is complete, run the `RPiBoot.exe` tool that was previously installed.
4547
. After a few seconds, the Compute Module eMMC will pop up under Windows as a disk (USB mass storage device).
4648

47-
==== Building `rpiboot` on your host system (Cygwin/Linux)
48-
49-
We will be using Git to get the rpiboot source code, so ensure Git is installed. In Cygwin, use the Cygwin installer. On a Raspberry Pi or other Debian-based Linux machine, use the following command:
50-
51-
[,bash]
52-
----
53-
sudo apt install git
54-
----
55-
56-
Git may produce an error if the date is not set correctly. On a Raspberry Pi, enter the following to correct this:
57-
58-
[,bash]
59-
----
60-
sudo date MMDDhhmm
61-
----
62-
63-
where `MM` is the month, `DD` is the date, and `hh` and `mm` are hours and minutes respectively.
64-
65-
Clone the `usbboot` tool repository:
66-
67-
[,bash]
68-
----
69-
git clone --depth=1 https://github.com/raspberrypi/usbboot
70-
cd usbboot
71-
----
72-
73-
`libusb` must be installed. If you are using Cygwin, please make sure `libusb` is installed as previously described. On Raspberry Pi OS or other Debian-based Linux, enter the following command:
74-
75-
[,bash]
76-
----
77-
sudo apt install libusb-1.0-0-dev
78-
----
79-
80-
Now build and install the `usbboot` tool:
81-
82-
[,bash]
83-
----
84-
make
85-
----
49+
==== Building `rpiboot` on your host system.
8650

87-
Run the `usbboot` tool and it will wait for a connection:
88-
89-
[,bash]
90-
----
91-
sudo ./rpiboot
92-
----
93-
94-
Now plug the host machine into the Compute Module IO board USB slave port and power the CMIO board on. The `rpiboot` tool will discover the Compute Module and send boot code to allow access to the eMMC.
95-
96-
For more information run
97-
98-
----
99-
./rpiboot -h
100-
----
51+
Instructions for building and running the latest release of `rpiboot` are documented in the https://github.com/raspberrypi/usbboot/blob/master/Readme.md#building[usbboot readme] on Github.
10152

10253
==== Writing to the eMMC (Windows)
10354

@@ -140,6 +91,12 @@ The default bootloader configuration on CM4 is designed to support bringup and d
14091

14192
N.B. The Compute Module 4 ROM never runs `recovery.bin` from SD/EMMC and the `rpi-eeprom-update` service is not enabled by default. This is necessary because the EMMC is not removable and an invalid `recovery.bin` file would prevent the system from booting. This can be overridden and used with `self-update` mode where the bootloader can be updated from USB MSD or Network boot. However, `self-update` mode is not an atomic update and therefore not safe in the event of a power failure whilst the EEPROM was being updated.
14293

94+
==== Flashing NVMe / other storage devices.
95+
The new Linux-based https://github.com/raspberrypi/usbboot/blob/master/mass-storage-gadget/README.md[mass-storage gadget] supports flashing of NVMe, EMMC and USB block devices.
96+
This is normally faster than using the `rpiboot` firmware driver and also provides a UART console to the device for easier debug.
97+
98+
See also: https://github.com/raspberrypi/usbboot/blob/master/Readme.md#compute-module-4-extensions[CM4 rpiboot extensions]
99+
143100
==== Modifying the bootloader configuration
144101

145102
To modify the CM4 bootloader configuration:-

documentation/asciidoc/computers/config_txt/memory.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ The recommended maximum values are as follows:
2424
| `384`
2525

2626
| 1GB or greater
27-
| `512`, `256` on the Raspberry Pi 4
27+
| `512`, `76` on the Raspberry Pi 4
2828
|===
2929

30+
IMPORTANT: The default camera stack (libcamera2) on Raspberry Pi OS - Bullseye uses Linux CMA memory to allocate buffers instead of GPU memory so there is no benefit in increasing the GPU memory size.
31+
3032
It is possible to set `gpu_mem` to larger values, however this should be avoided since it can cause problems, such as preventing Linux from booting. The minimum value is `16`, however this disables certain GPU features.
3133

3234
You can also use `gpu_mem_256`, `gpu_mem_512`, and `gpu_mem_1024` to allow swapping the same SD card between Raspberry Pis with different amounts of RAM without having to edit `config.txt` each time:

documentation/asciidoc/computers/configuration/device-tree.adoc

+31
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,37 @@ The root hub port number that the boot device is connected to - possibly via oth
921921

922922
The Logical Unit Number for the mass-storage device.
923923

924+
==== NVMEM nodes
925+
The firmware provides read-only, in-memory copies of portions of the bootloader EEPROM via the https://www.kernel.org/doc/html/latest/driver-api/nvmem.html[NVMEM] Subsystem.
926+
927+
Each region appears as an NVMEM device under `/sys/bus/nvmem/devices/` with a named alias under `/sys/firmware/devicetree/base/aliases`.
928+
929+
Example shell script code for reading an NVMEM mode from https://github.com/raspberrypi/rpi-eeprom/blob/master/rpi-eeprom-update[rpi-eeprom-update]
930+
931+
----
932+
blconfig_alias="/sys/firmware/devicetree/base/aliases/blconfig"
933+
blconfig_nvmem_path=""
934+
935+
if [ -f "${blconfig_alias}" ]; then
936+
blconfig_ofnode_path="/sys/firmware/devicetree/base"$(strings "${blconfig_alias}")""
937+
blconfig_ofnode_link=$(find -L /sys/bus/nvmem -samefile "${blconfig_ofnode_path}" 2>/dev/null)
938+
if [ -e "${blconfig_ofnode_link}" ]; then
939+
blconfig_nvmem_path=$(dirname "${blconfig_ofnode_link}")
940+
fi
941+
fi
942+
fi
943+
----
944+
945+
`blconfig`
946+
947+
The `blconfig` alias refers to an NVMEM device that stores a copy of the bootloader EEPROM config file.
948+
949+
`blpubkey`
950+
951+
The `blpubkey` alias points to an NVMEM device that stores a copy of the bootloader EEPROM public key (if defined) in binary format.
952+
The https://github.com/raspberrypi/usbboot/blob/master/tools/rpi-bootloader-key-convert[rpi-bootloader-key-convert] utility can be used to convert the data into PEM format for use with OpenSSL.
953+
954+
See also: https://github.com/raspberrypi/usbboot#secure-boot[secure-boot]
924955

925956
[[part5]]
926957
=== Troubleshooting

documentation/asciidoc/computers/raspberry-pi/bootflow-2711.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ If `secure-boot` is enabled then `tryboot` mode will cause `tryboot.img` to be l
9090

9191
=== TRYBOOT_A_B mode
9292
If the `tryboot_a_b` property in xref:config_txt.adoc#autoboot-txt[autoboot.txt] is set to `1` then `config.txt` is loaded instead of `tryboot.txt`.
93-
This is because the `tryboot` switch has already been made at a higher level (the partition) and so it's unecessary to have a `tryboot.txt` file within alternate partition itself.
93+
This is because the `tryboot` switch has already been made at a higher level (the partition) and so it's unnecessary to have a `tryboot.txt` file within alternate partition itself.
9494

9595
N.B. The `tryboot_a_b` property is implicitly set to `1` when loading files from within a `boot.img` ramdisk.
9696

26.2 KB
Loading

documentation/index.json

+18
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@
7171
"image": "full-sized/Datasheets.png",
7272
"url": "https://datasheets.raspberrypi.com"
7373
},
74+
{
75+
"title": "Tutorials",
76+
"description": "Hands-on hardware and software tutorials",
77+
"image": "full-sized/Tutorials.png",
78+
"url": "https://www.raspberrypi.com/tutorials/"
79+
},
7480
{
7581
"title": "Forums",
7682
"description": "User and product support forums",
@@ -144,6 +150,12 @@
144150
"image": "full-sized/Datasheets.png",
145151
"url": "https://datasheets.raspberrypi.com"
146152
},
153+
{
154+
"title": "Tutorials",
155+
"description": "Hands-on hardware and software tutorials",
156+
"image": "full-sized/Tutorials.png",
157+
"url": "https://www.raspberrypi.com/tutorials/"
158+
},
147159
{
148160
"title": "Forums",
149161
"description": "User and product support forums",
@@ -192,6 +204,12 @@
192204
"image": "full-sized/Datasheets.png",
193205
"url": "https://datasheets.raspberrypi.com"
194206
},
207+
{
208+
"title": "Tutorials",
209+
"description": "Hands-on hardware and software tutorials",
210+
"image": "full-sized/Tutorials.png",
211+
"url": "https://www.raspberrypi.com/tutorials/"
212+
},
195213
{
196214
"title": "Forums",
197215
"description": "User and product support forums",

0 commit comments

Comments
 (0)