netconsole support in Debian Wheezy 3.8.13.3

Post Reply
jcdenton12
Posts: 12
Joined: Sun Jun 01, 2014 6:22 pm
languages_spoken: english
ODROIDs: Odroid-U3
Has thanked: 0
Been thanked: 0
Contact:

netconsole support in Debian Wheezy 3.8.13.3

Post by jcdenton12 »

Hello everybody,
I have Odroid-U3 running debian wheezy downloader from official site

Code: Select all

Linux odroidu2 3.8.13.3 #1 SMP PREEMPT Sat Jun 22 00:52:21 BRT 2013 armv7l GNU/Linux
I would like to setup netconsole for kernel logging (I already have netconsole for uboot thanks to http://forum.odroid.com/viewtopic.php?f=10&t=3822#wrap)
so I followed tutorial http://www.cyberciti.biz/tips/linux-net ... orial.html

but I did not succeed

Code: Select all

[  472.225000] netpoll: netconsole: local port 6666
[  472.225000] netpoll: netconsole: local IP 10.11.12.254
[  472.225000] netpoll: netconsole: interface 'eth0'
[  472.230000] netpoll: netconsole: remote port 6666
[  472.235000] netpoll: netconsole: remote IP 10.11.12.109
[  472.240000] netpoll: netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
[  472.250000] netpoll: netconsole: eth0 doesn't support polling, aborting
[  472.255000] netconsole: cleaning up
eth0 driver (smsc95xx) seems to be the culprit

Code: Select all

cat config | grep POLL
CONFIG_EPOLL=y
CONFIG_KEYBOARD_GPIO_POLLED=m
CONFIG_NETPOLL=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_GPIO_TILT_POLLED=m
CONFIG_INPUT_KXTJ9_POLLED_MODE=y
CONFIG_CONSOLE_POLL=y

Code: Select all

cat config | grep NETCONSOLE
CONFIG_NETCONSOLE=m
any ideas how to get netconsole working?

thank you very much for your answers in advance

User avatar
meveric
Posts: 11732
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 74 times
Been thanked: 558 times
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by meveric »

umm before you do anything else.. try updating the kernel first.. we are at 3.8.13.23 last time i checked.. there were ALOT of changes since 3.8.13.3... check if it's working after the kernel update
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

jcdenton12
Posts: 12
Joined: Sun Jun 01, 2014 6:22 pm
languages_spoken: english
ODROIDs: Odroid-U3
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by jcdenton12 »

I did upgrade

Code: Select all

Linux odroidu2 3.8.13.23 #1 SMP PREEMPT Mon May 26 00:43:42 UTC 2014 armv7l GNU/Linux
but the problem is still here

Code: Select all

[  149.823304] netpoll: netconsole: local port 6666
[  149.823417] netpoll: netconsole: local IP 10.11.12.254
[  149.827457] netpoll: netconsole: interface 'eth0'
[  149.832128] netpoll: netconsole: remote port 6666
[  149.836809] netpoll: netconsole: remote IP 10.11.12.109
[  149.842025] netpoll: netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
[  149.848905] netpoll: netconsole: eth0 doesn't support polling, aborting
[  149.855476] netconsole: cleaning up

suriyan
Posts: 473
Joined: Wed Jun 26, 2013 2:41 pm
languages_spoken: english
ODROIDs: odroid-u2/xu-e/u3/x2/xu3/c1
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by suriyan »

Hello jcdenton12,
You are right, smsc driver is the culprit. I believe that it does not have support for netconsole.
I looked at the kernel source.
The crap out happens in net/core/netpoll.c line 757 because of the check !ndev->netdev_ops->ndo_poll_controller
If you look in drivers/net/usb/smsc95xx.c line 1230 where smsc95xx_netdev_ops is instantiated of type net_device_ops, there is no ndo_poll_controller set.
You might want to look at how to implement it, possibly. I do not see it defined in any of the usb ethernet devices. Wonder if they are incapable or just left out.
- Suriyan

suriyan
Posts: 473
Joined: Wed Jun 26, 2013 2:41 pm
languages_spoken: english
ODROIDs: odroid-u2/xu-e/u3/x2/xu3/c1
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by suriyan »

OK, this is some partial success.Shall leave it to you to pick it up from here.

In /etc/modules add these two lines:
smsc95xx
netconsole

This is to make sure smsc modules is loaded before netconsole.
In /etc/modprobe.d/netconsole.conf add the netconsole options:
options netconsole netconsole=6666@10.0.0.203/eth0,6666@10.0.0.27/

Please tweak above for your case. Also, you can add it in booting parameters for linux, but I haven't tried it. First, I guess is to concentrate on getting more kernel output.

drivers/net/usb/smsc95xx.c
static void smsc95xx_suriyan(struct net_device *netdev)
{
}

static const struct net_device_ops smsc95xx_netdev_ops = {
.ndo_open = usbnet_open,
.ndo_stop = usbnet_stop,
.ndo_start_xmit = usbnet_start_xmit,
.ndo_tx_timeout = usbnet_tx_timeout,
.ndo_change_mtu = usbnet_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = smsc95xx_ioctl,
.ndo_set_rx_mode = smsc95xx_set_multicast,
.ndo_set_features = smsc95xx_set_features,
.ndo_poll_controller = smsc95xx_suriyan,
};

I just added a dummy function "smsc95xx_suriyan" for now, as I am assuming that polling is for receiving packets, which we shall ignore for now. Note that my assumptions can be wrong!

Now rebuild and reinstall the modules (mainly one of them - smsc95xx)
In linux box have: nc -klu 6666 (without firewall and same ip as mentioned in the netconfig.conf file)
You should see some output on reboot.

The exercise is to find and fix why some output is coming up but not all.
Last edited by suriyan on Mon Jun 02, 2014 10:24 am, edited 1 time in total.

suriyan
Posts: 473
Joined: Wed Jun 26, 2013 2:41 pm
languages_spoken: english
ODROIDs: odroid-u2/xu-e/u3/x2/xu3/c1
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by suriyan »

OK, adding ignore_loglevel in the boot.scr file at the end of bootargs, got me a whole bunch of kernel message and also the netconsole output had all the lines that were in dmesg. So, I guess that resolves this hack!
- Suriyan

jcdenton12
Posts: 12
Joined: Sun Jun 01, 2014 6:22 pm
languages_spoken: english
ODROIDs: Odroid-U3
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by jcdenton12 »

you are a magician

after modifying the smsc95xx.c and recompiling it netconsole works
I can see all the messages starting with Booting Kernel even without ignore_loglevel

there is one final issue I need to resolve and I will be happy
I can no longer power up the board by pressing power button

in kernel 3.8.13.3 I did

Code: Select all

sudo shutdown -h now
blue led stopped blinking, red led stayed on and after pressing power button board booted up
after I updated to 3.8.13.23 I noticed that once I shutdown the board, pressing power button (or holding it pressed for some time) has no effect and board does not power up
I have unplug adapted from power strip and after plugging it in board boots up fine

I only have ethernet, microSD and 2 USB devices plugged in (16GB flash drive and powered USB active cable (~10m))

any ideas what might be the culprit in this?

thank you very much once again for your great work

//edit:
now that I am thinking about what changed between working power button previously and not working now to power up the board

I upgraded kernel from 3.8.13.3 to 3.8.13.23
I upgraded uboot
in the working configuration I used one that came with this image debian-wheezy-base-7.1.0.img.xz (http://odroid.us/odroid/odroidu2/debian/)
then I upgraded to suriyan sdfuse.Feb19.tgz

I THINK that kernel should not influence whether power button can power up the board or not since uboot is loaded before kernel
and I also CAN CONFIRM that power button physically is working since I can shutdown running board by pressing power button (board powers down and also "power button pressed" message is logged)

could this problem be related to uboot upgrade?

mdrjr
Site Admin
Posts: 11799
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 44 times
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by mdrjr »

No.
Its userland+acpi support.

jcdenton12
Posts: 12
Joined: Sun Jun 01, 2014 6:22 pm
languages_spoken: english
ODROIDs: Odroid-U3
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by jcdenton12 »

and what applications do I need in userland to be able to power up the board?
I installed acpi-support-base and apmd

If I press the power button while U3 is running, message is logged and it shuts down
Power button pressed
The system is going down for system halt NOW!
once powered off I cannot power it on by pressing power button
no matter whether I just press it, keep it pressed for 1 second or even 5 seconds

only unplugging it from power cord and plugging it back in can power it back up (red LED is steadily lit)


thanks for your support

mdrjr
Site Admin
Posts: 11799
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 1 time
Been thanked: 44 times
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by mdrjr »

I've tested here on Ubuntu 13.10 and it shutdowns and turn on the board.

Code: Select all

root@odroid:~# 
Broadcast message from root@odroid
        (unknown) at 8:18 ...

The system is going down for halt NOW!
Power button pressed 
[ OK ]pping internet superserver inetd        
speech-dispatcher disabled; edit /etc/default/speech-dispatcher
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
 * Asking all remaining processes to terminate...        nm-dispatcher.action: Caught signal 15, shutting down...
[ OK ]
[ OK ] processes ended within 1 seconds...        
[ OK ]ounting temporary filesystems...        
[ OK ]ctivating swap...        
[ OK ]ounting local filesystems...        
mount: / is busy
 * Will now halt
[   22.449051] exynos4-reboot: Notifier called
[   23.108532] Power down.
[   23.108597] Bye...
[   23.1�OK

U-Boot 2010.12-svn (Feb 14 2014 - 12:43:19) for Exynox4412


CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]
APLL = 1000MHz, MPLL = 880MHz
DRAM:  2 GiB

PMIC VERSION : 0x00, CHIP REV : 3
TrustZone Enabled BSP
BL1 version: 20121128
....... normal boot

suriyan
Posts: 473
Joined: Wed Jun 26, 2013 2:41 pm
languages_spoken: english
ODROIDs: odroid-u2/xu-e/u3/x2/xu3/c1
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by suriyan »

I only have ethernet, microSD and 2 USB devices plugged in (16GB flash drive and powered USB active cable (~10m))
I too checked and it works for me - power down and power up.

Could the "powered USB active cable be the cause of your woes"? Have you tried without it? BTW, can you point me a link to this cable? I have tried with HDMI cable and ethernet and it works.
- Suriyan

jcdenton12
Posts: 12
Joined: Sun Jun 01, 2014 6:22 pm
languages_spoken: english
ODROIDs: Odroid-U3
Has thanked: 0
Been thanked: 0
Contact:

Re: netconsole support in Debian Wheezy 3.8.13.3

Post by jcdenton12 »

this is the cable I am using https://www.alza.cz/EN/premiumcord-usb- ... 236092.htm

I tried to power it up without cable connected (there is laser printer connected to it on the other end, turned off)

if I power it down and then remove adapter from power strip for ~10 seconds and plug it in, board powers up automatically and boots fine


pressing power button does not do anything however
things connected to my odroid
-- short ethernet cable to my home router (netgear wnr3500L)
-- 16GB class10 microSD (kingston)
-- 16GB USB3.0 flash drive (Adata S102) connected via short USB2.0 extension cable (passive, flash drive is just slightly wider so it needs extension cable)
-- 10m long active USB extension cable (printer on the other side is turned off)
-- odroid power supply ordered from hardkernel together with odroid-u3 board

any ideas what could be the culprit and where to look for a solution?
some debug or anything?

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest