Remote flashing
I've been thinking for a while now, about how to update the switches
when we have
over 200 units scattered in the campus...
well now we have already 20 and any time we want to flash them...
we're
using students... not nice for them and we cannot do it constantly.
Besides this, there is another physical limitation when the switches are
not in the
lab: press the flash button or shortcut the pins and
then restart... this is a no go for switches that are deployed in not
accessible
racks...
A solution, remote update using the command from barebox "update"
barebox
update -t barebox -d nand –m tftp -f /tftpboot/images/barebox.img
bareboxenv
update -t bareboxenv -d nand –m tftp -f /tftpboot/images/bareboxenv
kernel
update -t kernel -d nand –m tftp -f /tftpboot/images/uImage-pcm051
rootfs
update -t rootfs -d nand –m tftp -f /tftpboot/images/rootfs.ubi
This command just download a firmware and flash it. I add some config
files and
a script for having same logic.
The architecture is server/client. And the layout of in the server/client:
SERVER CLIENT
------ ------
tftboot barebox
|-image |-env
|-wrs_remote_update |-tmp/wrs_remote_update & wrs_version
|-wrs_version |-firmware_version
|-firmware |-bin
|-update-firmware
The server:
The idea is to have a folder (tftp/image) in a server, in our case in
Timing Management Server
(the same we use for booting the switch using NFS (dhcp+tftp+nfs),
getting statistics etc...),
with the images. To control the updates there another two files: