<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/stintel/scripts/mercusys-fwup.py, branch master</title>
<subtitle>Staging tree of Stijn Tintel</subtitle>
<id>https://git.openwrt.org/openwrt/staging/stintel/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/stintel/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/'/>
<updated>2026-10-02T09:09:30Z</updated>
<entry>
<title>scripts: add Mercusys fwup image generator</title>
<updated>2026-10-02T09:09:30Z</updated>
<author>
<name>Johan Alvarado</name>
</author>
<published>2026-08-26T16:30:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/stintel/commit/?id=b5a84a3323584b47f4dd7a7ebf1bae73630a3af0'/>
<id>urn:sha1:b5a84a3323584b47f4dd7a7ebf1bae73630a3af0</id>
<content type='text'>
Mercusys devices whose stock web UI expects an fwup container reject the
tplink-image-2022 container: the loader picks its verification algorithm
from the fw-type string at offset 0x14, which that container does not
write.

Build the container the loader accepts, with the fw-type string, the
support list and the MD5 placeholder digest in place.

This is a separate script rather than a flag on tplink-mkimage-2022.py
because only the first 0x14 bytes match, the BE length and the salted MD5
over file[4:]. That script writes 0xff filler up to 0x1014, a table there
(&gt;2I rootfs_size/num_items, then &gt;I32s2I entries), data at a fixed 0x1814
base, the rootfs first and a packed &gt;4B1I2I soft version. The fwup
container has no table: 0x2c records of name[32] + &gt;III base, next_off,
size, each followed by its own data and chained through next_off until 0,
the rootfs appended after the last record, and the soft version as ASCII
soft_ver: in an ordinary record.

Signed-off-by: Johan Alvarado &lt;contact@c127.dev&gt;
Link: https://github.com/openwrt/openwrt/pull/24919
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
</feed>
