Modify

Opened 5 years ago

Closed 5 years ago

#13801 closed defect (fixed)

Changeset 36987 breaks Linksys NSLU2

Reported by: Mike Brady <mikebrady@…> Owned by: jogo
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

Applying changeset 36987 prevents trunk from booting a Linksys NSLU2. I can't see what's happening, as I haven't added the serial port hardware mod to the NSLU2. All I know is that trunk up to and including 36986 works and 36987 doesn't.

(This is a corrected version of ticket 13800, which quoted the wrong changeset number.)

Attachments (0)

Change History (17)

comment:1 Changed 5 years ago by nbd

Please update to the latest version, run make oldconfig, then ./scripts/diffconfig.sh. Post the output here.

comment:2 Changed 5 years ago by jogo

I just flashed the latest trunk snapshot build on a NSLU2, and it works fine. I suspect old config options that now conflict with procd.

comment:3 Changed 5 years ago by nbd

  • Resolution set to worksforme
  • Status changed from new to closed

comment:4 Changed 5 years ago by Mike Brady <mikebrady@…>

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Thanks for the quick replies. Sadly, I'm having no luck.

Just to clarify, I'm just downloading trunk, selecting the NSLU2 with make menuconfig and building. I'm not adding anything new, and I'm not even updating the feeds (is that a bad idea?).

Two things I wonder if you think they might be important:

(1) the NSLU2 runs at the lower of the two speeds -- it's good for 132.50 BogoMIPS according to dmesg.
(2) The onboard battery is dead, so the machine starts at the default date, January 1, 1970.

@jogo -- taking the latest snapshot doesn't work for me. Afterwards, the NSLU2 still works on 36986 and fails on 36987, so it's still working.

@nbd -- if I update from 39686 to 39687 I get this:

mike@ubuntu:~/exp/trunk$ svn update -r36987
D    package/hotplug2
Updated to revision 36987.
mike@ubuntu:~/exp/trunk$ make oldconfig
Collecting package info: done
#
# configuration written to .config
#
mike@ubuntu:~/exp/trunk$ ./scripts/diffconfig.sh
CONFIG_TARGET_ixp4xx=y
CONFIG_TARGET_ixp4xx_generic=y
CONFIG_TARGET_ixp4xx_generic_NSLU2=y
# CONFIG_BUSYBOX_CONFIG_KLOGD is not set
# CONFIG_BUSYBOX_CONFIG_SYSLOGD is not set
# CONFIG_BUSYBOX_CONFIG_WATCHDOG is not set
CONFIG_PACKAGE_ubox=y
mike@ubuntu:~/exp/trunk$

comment:5 Changed 5 years ago by Mike Brady <mikebrady@…>

Replaced battery, set the hw clock, no apparent difference. So (2) above seems to be irrelevant.

comment:6 Changed 5 years ago by Mike Brady <mikebrady@…>

Yikes, checked on a spare NSLU2 running at 265.42 BogoMIPS, clock okay, no difference -- doesn't boot the snapshot, so it seems (1) above isn't relevant either.

So, I must be doing something utterly stupid, or there's a problem.

comment:7 Changed 5 years ago by jogo

  • Owner changed from developers to jogo
  • Status changed from reopened to accepted

Hm, there seems to be something fishy going on, I could just reproduce it I think; I'm seeing this in the bootlog:

[   31.745226] NPE-B: firmware functionality 0x2, revision 0x2:1
[   31.751494] NPE-B: firmware block #1 doesn't fit in NPE memory: type D, start 0x5108C20, length 0x1000000B
[   31.778638] device eth0 entered promiscuous mode
[   31.784983] ADDRCONF(NETDEV_UP): br-lan: link is not ready

And the lan port (obviously) doesn't work then.

comment:8 follow-up: Changed 5 years ago by Mike Brady <mikebrady@…>

Quick question -- How are you getting the bootlog out? Have you the serial port mod?

comment:9 in reply to: ↑ 8 ; follow-up: Changed 5 years ago by jogo

Replying to Mike Brady <mikebrady@…>:

Quick question -- How are you getting the bootlog out? Have you the serial port mod?

Yes, I have serial connected.

Hm, 3.10 seems to boot fine. I also wonder why I saw 3.3 booting fine back then. Maybe there is a race somewhere.

comment:10 in reply to: ↑ 9 Changed 5 years ago by jogo

Replying to jogo:

Replying to Mike Brady <mikebrady@…>:

Quick question -- How are you getting the bootlog out? Have you the serial port mod?

Yes, I have serial connected.

Hm, 3.10 seems to boot fine. I also wonder why I saw 3.3 booting fine back then. Maybe there is a race somewhere.

Can you try if 3.10 works for you? (just edit the LINUX_VERSION in target/linux/ixp4xx/Makefile).

Also I wonder, are the reset and power button also switched for you, i.e. the front button resets the device, and the reset button powers it off in openwrt?

comment:11 follow-up: Changed 5 years ago by Mike Brady <mikebrady@…>

I'll give 3.10 a try and report back, thanks.

The reset and power button are as per the standard nslu2-setup.c-- so the front button does a reset and the paper clip powers it off.

comment:12 in reply to: ↑ 11 Changed 5 years ago by jogo

Replying to Mike Brady <mikebrady@…>:

The reset and power button are as per the standard nslu2-setup.c-- so the front button does a reset and the paper clip powers it off.

Yes, they are working like the code is written, surprise, surpise :P

What I meant is that this contradicts the Manual and the original firmware, where the front button powers off the device and the paper clip resets it.

Also if you look at the code, you see that the power_handler resets the device, while the reset_handler powers it off.

Looking a the comment, this seems intentional, but it does not offer any explanation why they were switched.

comment:13 Changed 5 years ago by Mike Brady <mikebrady@…>

Success! -- 3.10 does indeed boot. I downloaded trunk, r37147, switched to 3.10 as suggested, and it works on both the high- and low-speed NSLU2s.

On the question of a race, I haven't really got a clue, but I do notice that that jffs2 seems to be doing something in the background, and doesn't finish for quite a while. The following is from the high-speed slug's dmesg:

[   29.465620] NPE-B: firmware's license can be found in /usr/share/doc/LICENSE.IPL
[   29.473136] NPE-B: firmware functionality 0x2, revision 0x2:1
[   29.497283] device eth0 entered promiscuous mode
[   29.503012] br-lan: port 1(eth0) entered forwarding state
[   29.508708] br-lan: port 1(eth0) entered forwarding state
[   30.635611] eth0: link up, speed 100 Mb/s, full duplex
[   31.505347] br-lan: port 1(eth0) entered forwarding state
[   38.818194] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   38.835465] jffs2_build_filesystem(): unlocking the mtd device... done.
[   44.682956] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   88.397591] jffs2: notice: (1931) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

About the buttons, yeah, I suppose it is a surprise when the code works as written alright :-) IIRC the code was done in response to someone who wanted to be able to power the NSLU2 down from the On/Off button. It disables interrupts and other horrid things and isn't debounced, so it's not really particularly useful. I have a patch that I must get around to submitting to make the two buttons available as events, which is what I was really think of when I was replying to your question. Together with a few bits of code for the beeper, one can really make the NSLU2 really useful, in spite of its age.

Many thanks for all your help.

comment:14 follow-up: Changed 5 years ago by Mike Brady <mikebrady@…>

Just to continue the comment about the buttons, crucially, the power button press could be intercepted via /etc/inittab and used to shut down the machine. But definitely a hack.

comment:15 in reply to: ↑ 14 Changed 5 years ago by Mike Brady <mikebrady@…>

Replying to Mike Brady <mikebrady@…>:

Just to continue the comment about the buttons, crucially, the power button press could be intercepted via /etc/inittab and used to shut down the machine. But definitely a hack.

This is what I was thinking of http://wiki.openwrt.org/toh/linksys/nslu2/nslu2.hardware.button.

comment:16 Changed 5 years ago by Mike Brady <mikebrady@…>

Ah -- in 3.10, the buttons and the LEDs of the NSLU2 don't show up at all. This is /proc/interrupts:

root@OpenWRT:/dev/input# cat /proc/interrupts 
           CPU0       
  3:       8499    IXP4xx  IXP4xx Queue Manager
  4:          0    IXP4xx  IXP4xx Queue Manager
  5:     692812    IXP4xx  timer1
 11:        109    IXP4xx  ixp4xx-beeper
 15:         21    IXP4xx  serial
 27:       1001    IXP4xx  ohci_hcd:usb2
 28:          0    IXP4xx  ohci_hcd:usb1
Err:          0

Otherwise, it's nice and boots fast!

comment:17 Changed 5 years ago by jogo

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

Thanks for confirmation, I switched ixp4xx to 3.10 in r37153, so next snapshot should work fine again.

I guess there were some irq changes between 3.3 and 3.10 that hides those irqs now. The buttons and leds still work though in 3.10.

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.