Support for RTL838x based managed switches

The OEM firmware is shared between all(?) the different GS1900 models, even the ones with more ports and therefore another SoC variant. So creating shared upgrade packages should not be a problem.

By experimenting a bit I found that the ZyXEL OEM firmware upgrade prcess checks three parts of the image:

  1. the U-Boot image magic must be that special 0x83800000

  2. the four letter hardware identifier must match one of the versions in the list at the end of the image

  3. The new version must be larger than some pre-configured minimum version (this refers only to the version number in the appended support-list - the version in the image header is not checked)

Note: the boot loader does not validate any of this on the ZyXELs. Not even the magic. This list is only relevant for flashing from the OEM UI.

The last check seems to match version numbers found in the (binary only) boardconf.ko module in the OEM firmware. My GS1900-10HP insists that the version must be 2.10 or greater. This matches the strings we can dump from board_conf.ko:

GS1900-10HP
RTL8380M
V2.10(AAZI.0)
V2.60(AAZI.2)
GS1900-10HP
V1.0.

The two entries for the 8HP variants both have the same four letter id, but seem to specific different minimum versions:

GS1900-8HP
RTL8380M
V1.00(AAHI.0)
V2.60(AAHI.2)
GS1900-8HP
V1.0.
GS1900-8HP
RTL8380M
V2.10(AAHI.0)
V2.60(AAHI.2)
GS1900-8HP
V2.0.

This means that any image claiming to be version 2.10 or higher and supporting "AAHI" will be flashable from OEM on both 8HP revisions. I believe the fact that they reused this code on both revisions is a strong indication that the hardware differences are mostly irrelevant to software.

We probably need to make the ZyXEL four letter id a device variable so we can create initramfs images which only will be flashable on matching hardware, since we (most likely) will end up producing different images for models with a different set of ports etc. But we can derive that map from the string dump of board_conf.ko so that won't be a problem.

4 Likes