ar71xx: fix WNDR3x00 model detection
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 7 Dec 2011 06:55:39 +0000 (06:55 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 7 Dec 2011 06:55:39 +0000 (06:55 +0000)
commite310d5b786eb4c7e461f0aa609b3d3642db95465
tree5997a404899d12eb64212f3146527a2cadc4da08
parent9de4cb5314d3840dda0575684aadac9aafe581aa
ar71xx: fix WNDR3x00 model detection

Detect the model name for /tmp/sysinfo/model based on 10 bytes at offset
56 in the art (caldata) mtd partition.

r29434 redid WNDR3x00 model detection, attempting to distinguish between
WNDR3700v2 and WNDR3800 by checking MemTotal in /proc/meminfo. However, it
contained a bug: it put the awk inside a $(...), with the result that all
WNDR3700v2 and WNDR3800 models would be reported as WNDR3800. This patch
checks the model name stored in the art partition, as is done by U-Boot
shipping on the WNDR3800. It has the likely advantage of working with
future models based on the WNDR3700 board. It also will not mis-detect
units on which people install more memory.

I have tested this patch on WNDR3700 (v1), WNDR3700v2, and WNDR3800.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29472 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/ar71xx/base-files/lib/ar71xx.sh
This page took 0.023336 seconds and 4 git commands to generate.