Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-12-01 Thread Mark Mentovai
I just had a chance to flash a WNDR3800 with an image that contains
this “machine name” patch (post-r29326). It's broken in two ways that
I can see so far. These are regressions. The WNDR3800 images that used
board=WNDR3700v2 worked properly in these cases. It remains my
recommendation that this patch be backed out.

The bugs I've discovered are:

1. The power LED is broken. Once OpenWRT begins booting, the power LED
turns off, and stays off.
(target/linux/ar71xx/base-files/etc/diag.sh).

2. The network switch configuration is broken. Each port is in its own
VLAN. There is no traffic passed between ports.
(target/linux/ar71xx/base-files/etc/defconfig/wndr3800).

I don't know how many other similar bugs there are, caused by other
locations where you neglected to account for the new machine name and
resultant ar71xx_board_name
(target/linux/ar71xx/base-files/lib/ar71xx.sh). While it would be a
simple matter to fix both of these, it would only reinforce the
misconception that there are differences between these boards, when in
fact there are none. I do believe it would be best to just back out
this patch. Users who need a way to distinguish between WNDR3700v2 and
WNDR3800 systems that are running are advised to read the art/caldata
partition as previously mentioned.

A WNDR3800 contains the string WNDR3800 at the caldata/art partition
at offset 56, length 10. Assuming caldata/art is on mtd5, you can
obtain this by running |hexdump -v -e '/1 %c' -s 56 -n 10
/dev/mtd5|. A WNDR3700v2 or WNDR3700 just contains 0xff bytes at this
location, so hexdump will give back ten question marks.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-25 Thread Mark Mentovai
Gabor Juhos wrote:
 2011.11.16. 21:20 keltezéssel, Petri Rosenström írta:
 This fixes the machine name in /proc/cpuinfo and luci status page machine 
 name.

 Signed-off-by: Petri Rosenström petri.rosenst...@gmail.com

 Applied, thanks!

I don't think this patch is a great idea. There are no differences
between the boards in the WNDR3700v2 and WNDR3800. The only hardware
difference is that the latter has more RAM. I don't think that baking
this information into the OpenWRT image or differentiating between the
two models in this way serves any useful purpose.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-25 Thread Petri Rosenström
On Fri, Nov 25, 2011 at 6:45 PM, Mark Mentovai m...@moxienet.com wrote:
 Gabor Juhos wrote:
 2011.11.16. 21:20 keltezéssel, Petri Rosenström írta:
 This fixes the machine name in /proc/cpuinfo and luci status page machine 
 name.

 Signed-off-by: Petri Rosenström petri.rosenst...@gmail.com

 Applied, thanks!

 I don't think this patch is a great idea. There are no differences
 between the boards in the WNDR3700v2 and WNDR3800. The only hardware
 difference is that the latter has more RAM. I don't think that baking
 this information into the OpenWRT image or differentiating between the
 two models in this way serves any useful purpose.


Hi,

I think it is useful because it adds the specific board information
about WNDR3800 (e.g. the name WNDR3800 on status page or /proc/cpuinfo
show correct board name). I think that this information is important
and it should be available.

Consider the following, someone buys a wndr3800 and flashes it with
the current Openwrt image (it works perfectly except the user thinks
that Openwrt doesn't support wndr3800 fully because it doesn't
recognize the device). The user doesn't know how luci or /proc/cpuinfo
gathers the information. The user probably assumes that there is
something wrong about OpenWRT.

Then on the other hand what harm does the patch? I think that when it
gives users correct information about the is more important. But I
should point out that I don't maintain OpenWRT :)

btw. Do you (Mark) own the both devices? Have you (Mark) checked that
they are the same (only RAM diff)? I have *only* seen claims on some
forums and I only own a wndr3800 so I can't say for sure. It seems
like they are. But it would be nice to know for sure.

--
Petri
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-25 Thread Mark Mentovai
Petri Rosenström wrote:
 I think it is useful because it adds the specific board information
 about WNDR3800 (e.g. the name WNDR3800 on status page or /proc/cpuinfo
 show correct board name). I think that this information is important
 and it should be available.

Since you can flash a WNDR3700v2 with a WNDR3800 image and vice-versa,
and the name is simply baked into the image you chose to flash with no
other differences between the two, it seems pointless.

 btw. Do you (Mark) own the both devices? Have you (Mark) checked that
 they are the same (only RAM diff)? I have *only* seen claims on some
 forums and I only own a wndr3800 so I can't say for sure. It seems
 like they are. But it would be nice to know for sure.

If it's terribly important, you can detect the difference between 3700v2
and 3800 at runtime. The data's in the art/caldata area. The WNDR3800
U-Boot source has the details.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-25 Thread Hanno Schupp
Hi Mark, that is interesting. I am battling with some device recognistion
issues myself. What is that ' art/caldata area' you mention? 
Can you access the data from the command line after Boot? I guess I am
asking how can you access the data in 'userland', i.e. in shell scripts?

Cheers

 Hanno 

-Original Message-
From: openwrt-devel-boun...@lists.openwrt.org
[mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of Mark Mentovai
Sent: Saturday, 26 November 2011 7:14 a.m.
To: Petri Rosenström
Cc: OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

Petri Rosenström wrote:
 I think it is useful because it adds the specific board information 
 about WNDR3800 (e.g. the name WNDR3800 on status page or /proc/cpuinfo 
 show correct board name). I think that this information is important 
 and it should be available.

Since you can flash a WNDR3700v2 with a WNDR3800 image and vice-versa, and
the name is simply baked into the image you chose to flash with no other
differences between the two, it seems pointless.

 btw. Do you (Mark) own the both devices? Have you (Mark) checked that 
 they are the same (only RAM diff)? I have *only* seen claims on some 
 forums and I only own a wndr3800 so I can't say for sure. It seems 
 like they are. But it would be nice to know for sure.

If it's terribly important, you can detect the difference between 3700v2 and
3800 at runtime. The data's in the art/caldata area. The WNDR3800 U-Boot
source has the details.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-25 Thread Petri Rosenström
On Fri, Nov 25, 2011 at 8:14 PM, Mark Mentovai m...@moxienet.com wrote:
 Petri Rosenström wrote:
 I think it is useful because it adds the specific board information
 about WNDR3800 (e.g. the name WNDR3800 on status page or /proc/cpuinfo
 show correct board name). I think that this information is important
 and it should be available.

 Since you can flash a WNDR3700v2 with a WNDR3800 image and vice-versa,
 and the name is simply baked into the image you chose to flash with no
 other differences between the two, it seems pointless.

You can do it through the upgrade mode, but not through the webinterface.

I do think that it is useful information for users to know what device
they are running.


 btw. Do you (Mark) own the both devices? Have you (Mark) checked that
 they are the same (only RAM diff)? I have *only* seen claims on some
 forums and I only own a wndr3800 so I can't say for sure. It seems
 like they are. But it would be nice to know for sure.

 If it's terribly important, you can detect the difference between 3700v2
 and 3800 at runtime. The data's in the art/caldata area. The WNDR3800
 U-Boot source has the details.

Nice one. Didn't know about this. Thanks for the information.

btw. Any ideas how to get this to cpuinfo at boot time?

--
Petri
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-25 Thread Daniel Golle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/25/2011 08:05 PM, Petri Rosenström wrote:
 I do think that it is useful information for users to know what device
 they are running.
100% agree. Same issue here, especially relevant when there are many wireless
devices in a network, imagine someone trying to find the one AP out of many to
physically access after some years, which is a quite a common situation...
On the other hand, I also agree that creating additional machtypes for each
alias is unnecessary pollution, as it's not about treating them differently in
the kernel but only about exposing a different string in /proc/cpuinfo to the 
user.
The idea to distinguish the device sub-machtype/alias in runtime rather than
using the board= kernel boot parameter still does sound promising, as that would
not need lots of 99.9% redundant sysupgrade images eating up space and bandwidth
and allows to just have symlinks instead, while still being able to report the
device name identical to what the user can read on the case in /proc/cpuinfo.
Doing that might not be as easy as it sounds, as it might not always be as easy
as just matching on something in the board flash, but apparently also involves
things like RAM size as the only criteria available, and sometimes there will be
no way around passing it as a kernel parameter...
Also creating any other kind of additional code to handle that could possibly
make things more clear, but in the end also create more mess around a simple
problem which already got a pragmatic, but non-idealistic solution...

Even within OpenWrt, the way to handle machtypes varies greatly from target to
target, e.g. most ARM-based archs just use the arch-numbers which are officially
assigned by ARM, ar2xxx/atheros got some runtime detection, most other MIPS
targets seem to use OpenWrt-maintained machtype enumeration afaik.

What I can see is the need for a clear decision by the target maintainers on how
to handle this information, which is useful for the user, but of course could be
in the wiki. Obviously this depends on the (intended?) audience addressed by
OpenWrt download images and the way downloads are offered (a smarter
web-download dialog could also solve a part of this problem) as well as on where
the /lib/ar71xx.sh or /lib/ramips.sh finds the device name information (that
doesn't necessarily need to be /proc/cpuinfo but could be uboot-env or a
userland-parsed kernel parameter, ...)

Just my thoughts about this...
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOz/pPAAoJEDy9cKN/1Et0aCwP/2F+HSf+SYq97FWu+MPiA3/5
Nff2UCTpsDur7J1iQhckreTF+dEsKwI+T8dve/CXh13U8sIuybJehefPqbyU5nqc
5u1+KAMH1arWYuBpcKWkdZb7I1nozaXxVwPOF5iRZBBd53zltgdI937IK8qIsKw6
xkqXYG9v/hHGHyZomyH95dD4mXgSRH/7BgPdHK7mSNEFW7iojEkDG/Gi7rqp04HM
pUdbxcH9LeyOhO+Vb9mJ1uArfQF6Uoe6aqdW1xG3kt8e8g0FYnappvHZz3/IrLra
DQTfnqGB9C3GciwtUhY5YlybOtGy949UKFEBRAH4WOhLGwa3oxfb4npppgTFPlo/
WasNCBbFzHEOFDWr7D99ghWTJe6iG7bRdO+5Wd1ntbRGMRAm4nFRelbToCnX5WMN
gp+RItye53fNRGxfKHm7K7HWIjMgpgolv1yO7HJXYAEnefYOcpppludWI7tqhDKb
aldw/JYzwXMeS+UmxKp/4rPO5Zxd0sWlwKPiIZhrconlI6mmCGDG6khr1j27Vllu
KGx4iZsGPNFvKgjqhdpg82ep1p8lLDPlNx4b7N+LDsvL6CaNDbXq3yCGJZImyQt9
ke3CQ3D+f0Cxnt7u+mkPQ/qf+tNZlEjueWuw50Hfm4WLgmn1mqeFu4eajZIMmOBF
vWg7Z5L4dRe3TyJiadru
=lY4B
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-24 Thread Gabor Juhos
2011.11.16. 21:20 keltezéssel, Petri Rosenström írta:
 This fixes the machine name in /proc/cpuinfo and luci status page machine 
 name.
 
 Signed-off-by: Petri Rosenström petri.rosenst...@gmail.com

Applied, thanks!

Gabor
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] wndr3800 machine name patch

2011-11-16 Thread Petri Rosenström
This fixes the machine name in /proc/cpuinfo and luci status page machine name.

Signed-off-by: Petri Rosenström petri.rosenst...@gmail.com

--
Petri
Index: target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
===
--- target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h	(revision 29199)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h	(working copy)
@@ -70,6 +70,7 @@
 	AR71XX_MACH_WHR_HP_GN,	/* Buffalo WHR-HP-GN */
 	AR71XX_MACH_WNDR3700,	/* NETGEAR WNDR3700 */
 	AR71XX_MACH_WNDR3700V2,	/* NETGEAR WNDR3700v2 */
+	AR71XX_MACH_WNDR3800,	/* NETGEAR WNDR3800 */
 	AR71XX_MACH_WNR2000,	/* NETGEAR WNR2000 */
 	AR71XX_MACH_WP543,	/* Compex WP543 */
 	AR71XX_MACH_WRT160NL,	/* Linksys WRT160NL */
Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
===
--- target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c	(revision 29199)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c	(working copy)
@@ -288,3 +288,5 @@
 
 MIPS_MACHINE(AR71XX_MACH_WNDR3700V2, WNDR3700v2, NETGEAR WNDR3700v2,
 	 wndr3700v2_setup);
+MIPS_MACHINE(AR71XX_MACH_WNDR3800, WNDR3800, NETGEAR WNDR3800,
+	 wndr3700v2_setup);
Index: target/linux/ar71xx/image/Makefile
===
--- target/linux/ar71xx/image/Makefile	(revision 29199)
+++ target/linux/ar71xx/image/Makefile	(working copy)
@@ -686,10 +686,11 @@
 wndr3700_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),6656k(rootfs),64k(art)ro,7680k@0x7(firmware)
 wndr3700v2_cmdline=board=WNDR3700v2 console=ttyS0,115200
 wndr3700v2_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),14848k(rootfs),64k(art)ro,15872k@0x7(firmware)
+wndr3800_cmdline=board=WNDR3800 console=ttyS0,115200
 define Image/Build/Profile/WNDR3700
 	$(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700,$(wndr3700_cmdline),wndr3700_mtdlayout,3700,WNDR3700, NA,)
 	$(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700v2,$(wndr3700v2_cmdline),wndr3700v2_mtdlayout,3701,WNDR3700v2,,-H 29763654+16+64)
-	$(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3800,$(wndr3700v2_cmdline),wndr3700v2_mtdlayout,3701,WNDR3800,,-H 29763654+16+128)
+	$(call Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3800,$(wndr3800_cmdline),wndr3700v2_mtdlayout,3701,WNDR3800,,-H 29763654+16+128)
 endef
 
 wr400n_cmdline=board=WRT400N console=ttyS0,115200
Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
===
--- target/linux/ar71xx/base-files/lib/ar71xx.sh	(revision 29199)
+++ target/linux/ar71xx/base-files/lib/ar71xx.sh	(working copy)
@@ -169,6 +169,9 @@
 	*WNDR3700v2)
 		name=wndr3700v2
 		;;
+	*WNDR3800)
+		name=wndr3800
+		;;
 	*WNR2000)
 		name=wnr2000
 		;;
Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===
--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh	(revision 29199)
+++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh	(working copy)
@@ -133,7 +133,7 @@
 		}
 		return 0
 		;;
-	wndr3700v2)
+	wndr3700v2|wndr3800)
 		[ $magic_long != 33373031 ]  {
 			echo Invalid image type.
 			return 1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel