gemini: Use library functions to assign MAC address
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 11 Jun 2019 21:06:53 +0000 (23:06 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 15 Jun 2019 17:55:31 +0000 (19:55 +0200)
commitcd6c3535cd2c7779a8d65f792c36082ee3822c11
treea3c8f32b94522d16123a1f1f1566a06222048600
parentbdbb679adb976f0d2f06e4acbd5a34f63fc949d5
gemini: Use library functions to assign MAC address

This simplifies the ethernet address extraction script
by using standard library functions to locate the MTD
partitions and extract ethernet address from a binary
offset location in the flash. Furthermore, the aging
ifconfig is replaced by the ip tool, which will now
assign the MAC addresses.

Suggested-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[ifconfig replacement, use -n instead of ! -z,
-n requires string to be quoted within the test brackets,
drop prepended "x" in check, add quotes, make local
variables local, kill whitespaces]
target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini