aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/base-files/lib')
-rw-r--r--target/linux/ramips/base-files/lib/preinit/06_set_iface_mac5
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh7
3 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
index 591c549d14..0ff21892d6 100644
--- a/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
+++ b/target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
@@ -30,6 +30,11 @@ preinit_set_mac_address() {
mac=$(ramips_get_mac_binary devdata 16388)
ifconfig eth0 hw ether $mac 2>/dev/null
;;
+ dir-645)
+ mac=$(ramips_get_mac_nvram nvram lanmac)
+ mac=$(maccalc or "$mac" "02:00:00:00:00:00")
+ ifconfig eth0 hw ether $mac 2>/dev/null
+ ;;
dap-1350)
mac=$(ramips_get_mac_binary devdata 46)
ifconfig eth0 hw ether $mac 2>/dev/null
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 90c28b7ab6..90afa49bb4 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -92,6 +92,9 @@ ramips_board_name() {
*"DIR-615 H1")
name="dir-615-h1"
;;
+ *"DIR-645")
+ name="dir-645"
+ ;;
*"DAP-1350")
name="dap-1350"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 2857599d0b..ba04a4a4aa 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -57,6 +57,13 @@ platform_check_image() {
}
return 0
;;
+ dir-645)
+ [ "$magic" != "5ea3a417" ] && {
+ echo "Invalid image type."
+ return 1
+ }
+ return 0
+ ;;
esac
echo "Sysupgrade is not yet supported on $board."