Total length of vendor header is 84 + 32 * (number of pubkeys) + (length of vendor string rounded up to multiple of 4) + (length of vendor image) bytes rounded up to the closest multiple of 512 bytes.
Total length of vendor header is 84 + 32 * (number of pubkeys) +
(length of vendor string rounded up to multiple of 4) +
(length of vendor image) bytes rounded up to the closest multiple
of 512 bytes.
| offset | length | name | description |
|-------:|-------:|------|-------------|
@ -103,7 +113,10 @@ Total length of firmware header is always 512 bytes.
## Various ideas
* Bootloader should be able to read vendor + firmware header and send info about FW to client in features message.
* Bootloader should be able to read vendor + firmware header and send info
about FW to client in features message.
* Bootloader should not try to run firmware if there is not any.
* Storage wiping rule: Don't erase storage when old FW and new FW are signed using the same key set. Otherwise erase.
* Bootloader should send error to client when firmware update fails and allow client to try one more time. This prevents storage area erasure by accident.
* Storage wiping rule: Don't erase storage when old FW and new FW are signed
using the same key set. Otherwise erase.
* Bootloader should send error to client when firmware update fails and allow
client to try one more time. This prevents storage area erasure by accident.
@ -30,7 +32,8 @@ For each pixel a 16-bit value is used. First 5 bits are used for red component,
### Gray-scale
Each pixel is encoded using a 4-bit value. Each byte contains color of two pixels, so it looks like this:
Each pixel is encoded using a 4-bit value.
Each byte contains color of two pixels:
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|
@ -40,7 +43,8 @@ Where Po is odd pixel and Pe is even pixel.
## Compression
Pixel data is compressed using DEFLATE algorithm with 10-bit sliding window and no header. This can be achieved with ZLIB library by using the following:
Pixel data is compressed using DEFLATE algorithm with 10-bit sliding window
and no header. This can be achieved with ZLIB library by using the following: