0034-mpc85xx-replace-WDR4900-uci-defaults-ethernet-MAC-address-hack-with-DTS-entry.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 30 Apr 2015 02:12:18 +0200
  3. Subject: mpc85xx: replace WDR4900 uci-defaults ethernet MAC address hack with DTS entry
  4. This also changes the MAC address to one of the adresses actually used by the
  5. stock firmware on one of the ethernet interfaces.
  6. diff --git a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network
  7. index e4e3566..525a552 100755
  8. --- a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network
  9. +++ b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network
  10. @@ -20,8 +20,6 @@ tl-wdr4900-v1)
  11. ucidef_add_switch "switch0" "1" "1"
  12. ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
  13. ucidef_add_switch_vlan "switch0" "2" "0t 1"
  14. - ucidef_set_interface_macaddr lan "$(mtd_get_mac_binary config 338)"
  15. - ucidef_set_interface_macaddr wan "$(mtd_get_mac_binary config 344)"
  16. ;;
  17. *)
  18. ucidef_set_interfaces_lan_wan "eth0" "eth1"
  19. diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
  20. index 49e516c..7e48e23 100644
  21. --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
  22. +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
  23. @@ -63,7 +63,7 @@
  24. label = "rootfs";
  25. };
  26. - config@fe0000 {
  27. + config: config@fe0000 {
  28. reg = <0x00fe0000 0x00010000>;
  29. label = "config";
  30. read-only;
  31. @@ -118,6 +118,7 @@
  32. enet0: ethernet@b0000 {
  33. phy-handle = <&phy0>;
  34. phy-connection-type = "rgmii-id";
  35. + mtd-mac-address = <&config 0x14c>;
  36. };
  37. enet1: ethernet@b1000 {