Using a BT HomeHub 5A, I noticed that the "Port Status" section of the Luci Status Page showed the dsl0 port and lan1 -- lan4. But it didn't show the wan port (physically the red port, labelled WAN).
By adding wan into the list at network.lan.ports in board.json, this port shows up.
But what else is board.json used for? Is this change likely to break anything? And if it won't break anything, where in the source tree should I make a PR?
Can I please check: are you using the red WAN port as a fifth lan port, or are you using the red WAN port as your "wan uplink" port i.e. instead of the DSL port? (Or, possibly, you might even be using it for something else!)
As far as I'm aware, /etc/board.json is used to create (some of) the config files in /etc/config if they don't exist (i.e. normally on firstboot). I've tested this by deleting /etc/config/network and rebooting - something, somewhere, uses the contents of /etc/board.json to create the default version of /etc/config/network. Interestingly, /etc/board.json is also created on boot if it doesn't exist, so AFAIK it's not in the source tree - see here and here for (slightly) more info. HTH.
It looks like at least part of /etc/board.json is set in the base-files section of the openwrt build source for the target. For example, for a rockchip target, see
../target/linux/rockchip/armv8/base-files/etc/board.d
I'm looking to see if other parts of that json file get populated elsewhere.