Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:installation:flashing_openwrt_with_wifi_enabled_on_first_boot [2020/04/29 08:34] – [Flashing OpenWrt with Wifi enabled on first boot from vendor ROM] izidocs:guide-user:installation:flashing_openwrt_with_wifi_enabled_on_first_boot [2020/09/20 20:47] – [Flashing OpenWrt with Wifi enabled on first boot] title unified vgaetera
Line 1: Line 1:
-====== Flashing OpenWrt with Wifi enabled on first boot ====== +====== Flashing OpenWrt with Wi-Fi enabled on first boot ====== 
-//OpenWrt// is configured to have Wifi 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) image.+//OpenWrt// is configured to have Wifi disabled on first boot. Some upgrade scenarios require that wireless connection is enabled by default, though. There are two sections in this guideone for upgrading an //OpenWrt// imagethe other is suited for flashing //OpenWrt// from stock (vendor) firmware. 
 + 
 +===== Upgrading OpenWrt with Wifi enabled on first boot =====
  
-====== Upgrading OpenWrt with Wifi enabled on first boot ====== 
 We use ''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. We use ''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 wifi enabled: To flash an //OpenWrt// image with wifi enabled:
  
-  upload the upgrade image to the ''/tmp'' directory +  upload the upgrade image to the ''/tmp'' directory 
-  create a file:  ''/etc/uci-defaults/xxx_config'' **the name prefix is important!** with the following: +  create a file:  ''/etc/uci-defaults/xxx_config'' **the name prefix is important!** with the following: <code>
-<code>+
 #!/bin/sh #!/bin/sh
 uci set wireless.@wifi-device[0].disabled=0 uci set wireless.@wifi-device[0].disabled=0
Line 18: Line 18:
 uci commit wireless uci commit wireless
 </code> </code>
-  This sets the initial name to ''OpenWrt'' and password to ''changemeplox'' for 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. +  This sets the initial name to ''OpenWrt'' and password to ''changemeplox'' for 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. 
-  change directory to ''/tmp'' +  change directory to ''/tmp'' 
-  run ''tar -czvf config.tar.gz /etc/uci-defaults/'' to create a config file for ''sysupgrade'' +  run ''tar -czvf config.tar.gz /etc/uci-defaults/'' to create a config file for ''sysupgrade'' 
-  run ''rm /etc/uci-defaults/xxx_config'' to remove this configuration file from the current image in case it is a dual boot device or sysupgrade fails +  run ''rm /etc/uci-defaults/xxx_config'' to remove this configuration file from the current image in case it is a dual boot device or sysupgrade fails 
-  run ''sysupgrade -n -f config.tar.gz image.bin'' to flash. Note that it will not save the current configuration.+  run ''sysupgrade -n -f config.tar.gz image.bin'' to flash. Note that it will not save the current configuration.
  
-====== Flashing OpenWrt with Wifi enabled on first boot from vendor ROM ====== +===== Flashing OpenWrt with Wifi enabled on first boot from vendor ROM ===== 
-For this you need to build your own image. Follow the guideline for building your rom. [[docs:guide-user:additional-software:beginners-build-guide|guide]]+For this you need to build your own image. Follow the [[docs:guide-user:additional-software:beginners-build-guide|beginners guide to building your own firmware]].
 Before ''make'' put the ''xxx_config'' from the above section in ''files/etc/uci-defaults'' directory. Before ''make'' put the ''xxx_config'' from the above section in ''files/etc/uci-defaults'' directory.
  
-  Create ''files/etc/uci-defaults'' relative to the main build dir. +  Create ''files/etc/uci-defaults'' relative to the main build dir. <code>mkdir -p files/etc/uci-defaults</code> 
-<code>mkdir -p files/etc/uci-defaults</code> +  use your favourite editor to create ''xxx_config'' <code>pico files/etc/uci-defaults/xxx_config</code>  
-  use your favourite editor to create ''xxx_config'' +  Build - also make sure you read guidelines how to speed up the build process (download all before build and build with ''-jx'') <code>make</code>  
-<code>pico files/etc/uci-defaults/xxx_config</code>  +  use ''factory.img'' to flash your router
-  Build - also make sure you read guidelines how to speed up the build process (download all before build and build with -jx) +
-<code>make</code>  +
-  * remember to use factory.img to flash your router+
  
  
-====== Additional Information =====+===== Additional Information =====
-For ''sysupgrade'' documentation please consult [[docs:techref:sysupgrade|Sysupgrade – Technical Reference]]+
  
-For ''UCI defaults'' documentation - [[docs:guide-developer:uci-defaults|UCI defaults]]+  * [[docs:techref:sysupgrade|Sysupgrade – Technical Reference]] 
 +  * [[docs:guide-developer:uci-defaults|UCI defaults]] 
 +  * [[docs:guide-user:additional-software:imagebuilder|Using the Image Builder]] 
 +  * [[docs:guide-developer:build-system:use-buildsystem|Build system – Usage]]
  
 The same method can be used for any other configuration you need on the first boot. For example MAC address override on Wan interface. The same method can be used for any other configuration you need on the first boot. For example MAC address override on Wan interface.
- 
  
  • Last modified: 2021/10/15 08:27
  • by bobafetthotmail