aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/base-files
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-08-09 17:45:12 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-08-14 12:10:12 +0200
commit75bfc393ba6cffd783e723d3115c25b70836c116 (patch)
treec3dc6d8b544ec5b5e4bb4d6c33f323d43cb0e8fc /target/linux/gemini/base-files
parent07926d7def59e5684b488e9b614342edc19e7eb2 (diff)
downloadupstream-75bfc393ba6cffd783e723d3115c25b70836c116.tar.gz
upstream-75bfc393ba6cffd783e723d3115c25b70836c116.tar.bz2
upstream-75bfc393ba6cffd783e723d3115c25b70836c116.zip
treewide: convert MAC address location offsets to hexadecimal
This changes the offsets for the MAC address location in mtd_get_mac_binary* and mtd_get_mac_text to hexadecimal notation. This will be much clearer for the reader when numbers are big, and will also match the style used for mtd-mac-address in DTS files. (e.g. 0x1006 and 0x5006 are much more useful than 4102 and 20486) Acked-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/gemini/base-files')
-rw-r--r--target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini b/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini
index e387b3c72e..3712975fa8 100644
--- a/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini
+++ b/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini
@@ -17,7 +17,7 @@ set_ether_mac() {
if [ -n "$part" ]; then
DEVID="$(dd if=$part bs=1 skip=119508 count=7 2>/dev/null)"
if [ "$DEVID" = "dns-313" ]; then
- MAC1="$(mtd_get_mac_binary RedBoot 119540)"
+ MAC1="$(mtd_get_mac_binary RedBoot 0x1d2f4)"
ip link set eth0 address "$MAC1" 2>/dev/null
return 0
fi
@@ -30,8 +30,8 @@ set_ether_mac() {
if [ -n "$part" ] ; then
DEVID="$(dd if=$part bs=1 skip=81516 count=7 2>/dev/null)"
if [ "$DEVID" = "ILI9322" ] ; then
- MAC1=$(mtd_get_mac_binary RedBoot 95040)
- MAC2=$(mtd_get_mac_binary RedBoot 95046)
+ MAC1=$(mtd_get_mac_binary RedBoot 0x17340)
+ MAC2=$(mtd_get_mac_binary RedBoot 0x17346)
ip link set eth0 address "$MAC1" 2>/dev/null
ip link set eth1 address "$MAC2" 2>/dev/null
return 0