Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-09 Thread Chris Blake
On Mon, Dec 7, 2015 at 7:48 PM, Yousong Zhou wrote: > On 7 December 2015 at 23:55, Chris Blake wrote: >> Yousong, >> >> Sorry to come back so fast, but how would moving the skip to hexdump >> help the code in any way? For example, we are currently using: >> >> dd bs=1 skip=$offset count=6 if=/dev

Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-07 Thread Yousong Zhou
On 7 December 2015 at 23:55, Chris Blake wrote: > Yousong, > > Sorry to come back so fast, but how would moving the skip to hexdump > help the code in any way? For example, we are currently using: > > dd bs=1 skip=$offset count=6 if=/dev/$part 2>/dev/null | hexdump -v -n > 6 -e '5/1 "%02x:" 1/1 "%

Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-07 Thread Chris Blake
Yousong, Sorry to come back so fast, but how would moving the skip to hexdump help the code in any way? For example, we are currently using: dd bs=1 skip=$offset count=6 if=/dev/$part 2>/dev/null | hexdump -v -n 6 -e '5/1 "%02x:" 1/1 "%02x"' If we move the skip to hexdump, then we would also nee

Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-07 Thread Chris Blake
Hey Yousong, Thanks for the clarification, will get this all cleaned up for the next patch revision. Keep the feedback coming! :) Regards, Chris Blake On Mon, Dec 7, 2015 at 9:42 AM, Yousong Zhou wrote: > > Am 07.12.2015 22:12 schrieb "Chris Blake" : >> >> Hey Yousong, >> >> looking at the hexd

Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-07 Thread Yousong Zhou
Am 07.12.2015 22:12 schrieb "Chris Blake" : > > Hey Yousong, > > looking at the hexdump comment, this function was actually based off > of the function mtd_get_mac_binary() which uses the same dd offset > logic as you can see in mtd_get_mac_binary_ubi(). If this were to be > changed, shouldn't the

Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-07 Thread Chris Blake
Hey Yousong, looking at the hexdump comment, this function was actually based off of the function mtd_get_mac_binary() which uses the same dd offset logic as you can see in mtd_get_mac_binary_ubi(). If this were to be changed, shouldn't the same change apply to mtd_get_mac_binary()? I know this

Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-06 Thread Vittorio G (VittGam)
On 05/12/2015 23:48:07 CET, Christian Lamparter wrote: mtd=$(find_mtd_chardev $part) [ -n "$mtd" ] || \ - ath9k_eeprom_die "no mtd device found for partition $part" + mtd="/dev/$(nand_find_volume $ubidev $part)" + [ -n "$mtd" ] || \ +

Re: [OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-06 Thread Yousong Zhou
Hello, Christian, a few nitpicks inline :) On 6 December 2015 at 06:48, Christian Lamparter wrote: > From: Chris R Blake > > 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 > --- > package

[OpenWrt-Devel] [PATCH v6 5/6] ar71xx: scan nand ubi partition for ath9k eeprom files

2015-12-05 Thread Christian Lamparter
From: Chris R Blake 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 --- package/base-files/files/lib/functions/system.sh| 17 + .../base-files/etc/hotplug.d/firmware/10-ath