We have 200 GL-S1300 and need to install our custom openwrt image.
Is there any method to flash the transition image automatically? For example, by tftp.
Would be possible to prepare a system with a tftp server so we could start uboot and update itself or would we have to manually install the transition image?
Hi @hansome, is there any method to install s1300-factory-to-openwrt.img and openwrt automatically when booting into uboot with the reset button?
I could prepare two GL-AR300M with TFTP and use one to flash s1300-factory-to-openwrt.img and another one for the openwrt image, this way it would boot plugged to the first one and when finished it would boot plugged to the second one.
Automatic upgrade by tftp can be turned on by setting uboot env:
By openwrt command:
fw_setenv tftp_upgrade 1
or uboot command
setenv tftp_upgrade 1
saveenv
And the filename should be renamed:
s1300-factory-to-openwrt.img → qsdk-gl-s1300.bin
openwrt.bin → openwrt-gl-s1300.bin
and it should be put on two tftp server as you think.
Better flash openwrt-gl-s1300.bin firstly, when finished it will still boot to factory firmware, then power off and switch to tftp server with qsdk-gl-s1300.bin file.
Some user will think it is a security issue, say, if the system reboot, and there’s a tftpd server with ip of 192.168.1.1 on your LAN network and firmware file ready, the firmware will be flashed.
Yes i’m thinking about that, i see more as a feature than a security issue.
Let me explain, Three conditions must be met in order to upgrade:
There must be a host with the ip of the update server.
It must have a TFTP server.
It must have exactly the file name you are looking for.
If these three conditions are met … you know what you are doing, why should I stop you?
My question was more about whether there might be a conflict, but I’ve already seen that a problem was solved if there was a host with the ip of the update server but the TFTP server was not responding.
In any case, I’ll probably end up installing uboot-envtools and /etc/fw_env.config in our firmware to disable the auto-update once the process is finished.
Removing read-only is secure as you do. And in stock firmware all partitions are writable, can be checked here, it’s not using the gl-inet/openwrt repository.