show firmware details from image header
This commit is contained in:
parent
92e3c2a583
commit
6caaf17205
2 changed files with 24 additions and 3 deletions
|
@ -190,6 +190,10 @@ class FlashSize(EnumSchemaByNameMixin, IntEnum):
|
||||||
SIZE_64MB = 6
|
SIZE_64MB = 6
|
||||||
SIZE_128MB = 7
|
SIZE_128MB = 7
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pretty_name(self):
|
||||||
|
return self.name.removeprefix('SIZE_')
|
||||||
|
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
class FlashFrequency(EnumSchemaByNameMixin, IntEnum):
|
class FlashFrequency(EnumSchemaByNameMixin, IntEnum):
|
||||||
|
@ -198,12 +202,20 @@ class FlashFrequency(EnumSchemaByNameMixin, IntEnum):
|
||||||
FREQ_20MHZ = 2
|
FREQ_20MHZ = 2
|
||||||
FREQ_80MHZ = 0xf
|
FREQ_80MHZ = 0xf
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pretty_name(self):
|
||||||
|
return self.name.removeprefix('FREQ_').replace('MHZ', 'Mhz')
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class FlashSettings:
|
class FlashSettings:
|
||||||
size: FlashSize
|
size: FlashSize
|
||||||
frequency: FlashFrequency
|
frequency: FlashFrequency
|
||||||
|
|
||||||
|
@property
|
||||||
|
def display(self):
|
||||||
|
return f"{self.size.pretty_name} ({self.frequency.pretty_name})"
|
||||||
|
|
||||||
|
|
||||||
@unique
|
@unique
|
||||||
class ChipType(EnumSchemaByNameMixin, IntEnum):
|
class ChipType(EnumSchemaByNameMixin, IntEnum):
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<strong>Project name:</strong> {{ build.version.project_name }}<br>
|
<strong>Project name:</strong> {{ build.version.project_name }}<br>
|
||||||
<strong>Version:</strong> <a href="{% url 'mesh.firmwares.detail' pk=build.version.pk %}">{{ build.version.version }}</a><br>
|
<strong>Version:</strong> <a href="{% url 'mesh.firmwares.detail' pk=build.version.pk %}">{{ build.version.version }}</a><br>
|
||||||
|
@ -15,10 +16,18 @@
|
||||||
<strong>Uploader:</strong> {{ build.version.uploader }}<br>
|
<strong>Uploader:</strong> {{ build.version.uploader }}<br>
|
||||||
<strong>Created:</strong> {{ build.version.created }}<br>
|
<strong>Created:</strong> {{ build.version.created }}<br>
|
||||||
</p>
|
</p>
|
||||||
<o>
|
<p>
|
||||||
<strong>Variant:</strong> {{ build.variant }}<br>
|
<strong>Variant:</strong> {{ build.variant }}<br>
|
||||||
<strong>Chip:</strong> {{ build.get_chip_display }}<br>
|
<strong>Chip:</strong> {{ build.get_chip_display }}
|
||||||
</o>
|
<small>
|
||||||
|
>=rev{{ build.firmware_image.ext_header.min_chip_rev.0 }}.{{ build.firmware_image.ext_header.min_chip_rev.1 }}
|
||||||
|
<=rev{{ build.firmware_image.ext_header.max_chip_rev.0 }}.{{ build.firmware_image.ext_header.max_chip_rev.1 }}
|
||||||
|
</small>
|
||||||
|
<br>
|
||||||
|
<strong>Flash:</strong> {{ build.firmware_image.header.flash_stuff.display }}<br>
|
||||||
|
<strong>SPI Flash Mode:</strong> {{ build.firmware_image.header.spi_flash_mode.name }}<br>
|
||||||
|
<strong>App ELF SHA256:</strong> <small>{{ build.sha256_hash }}</small><br>
|
||||||
|
</p>
|
||||||
<h4>Compatible boards:</h4>
|
<h4>Compatible boards:</h4>
|
||||||
<ul>
|
<ul>
|
||||||
{% for board in build.boards %}
|
{% for board in build.boards %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue