Skip to content

Commit

Permalink
Get rid of 'legacy' options, just use those for defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Mar 16, 2021
1 parent a78cdc4 commit decff1d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 52 deletions.
19 changes: 0 additions & 19 deletions Sming/Arch/Esp8266/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,5 @@
"filename": "$(FLASH_INIT_DATA_VCC)"
}
}
},
"legacy": {
"description": "Move partition table and config partitions into legacy locations",
"partition_table_offset": "self.devices[0].size - 0x6000",
"partitions": {
"rom0": {
"address": "0x2000",
"size": "0x0F8000"
},
"rf_cal": {
"address": "self.device.size - 0x5000"
},
"phy_init": {
"address": "self.device.size - 0x4000"
},
"sys_param": {
"address": "self.device.size - 0x3000"
}
}
}
}
24 changes: 12 additions & 12 deletions Sming/Arch/Esp8266/standard.hw
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Standard config with single ROM",
"comment": "Should work with any Esp8266 variant",
"arch": "Esp8266",
"partition_table_offset": "0x2000",
"partition_table_offset": "self.devices[0].size - 0x6000",
"devices": {
"spiFlash": {
"type": "flash",
Expand All @@ -12,31 +12,31 @@
}
},
"partitions": {
"rom0": {
"address": "0x002000",
"size": "992K",
"type": "app",
"subtype": "factory",
"filename": "$(RBOOT_ROM_0_BIN)"
},
"phy_init": {
"address": "0x003000",
"address": "self.device.size - 0x4000",
"size": "4K",
"type": "data",
"subtype": "phy",
"filename": "$(FLASH_INIT_DATA)"
},
"sys_param": {
"address": "0x004000",
"address": "self.device.size - 0x3000",
"size": "12K",
"type": "data",
"subtype": "sysparam"
},
"rf_cal": {
"address": "0x007000",
"address": "self.device.size - 0x5000",
"size": "4K",
"type": "data",
"subtype": "rfcal"
},
"rom0": {
"address": "0x008000",
"size": "992K",
"type": "app",
"subtype": "factory",
"filename": "$(RBOOT_ROM_0_BIN)"
}
}
}
}
24 changes: 3 additions & 21 deletions Sming/Components/Storage/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,10 @@ If using this approach, remember to updated your project's ``component.mk`` with
and verify the layout is correct using ``make map``.


Legacy OTA updates
------------------
OTA updates
-----------

Because the standard flash layout has changed, performing OTA updates from Sming 4.2 can be tricky.
There are a several ways to handle this, but the simplest is to retain the existing partition layout.

You can use the ``legacy`` option to move the partition table and configuration partitions
back to their original locations::

make map HWCONFIG_OPTS=legacy

When using this approach, remember to add ``HWCONFIG_OPTS := legacy`` to your project's component.mk file.

If you need to make any further adjustments, see below for how to create a custom profile.
You can use the ``legacy`` option in your profile like this::

.. code-block:: json
"options": ["legacy"]
Check that the displayed partition map corresponds to your project.
When planning OTA updates please check that the displayed partition map corresponds to your project.
For example, the partition table requires a free sector so must not overlap other partitions.

Your OTA update process must include a step to write the partition table to the correct location.
Expand Down

0 comments on commit decff1d

Please sign in to comment.