Netconsole: no output during boot with mainline uboot

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Netconsole: no output during boot with mainline uboot

Postby elroberto » Wed Jun 11, 2014 11:40 am

Dear Experts :D

I've upgraded my Pogo E02 to the mainline uboot - all went smoothly which is great, but... I can't get netconsole working. Would really like to have it for troubleshooting since uboot no longer supports boot-to-stock Pogo.

During boot I see nothing at all on the listener. It's driving me mad because it must be something obvious!

- If I boot into Alarm and install openbsd-netcat then i can correctly see output on my laptop; so seems like firewall etc. is all fine.
- nc listener: I've tried various version of nc & socat on Fedora 20, Ubuntu and Win7!
- I don't know if it worked on older uboot (never tried).
- Both pooters are using DCHP but having fixed IP set on the router.
- Laptop is 192.168.0.70 (wifi). Pogo is 192.168.0.11 (wired).
- gnu-netcat doesn't seem work when run on the pogo, it just returns immediately no matter what I do. Might be a clue there?

UBoot version and environment below.
Thanks in advance for any help!
Rob

$this->bbcode_second_pass_code('', '
U-Boot 2014.04.R3-1 (May 26 2014 - 19:45:55) Arch Linux ARM

[root@alarm ~]# fw_printenv
baudrate=115200
bootcmd=usb start; setenv letter 9;for type in usb; do for disk in 0 1 2 3; do if ${type} part ${disk};then setexpr letter $letter + 1;run load;fi;done;done;
bootdelay=3
bootm=echo Booting from ${disk} ...; run setargs; bootm ${loadaddr};
bootz=echo Booting from ${disk} ...; run setargs; bootz ${loadaddr} - ${fdt_addr};
console=ttyS0
fdt_addr=0x800000
fdt_file=/boot/dtbs/kirkwood-pogo_e02.dtb
importbootenv=echo Importing environment (uEnv.txt)...; env import -t $loadaddr $filesize
load=echo Attempting to boot from ${type} ${disk}:1...;if run loadbootenv; then run importbootenv;fi;echo Checking if uenvcmd is set ...;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;echo Running default loadzimage ...;if run loadzimage; then run loadfdt;run bootz;fi;echo Running default loaduimage ...;if run loaduimage; then run bootm;fi;
loadaddr=0x810000
loadbootenv=load ${type} ${disk}:1 ${loadaddr} /boot/uEnv.txt
loadfdt=load ${type} ${disk}:1 ${fdt_addr} ${fdt_file}
loaduimage=load ${type} ${disk}:1 ${loadaddr} ${uimage}
loadzimage=load ${type} ${disk}:1 ${loadaddr} ${zimage}
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
setargs=setenv bootargs console=${console},${baudrate} ${optargs} root=/dev/sd${letter}1 rw rootwait ${mtdparts}
uimage=/boot/uImage
zimage=/boot/zImage
ethaddr=00:25:31:00:56:F6
usb_rootfstype=ext3
ipaddr=192.168.0.11
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
if_netconsole=ping $serverip
serverip=192.168.0.70
')
elroberto
 
Posts: 5
Joined: Wed Jun 11, 2014 8:52 am

Re: Netconsole: no output during boot with mainline uboot

Postby elroberto » Wed Jun 11, 2014 4:44 pm

Update...

I set up wireshark to look for UDP packets (full network, not just from the expected IP address).
Sanity-checked that packets are visible if I run nc from Arch on the Pogo (nc -u 192.168.0.70 6666)
Works as expected.
Reboot the Pogo. No UDP packets. Nothing visible in the listener (nc -lu 6666)

Modified the preboot command to not bother pinging the destination. Because I'm grasping at straws.
$this->bbcode_second_pass_code('', 'fw_setenv preboot 'run start_netconsole'')

Still no UDP packets in wireshark :?
elroberto
 
Posts: 5
Joined: Wed Jun 11, 2014 8:52 am

Re: Netconsole: no output during boot with mainline uboot

Postby hydro » Thu Jun 12, 2014 4:04 pm

Maybe U-Boot was compiled without netconsole support, at least there is no CONFIG_NETCONSOLE in pogo_e02.h
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: Netconsole: no output during boot with mainline uboot

Postby bodhi » Fri Jun 13, 2014 6:30 am

$this->bbcode_second_pass_quote('hydro', 'M')aybe U-Boot was compiled without netconsole support, at least there is no CONFIG_NETCONSOLE in pogo_e02.h


It looks to me netconsole was compiled in. Search for it the common kirkwood area.
bodhi
 
Posts: 225
Joined: Sat Aug 13, 2011 10:06 am

Re: Netconsole: no output during boot with mainline uboot

Postby hydro » Fri Jun 13, 2014 2:11 pm

Okay, I found it in arch/arm/include/asm/arch-kirkwood/config.h
$this->bbcode_second_pass_code('', '
#define CONFIG_NETCONSOLE /* include NetConsole support */
')
@elroberto I can confirm gnu-netcat does not work as a netcat client on the pogo.

Btw. I have similar issues with the deprecated U-Boot environment (2011.12) since the hardware router was replaced by a TP-Link WDR3600 N600, which does route the kernel netconsole messages, but not the U-Boot messages. The latter only appear when my laptop is directly attached to the Pogoplug (gnu-netcat fails in both cases).

Edit: After installing OpenWrt (Barrier Breaker) on the WDR3600 I do receive U-Boot (2011.12) messages again.
Last edited by hydro on Sat Jun 28, 2014 12:29 pm, edited 1 time in total.
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: Netconsole: no output during boot with mainline uboot

Postby elroberto » Fri Jun 13, 2014 9:23 pm

Thank you for the replies. I really thought it was me missing something obvious, but now I'll have a poke around in the code: if nothing else it's interesting :)
I'll try with a direct wired connection this weekend and let you know if that works.

I never really minded until the new uboot wiped the stock pogo, but now it seems worth making sure the netconsole works.
elroberto
 
Posts: 5
Joined: Wed Jun 11, 2014 8:52 am

Re: Netconsole: no output during boot with mainline uboot

Postby moonman » Fri Jun 13, 2014 10:09 pm

Try the bsd netcat. It worked better for me before, though i haven't tried it with the newest uboot version.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Netconsole: no output during boot with mainline uboot

Postby kmihelich » Fri Jun 13, 2014 11:20 pm

Netconsole is available, it's just not configured by default.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Netconsole: no output during boot with mainline uboot

Postby elroberto » Mon Jun 16, 2014 7:42 am

You're right moonman - the openbsd version of netcat (both as client and server) is the one that works when I test under alarm on the pogo. But still no output captured from u-boot.

$this->bbcode_second_pass_quote('', 'N')etconsole is available, it's just not configured by default

Just to be clear - you mean that u-boot has it built in and I should see output if it set the env vars properly?

I have the settings below but doesnt seem to work with a wired pogo and laptop on wifi. In fact I can't see any UDP packets in wireshark during boot.
$this->bbcode_second_pass_code('', 'ipaddr=192.168.0.11
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
if_netconsole=ping $serverip
serverip=192.168.0.70')

Haven't managed to check with the pogo wired directly to the laptop - will report back.
elroberto
 
Posts: 5
Joined: Wed Jun 11, 2014 8:52 am

Re: Netconsole: no output during boot with mainline uboot

Postby bodhi » Mon Jun 16, 2014 9:13 am

$this->bbcode_second_pass_quote('elroberto', '
')ipaddr=192.168.0.11
serverip=192.168.0.70


Perhaps these 2 ip addresses were reversed? (ipaddr must be Pogo's ip, serverip must be the monitoring console's ip).

And I would start pinging the Pogo ipaddr on the monitoring console first, and then power up the Pogo to see if netconsole is running and at the minumum will responds to a ping.
bodhi
 
Posts: 225
Joined: Sat Aug 13, 2011 10:06 am
Top

Next

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 30 guests