diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 152ebdac22..5cd2aa623d 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -153,19 +153,19 @@ endef define U-Boot/nanopi_duo2 BUILD_SUBTARGET:=cortexa7 NAME:=U-Boot for NanoPi Duo2 (H3) - BUILD_DEVICES:=sun8i-h3-nanopi-duo2 + BUILD_DEVICES:=friendyarm-h3-nanopi-duo2 endef define U-Boot/nanopi_r1 BUILD_SUBTARGET:=cortexa7 NAME:=U-Boot for NanoPi R1 (H3) - BUILD_DEVICES:=sun8i-h3-nanopi-r1 + BUILD_DEVICES:=friendyarm-h3-nanopi-r1 endef define U-Boot/nanopi_r1s BUILD_SUBTARGET:=cortexa53 NAME:=NanoPi R1S (H5) - BUILD_DEVICES:=sun50i-h5-nanopi-r1s + BUILD_DEVICES:=friendlyarm-h5-nanopi-r1s DEPENDS:=+PACKAGE_u-boot-nanopi_r1s:arm-trusted-firmware-sunxi UENV:=a64 endef diff --git a/target/linux/sunxi/base-files/etc/board.d/01_leds b/target/linux/sunxi/base-files/etc/board.d/01_leds index 9c534ea50b..8b58ef0902 100755 --- a/target/linux/sunxi/base-files/etc/board.d/01_leds +++ b/target/linux/sunxi/base-files/etc/board.d/01_leds @@ -14,7 +14,7 @@ case "$(board_name)" in *) ;; esac - + board_config_flush exit 0 diff --git a/target/linux/sunxi/base-files/root/setup.sh b/target/linux/sunxi/base-files/root/setup.sh index 575cfc1f5a..e62ed74429 100755 --- a/target/linux/sunxi/base-files/root/setup.sh +++ b/target/linux/sunxi/base-files/root/setup.sh @@ -15,7 +15,7 @@ setup_ssid() wlan_path=/sys/devices/`uci get wireless.${r}.path` wlan_path=`find ${wlan_path} -name wlan* | tail -n 1` local mac=`cat ${wlan_path}/address` - + local dev_path=/sys/devices/`uci get wireless.${r}.path` if [ -e "${dev_path}/../idVendor" -a -e "${dev_path}/../idProduct" ]; then @@ -79,8 +79,28 @@ if [ -f /sys/class/sunxi_info/sys_info ]; then fi fi +# update /etc/config/network +WAN_IF=`uci get network.wan.ifname` +if [ "x${WAN_IF}" = "xeth0" ]; then + uci set network.wan.dns=8.8.8.8 + uci commit +fi + WIFI_NUM=`find /sys/class/net/ -name wlan* | wc -l` if [ ${WIFI_NUM} -gt 0 ]; then + + # make sure lan interface exist + if [ -z "`uci get network.lan`" ]; then + uci batch <