summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteve Rae <srae@broadcom.com>2014-12-12 15:51:54 -0800
committerLukasz Majewski <l.majewski@samsung.com>2014-12-18 12:26:06 +0100
commit0ff7e585df83470139739533bdbf41114f395470 (patch)
tree7c50bcefd64e0a4a59d59e26a9f664f59143f9e7 /include
parente1f6b0a02d3bf45737fcb2addf4125cebe0cbcf9 (diff)
downloadu-boot-imx-0ff7e585df83470139739533bdbf41114f395470.zip
u-boot-imx-0ff7e585df83470139739533bdbf41114f395470.tar.gz
u-boot-imx-0ff7e585df83470139739533bdbf41114f395470.tar.bz2
fastboot: handle flash write to GPT partitions
Implement a feature to allow fastboot to write the downloaded image to the space reserved for the Protective MBR and the Primary GUID Partition Table. Additionally, prepare and write the Backup GUID Partition Table. Signed-off-by: Steve Rae <srae@broadcom.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [Test HW: Exynos4412 - Trats2]
Diffstat (limited to 'include')
-rw-r--r--include/part.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/part.h b/include/part.h
index a496a4a..8ea9b30 100644
--- a/include/part.h
+++ b/include/part.h
@@ -244,6 +244,26 @@ int gpt_fill_header(block_dev_desc_t *dev_desc, gpt_header *gpt_h,
*/
int gpt_restore(block_dev_desc_t *dev_desc, char *str_disk_guid,
disk_partition_t *partitions, const int parts_count);
+
+/**
+ * is_valid_gpt_buf() - Ensure that the Primary GPT information is valid
+ *
+ * @param dev_desc - block device descriptor
+ * @param buf - buffer which contains the MBR and Primary GPT info
+ *
+ * @return - '0' on success, otherwise error
+ */
+int is_valid_gpt_buf(block_dev_desc_t *dev_desc, void *buf);
+
+/**
+ * write_mbr_and_gpt_partitions() - write MBR, Primary GPT and Backup GPT
+ *
+ * @param dev_desc - block device descriptor
+ * @param buf - buffer which contains the MBR and Primary GPT info
+ *
+ * @return - '0' on success, otherwise error
+ */
+int write_mbr_and_gpt_partitions(block_dev_desc_t *dev_desc, void *buf);
#endif
#endif /* _PART_H */