Modifying Default IP Address During OpenWrt Compilation
Modify the following file openwrt/imx_openwrt/package/base-files/files/bin/config_generate as follows: case "$protocol" in static) local ipad case "$1" in #lan) ipad=${ipaddr:-"192.168.1.1"} ;; #*) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;; lan) ipad=${ipaddr:-"10.168.103.129"} ;; *) ipad=${ipaddr:-"10.168.$((addr_offset++)).1"} ;; esac netm=${netmask:-"255.255.255.0"} uci -q batch <<-EOF set network.$1.proto='static' set network.$1.ipaddr='$ipad' set network.$1.netmask='$netm' EOF [ -e /proc/sys/net/ipv6 ] && uci set network.$1.ip6assign='60' ;; The actual effect is OK: … Read more