diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-03-25 14:57:49 -0500 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-03-25 15:21:20 -0500 |
commit | 2f67a27500b8ec789dedd9cd0a541a95db0d81d2 (patch) | |
tree | 0eae8449a86ca9fd249fdd9df8c782b6c102f68b | |
parent | 872fd8e3efb98e0fcb42c458093dc3c7ab02b4df (diff) | |
download | talos-skiboot-03-26-2018.tar.gz talos-skiboot-03-26-2018.zip |
Mark all partitions except full PNOR and boot kernel firmware read only03-26-2018
-rw-r--r-- | core/flash.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/flash.c b/core/flash.c index 316e2fb2..4187e930 100644 --- a/core/flash.c +++ b/core/flash.c @@ -393,6 +393,13 @@ static struct dt_node *flash_add_dt_node(struct flash *flash, int id) partition_node = dt_new_addr(partition_container_node, "partition", ffs_part_start); dt_add_property_strings(partition_node, "label", name); dt_add_property_cells(partition_node, "reg", ffs_part_start, ffs_part_size); + if (part_name_map[i].id != RESOURCE_ID_KERNEL_FW) { + /* Mark all partitions other than the full PNOR and the boot kernel + * firmware as read only. These two partitions are the only partitions + * that are properly erase block aligned at this time. + */ + dt_add_property(partition_node, "read-only", NULL, 0); + } } partition_node = dt_new_addr(partition_container_node, "partition", 0); |