summaryrefslogtreecommitdiff
path: root/firmware/export/bootdata.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-12-22 20:31:06 +0000
committerAidan MacDonald <amachronic@protonmail.com>2024-03-31 16:57:19 +0100
commitdc9d354ed22b4c6230c6bfe885e8a3d2519b1285 (patch)
treeae7e82354a3599bf3bb24cc25b341ba94d235375 /firmware/export/bootdata.h
parent6ffd42548bf10cda13a01555ff4fa56d4213cdf2 (diff)
downloadrockbox-dc9d354ed22b4c6230c6bfe885e8a3d2519b1285.tar.gz
rockbox-dc9d354ed22b4c6230c6bfe885e8a3d2519b1285.zip
multiboot: Add v1 boot protocol
v1 passes the drive and partition number of the boot volume instead of using the volume number. The volume number isn't reliable because the same filesystem might get a different volume number once the firmware is loaded, which will cause the firmware to use the wrong root volume and fail to locate the correct .rockbox directory. Using drive and partition numbers avoids this issue because drive numbering is fixed and determined by the target. Change-Id: I7e68b892d9424a1f686197a6122e139b438e5f7e
Diffstat (limited to 'firmware/export/bootdata.h')
-rw-r--r--firmware/export/bootdata.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/export/bootdata.h b/firmware/export/bootdata.h
index 319f442511..2a6f96d22e 100644
--- a/firmware/export/bootdata.h
+++ b/firmware/export/bootdata.h
@@ -37,7 +37,7 @@
37 37
38#define BOOT_DATA_MAGIC0 ('r' | 'b' << 8 | 'm' << 16 | 'a' << 24) 38#define BOOT_DATA_MAGIC0 ('r' | 'b' << 8 | 'm' << 16 | 'a' << 24)
39#define BOOT_DATA_MAGIC1 ('g' | 'i' << 8 | 'c' << 16 | '!' << 24) 39#define BOOT_DATA_MAGIC1 ('g' | 'i' << 8 | 'c' << 16 | '!' << 24)
40#define BOOT_DATA_VERSION 0 40#define BOOT_DATA_VERSION 1
41 41
42/* maximum size of payload */ 42/* maximum size of payload */
43#define BOOT_DATA_PAYLOAD_SIZE 4 43#define BOOT_DATA_PAYLOAD_SIZE 4
@@ -59,8 +59,10 @@ struct boot_data_t
59 { 59 {
60 struct 60 struct
61 { 61 {
62 uint8_t boot_volume; 62 uint8_t _boot_volume; /* IGNORED */
63 uint8_t version; 63 uint8_t version;
64 uint8_t boot_drive;
65 uint8_t boot_partition;
64 }; 66 };
65 uint8_t payload[BOOT_DATA_PAYLOAD_SIZE]; 67 uint8_t payload[BOOT_DATA_PAYLOAD_SIZE];
66 }; 68 };