TS-7680 Safe VLAN
TS-7680 Safe VLAN Mode
As of the Sept. 18, 2018 release of U-Boot, switching to VLAN mode only happens once the kernel is booted. This leaves some time of the switch IC in its standard switch mode before Linux can configure it. As this may not be safe for some applications, we've released an updated U-Boot that can address this by disabling a single Ethernet port until Linux configures the VLAN settings. At this time, there are no plans to push this update in to production. However we have made it available so that customers can use the VLAN functionality without the Ethernet switch IC being in Switch mode for a period of time during bootup.
Note: | If a future U-Boot update is released for the TS-7680, this change will be included and it will not be necessary to update U-Boot as described below. Please subscribe to our PCS notification system to be notified in the case of any production changes to the TS-7680. |
Caution!
While is is a fairly safe process, note that it is possible to render your unit unbootable. Be sure to provide stable power to the TS-7680 as a sudden poweroff during the update may cause the process to not complete and will leave the system without a bootloader. Please contact us if there are any questions or concerns about this process.
Also note that there is still a small gap of time between the switch IC coming out of reset and the port being disabled in U-Boot. While it is only a few milliseconds at most, it may still be possible for packets to cross between switch ports during this time. Our testing has not shown any packets going between the switch's ports between power-on and Linux configuring VLAN mode when this process is followed. This however, does not mean it is not possible for it to occur under specific timing conditions.
How it Works
This process will update the existing U-Boot bootloader to add a command that can disable Ethernet port 1. We will also modify U-Boot's preboot
script to issue this command as early as possible during boot. From there, the VLAN mode can be enabled as outlined in the TS-7680 manual.
Note that this will modify a U-Boot environment variable, preboot
, if this is customized already, be sure the modifications are safe for your application.
Prerequisites
- TS-7680 Rev. C or later
- Running the Sept. 18 2018 image or newer
Installation
When the TS-7680 is booted, download the updated U-Boot binary with the following command:
wget -O /boot/u-boot.sb ftp://ftp.embeddedTS.com/ts-arm-sbc/ts-7680-linux/binaries/u-boot/ts7680-jun192020-switchctl_update-uboot.sb
Set the U-Boot
jumper, and reboot the unit to the U-Boot shell. Once there, run the following:
run update-uboot
env set preboot switchctl -d\; ${preboot}
env save
reset
After being reset, U-Boot should print out the following has and build date:
resetting ... HTLLCLLC U-Boot 2014.10-ga361251c67 (Jun 19 2020 - 16:17:53) CPU: Freescale i.MX28 rev1.2 at 454 MHz ...
Remove the U-Boot
jumper.
From this point on, Ethernet port 1 will be disabled in U-Boot and will remain disabled when booted to Linux unless VLAN mode is set up. Be sure to follow the process in the TS-7680 manual to complete the the VLAN mode setup in Linux.
In order to enable Ethernet port 1 on boot, either issue a subsequent switchctl
command with no options, or remove the command entirely from the preboot
script.
This update process and setting Linux to use VLAN mode can all be completely scripted with U-Boot scripting.