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>
This commit is contained in:
Davide Fioravanti
2020-09-02 01:18:16 +02:00
committed by Christian Lamparter
parent 24efb49ff0
commit 6e13794344
3 changed files with 35 additions and 0 deletions

View File

@@ -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