summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIrina Patru <irina.patru@intel.com>2016-05-19 16:50:45 +0300
committerStanacar, Stefan <stefan.stanacar@intel.com>2016-06-21 12:54:17 +0100
commit4c9d29a1a0e17ea38bdec47ac1ca4fc9b9fff2ea (patch)
tree6cc820cb6be4159fc02d678f0d9263bf27c9f917
parent2132533da355ba0d78010ffa8667f0d08a076359 (diff)
downloadedison-u-boot-4c9d29a1a0e17ea38bdec47ac1ca4fc9b9fff2ea.tar.gz
edison: Update boot_ctrl structure
Added more information to the bootloader control structure. Change-Id: Iba9477ac67af5e48d74c02e4a803a350dc1263a2 Tracked-On: https://jira01.devtools.intel.com/browse/BP-418 Signed-off-by: Irina Patru <irina.patru@intel.com> Reviewed-on: https://android.intel.com/507527 Reviewed-by: Stanacar, Stefan <stefan.stanacar@intel.com>
-rw-r--r--common/cmd_boot_brillo.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/common/cmd_boot_brillo.c b/common/cmd_boot_brillo.c
index 56cb740535..0f2a4cd7b6 100644
--- a/common/cmd_boot_brillo.c
+++ b/common/cmd_boot_brillo.c
@@ -91,18 +91,35 @@ struct slot_metadata {
uint8_t successful_boot : 1;
} __attribute__((packed));
-#define BOOT_CTRL_MAGIC 0x42424100
+#define BOOT_CTRL_MAGIC 0x42414342
struct boot_ctrl {
+ /* NUL terminated active slot suffix. */
+ char slot_suffix[4];
+
/* Magic for identification - '\0ABB' (Boot Contrl Magic) */
uint32_t magic;
/* Version of struct. */
uint8_t version;
- /* Information about each slot. */
- struct slot_metadata slot_info[2];
- uint8_t recovery_tries_remaining;
+ /* Number of slots being managed. */
+ uint8_t nb_slot : 3;
+
+ /* Number of times left attempting to boot recovery. */
+ uint8_t recovery_tries_remaining : 3;
+
+ /* Ensure 4-bytes alignment for slot_info field. */
+ uint8_t reserved0[2];
+
+ /* Per-slot information. Up to 4 slots. */
+ struct slot_metadata slot_info[4];
+
+ /* Reserved for further use. */
+ uint8_t reserved1[8];
+
+ /* CRC32 of all 28 bytes preceding this field (little endian format). */
+ uint32_t crc32_le;
} __attribute__((packed));
extern bool fb_get_wipe_userdata_response(void);