OpenWrt is configured to have Wi-Fi disabled on first boot. Some upgrade scenarios require that wireless connection is enabled by default, though. There are two sections in this guide: one for upgrading an OpenWrt image, the other is suited for flashing OpenWrt from stock (vendor) firmware.
sysupgrade cli tool with a specially prepared restore configuration file.
The method can be used for any OpenWrt image.
You need to have an OpenWrt already running on the router.
It will not work with a vendor ROM.
To flash an OpenWrt image with Wi-Fi enabled:
cat << "EOF" > /etc/uci-defaults/xxx_config uci set wireless.@wifi-device.disabled="0" uci set wireless.@wifi-iface.disabled="0" uci set wireless.@wifi-iface.ssid="OpenWrt" uci set wireless.@wifi-iface.key="changemeplox" uci set wireless.@wifi-iface.encryption="psk2" uci commit wireless EOF
OpenWrtand password to
changemeploxfor default interface on the first radio. You are strongly encouraged to change this password in the above file or at the very least after the first boot.
tar -czvf config.tar.gz /etc/uci-defaults/to create a config file for
rm /etc/uci-defaults/xxx_configto remove this configuration file from the current image in case it is a dual boot device or sysupgrade fails
sysupgrade -n -f config.tar.gz image.binto flash. Note that it will not save the current configuration.
For this you need to build your own image.
Follow the beginners guide to building your own firmware.
make put the
xxx_config from the above section in
files/etc/uci-defaultsrelative to the main build dir.
mkdir -p files/etc/uci-defaults
factory.imgto flash your router