ar71xx: scan nand ubi partition for ath9k eeprom files
The MR18 stores the ath9k eeprom values on the NAND. This patch makes it possible to retrieve the images from there. Signed-off-by: Chris R Blake <chrisrblake93@gmail.com> SVN-Revision: 47948
This commit is contained in:
		| @@ -41,6 +41,23 @@ mtd_get_mac_binary() { | ||||
| 	dd bs=1 skip=$offset count=6 if=$part 2>/dev/null | hexdump -v -n 6 -e '5/1 "%02x:" 1/1 "%02x"' | ||||
| } | ||||
|  | ||||
| mtd_get_mac_binary_ubi() { | ||||
| 	local mtdname="$1" | ||||
| 	local offset="$2" | ||||
|  | ||||
| 	. /lib/upgrade/nand.sh | ||||
|  | ||||
| 	local ubidev=$(nand_find_ubi $CI_UBIPART) | ||||
| 	local part=$(nand_find_volume $ubidev $1) | ||||
|  | ||||
| 	if [ -z "$part" ]; then | ||||
| 		echo "mtd_get_mac_binary: ubi volume $mtdname not found!" >&2 | ||||
| 		return | ||||
| 	fi | ||||
|  | ||||
| 	hexdump -v -n 6 -s $offset -e '5/1 "%02x:" 1/1 "%02x"' /dev/$part 2>/dev/null | ||||
| } | ||||
|  | ||||
| mtd_get_part_size() { | ||||
| 	local part_name=$1 | ||||
| 	local first dev size erasesize name | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau