Modify

Opened 4 years ago

Closed 4 years ago

#14133 closed defect (fixed)

brcm47xx: RT-N12 not properly detected

Reported by: dcd1182@… Owned by: hauke
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: Cc:

Description

I have recently compiled openwrt for my Asus RT-N12 and found that in order for the board to be properly detected, I must flash the stock firmware, let it boot, and then flash openwrt.

I originally came from dd-wrt and the board was never detected until I figured this out. Impact is the LEDs do not work properly and WAN is on the wrong port.

With an Asus stock nvram, the string "RT-N12" is found in:
hardware_version=RT-N12-00-02-02-00
productid=RT-N12

I have noticed that if I perform an "mtd erase nvram" and reboot, while openwrt installed, something writes back a bunch of nvram values (must be the bootloader?). At that point I will still have:
hardware_version=RT-N12-00-02-02-00
but I do not have:
productid=RT-N12
and executing 'nvram set productid=RT-N12' and rebooting still does not detect the board properly.

My C is limited but based on 260-MIPS-BCM47XX-add-board-detection.patch I am guessing that this could be because of another nvram value:
machine_name=
Which is both found with stock firmware and set by bootloader(?) following mtd erase nvram.

If this isn't enough info, I'll get a broken nvram dump when I regain access to the device.

Attachments (1)

badnvram (1.3 KB) - added by dcd1182@… 4 years ago.
nvram dump following bootloader(?) restore of values after mtd nvram erase. board no longer detected

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by dcd1182@…

nvram dump following bootloader(?) restore of values after mtd nvram erase. board no longer detected

comment:1 Changed 4 years ago by anonymous

Okay it has nothing to do with machine_name; I compiled without those bits and have same issue.

Board detection should be done differently.

comment:2 Changed 4 years ago by Zajec

I've just dumped CFE from my WNDR4500 and extracted NVRAM from it (the CFE). It contains following entries:

boardtype=0xf52e
boardnum=4536
boardrev=0x1102
xtalfreq=25000
sromrev=8
et0macaddr=00:90:4c:01:XX:XX
et0phyaddr=30
et0mdcport=0
gpio7=robo_reset
vlan1hwname=et0
vlan1ports=0 1 2 3 8*
vlan2hwname=et0
vlan2ports=4 8u
landevs=vlan1 wl0 wl1
wandevs=et0
lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
boot_wait=off
wait_time=3
watchdog=3000
boardflags=0x110
boardflags2=0x0
bootflags=1
reset_gpio=6

It seems to be more or less common that CFE's NVRAM doesn't have entries like board_id etc. I'm not sure if we want to try detecting all models by that ugly "board*" entries...

I wonder how manufacturer's firmware decides if it should create entry like (for example) board_id=U12H189T00_NETGEAR. Or are their images so device-specific?

comment:3 Changed 4 years ago by hauke

  • Owner changed from developers to hauke
  • Status changed from new to accepted

comment:4 Changed 4 years ago by hauke

  • Resolution set to fixed
  • Status changed from accepted to closed

Thank you for reporting, the board detection was fixed in r38383.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.