We use the SoC's UUID to generate a fixed MAC for a particular
switch device. The MAC generated uses a Realtek prefix and then
is followed by 3 bytes genertaed from the first 3 bytes of the
UUID xored with the last byte in order to prevent being able
to deduce the UUID from the public MAC.
RTL has up to 3 SCL pins and up to 4 SDA pins. Lets allow configuring
I2C with individual BUS numbers instead of 0/1 I2C.
This enables support for devices where SCL line is not shared between
SFP modules. MUX registry is now initialized depending on needed
pin function.
More over, some SFP pins require special MUX settings, lets initialize
those depending on SFP configuration. This adds TX Disable pin,
which right now is set to low at startup.
Caveats:
- We may still override MUX registry later
- Not sure how to handle invalid bus definitions
- Without SFP is it fine to *not* initialize anything?
- Do to RAM limitation we do inititalize output GPIO to low
This removes the limitation that a file served from FLASH memory
needs to be smaller than the TCP buffer size. Now we serve up to
the TCP buffer size in the first go and then remember what parts
still need to be sent. As soon as the previous package has been
acked, the next chunk of data is copied from flash into the
TCP transmit buffer and gets sent. We take care only to send
the current TCP window size so no further fragmentation needs to
happen, thus optimizing transmission of the remainder.
The Makefile has the version number and generates a version.h which
has VERSION_SW define that looks like "v<VERSION>-g<GIT_SHORT_HASH>".
Software version shows at boot in the serial console.
And shown with command: `version`.
It can also be requested via `information.json`.
```
{
"ip_address": "192.168.10.247",
"ip_gateway": "192.168.10.1",
"ip_netmask": "255.255.255.0",
"mac_address": "1c:2a:a3:23:00:02",
"sw_ver": "v0.1.0-gd48235f",
"hw_ver": "SWGT024-V2.0"
}
```