diff options
author | Davide Fioravanti <pantanastyle@gmail.com> | 2020-09-02 01:18:16 +0200 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2021-11-01 00:56:51 +0100 |
commit | 6e137943442fb0ab66c34462fa19e5a4260eddd5 (patch) | |
tree | 004adb0dc825fbf919dcec364de3616309d5aadd /package/base-files/files/lib/functions/system.sh | |
parent | 24efb49ff0ef41979e58e1fc5a88281088d999cd (diff) | |
download | upstream-6e137943442fb0ab66c34462fa19e5a4260eddd5.tar.gz upstream-6e137943442fb0ab66c34462fa19e5a4260eddd5.tar.bz2 upstream-6e137943442fb0ab66c34462fa19e5a4260eddd5.zip |
base-files: add minimal mmc support
Added minimal mmc support for helper functions:
- find_mmc_part: Look for a given partition name. Returns the
coresponding partition path
- caldata_extract_mmc: Look for a given partition name and then
extracts the calibration data
- mmc_get_mac_binary: Returns the mac address from a given partition
name and offset
Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
[replace dd with caldata_dd, moved sysupgrade mmc to orbi]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'package/base-files/files/lib/functions/system.sh')
-rw-r--r-- | package/base-files/files/lib/functions/system.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 80e417182a..0ac2912014 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -135,6 +135,15 @@ mtd_get_part_size() { done < /proc/mtd } +mmc_get_mac_binary() { + local part_name="$1" + local offset="$2" + local part + + part=$(find_mmc_part "$part_name") + get_mac_binary "$part" "$offset" +} + macaddr_add() { local mac=$1 local val=$2 |