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
Copy file name to clipboardExpand all lines: documentation/asciidoc/accessories/audio/getting_started.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
@@ -125,7 +125,7 @@ Ctrl X, Y and Enter to save, then reboot your device.
125
125
126
126
The final step is to ensure that everything is operating as expected. Press the button and release it when you hear the burp. The recording will now begin for a period of five seconds. Once you have released the button, press it briefly again to hear the recording. Repeat this process as many times as you wish, and your sounds will be played at random. You can delete all recordings by pressing and holding the button, keeping the button pressed during the first burp and recording process, and releasing it after at least 20 seconds, at which point you will hear another burp sound confirming that the recordings have been deleted.
Copy file name to clipboardExpand all lines: documentation/asciidoc/computers/config_txt/autoboot.adoc
+38-6Lines changed: 38 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,18 +24,50 @@ Set this property to `1` to load the normal `config.txt` and `boot.img` files in
24
24
This enables the `tryboot` switch to be made at the partition level rather than the file-level without having to modify configuration files in the A/B partitions.
25
25
26
26
27
-
=== A/B boot example
28
-
In the following example partition `3` would be contain the pending OS upgrade and would be tested by rebooting in `tryboot` mode (`sudo reboot "0 tryboot"`).
29
-
If the OS determines that the upgrade was successful then it would replace `autoboot.txt` swapping the partition numbers.
30
-
Otherwise, if the system is reboot (e.g. watchdog or cold boot) then system would boot from partition `2` as usual.
27
+
=== Example update flow for A/B booting
31
28
32
-
Since the `autoboot.txt` file is a single sector it will normally be possible to update this with a single sector update to the SD/EMMC.
29
+
The following pseudo code shows how an hypothetical OS `Update Service` could use `tryboot` + `autoboot.txt` to perform an fail-safe OS upgrade.
33
30
34
-
`autoboot.txt`
31
+
Initial `autoboot.txt`
35
32
----
36
33
[all]
37
34
tryboot_a_b=1
38
35
boot_partition=2
39
36
[tryboot]
40
37
boot_partition=3
41
38
----
39
+
40
+
**Installing the update**
41
+
42
+
* System is powered on and boots to partition 2 by default.
43
+
* An `Update Service` downloads the next version of the OS to partition 3.
44
+
* The update is tested by rebooting to `tryboot` mode `reboot "0 tryboot"` where `0` means the default partition.
45
+
46
+
**Committing or cancelling the update**
47
+
48
+
* System boots from partition 3 because the `[tryboot]` filter evaluates to true in `tryboot mode`.
49
+
* If tryboot is active (`/proc/device-tree/chosen/bootloader/tryboot == 1`)
50
+
** If the current boot partition (`/proc/device-tree/chosen/bootloader/partition`) matches the `boot_partition` in the `[tryboot]` section of `autoboot.txt`
51
+
*** The `Update Service` validates the system to verify that the update was successful.
52
+
*** If the update was successful
53
+
**** Replace `autoboot.txt` swapping the `boot_partition` configuration.
54
+
**** Normal reboot - partition 3 is now the default boot partition.
55
+
*** Else
56
+
**** `Update Service` marks the update as failed e.g. it removes the update files.
57
+
**** Normal reboot - partition 2 is still the default boot partition because the `tryboot` flag is automatically cleared.
58
+
*** End if
59
+
** End If
60
+
* End If
61
+
62
+
Updated `autoboot.txt`
63
+
----
64
+
[all]
65
+
tryboot_a_b=1
66
+
boot_partition=3
67
+
[tryboot]
68
+
boot_partition=2
69
+
----
70
+
71
+
**Notes**
72
+
* It's not mandatory to reboot after updating `autoboot.txt`. However, the `Update Service` must be careful to avoid overwriting the current partition since `autoboot.txt` has already been modified to commit the last update..
73
+
* See also: xref:configuration.adoc#device-trees-overlays-and-parameters[Device-tree parameters].
Copy file name to clipboardExpand all lines: documentation/asciidoc/computers/configuration/device-tree.adoc
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -801,10 +801,6 @@ As it is too time-consuming to document the individual overlays here, please ref
801
801
=== Firmware parameters
802
802
The firmware uses the special https://www.kernel.org/doc/html/latest/devicetree/usage-model.html#runtime-configuration[/chosen] node to pass parameters between the bootloader and/or firmware and the operating system.
803
803
804
-
`boot-mode` - 32-bit integer
805
-
806
-
The boot-mode used to load the kernel. See xref:raspberry-pi.adoc#BOOT_ORDER[BOOT_ORDER].
807
-
808
804
`overlay_prefix` - string
809
805
810
806
The xref:config_txt.adoc#overlay_prefix[overlay_prefix] string selected by `config.txt`.
@@ -813,14 +809,6 @@ The xref:config_txt.adoc#overlay_prefix[overlay_prefix] string selected by `conf
813
809
814
810
The xref:config_txt.adoc#os_prefix[os_prefix] string selected by `config.txt`.
815
811
816
-
`partition` - 32-bit integer
817
-
818
-
The partition number used during boot. If a `boot.img` ramdisk is loaded then this refers to partition that the ramdisk was loaded from rather than the partition number within the ramdisk.
819
-
820
-
`pm_rsts` - 32-bit integer
821
-
822
-
The value of the `PM_RSTS` register during boot.
823
-
824
812
`rpi-boardrev-ext` - 32-bit integer
825
813
826
814
The extended board revision code from xref:raspberry-pi.adoc#otp-register-and-bit-definitions[OTP row 33].
@@ -829,11 +817,24 @@ The extended board revision code from xref:raspberry-pi.adoc#otp-register-and-bi
829
817
830
818
The country code used used by https://github.com/raspberrypi-ui/piwiz[PiWiz] - Pi400 only.
831
819
820
+
==== Common bootloader properties `/chosen/bootloader`
821
+
`boot-mode` - 32-bit integer
822
+
823
+
The boot-mode used to load the kernel. See xref:raspberry-pi.adoc#BOOT_ORDER[BOOT_ORDER].
824
+
825
+
`partition` - 32-bit integer
826
+
827
+
The partition number used during boot. If a `boot.img` ramdisk is loaded then this refers to partition that the ramdisk was loaded from rather than the partition number within the ramdisk.
0 commit comments