[U-Boot] Automatic starting of netconsole at boot

U.Mutlu for-gmane at mutluit.com
Tue Apr 9 17:05:41 UTC 2019


Hi,

I built u-boot with CONFIG_NETCONSOLE=y. It works, but how can I set up
u-boot so that after rebooting, it automatically (ie. w/o manual interaction)
goes into netconsole mode?

Ie. controlling the device remotely via netconsole by using the 
tools/netconsole script on the host as shown in doc/README.NetConsole,
but there only a manual setup is given. For auto-starting netconsole
I put these commands into boot.cmd and compiled it to boot.scr on the device:

setenv ipaddr 192.168.1.7
setenv ncip 192.168.1.2
setenv nc 'setenv stdout nc;setenv stdin nc;setenv stderr nc'
run nc

At boot the netconnect connection seems to work as I get some output
on the host, but after only a few seconds the device reboots itself:

root at xy:/.../u-boot# tools/netconsole 192.168.1.7
Board out port: 6666
Board in port: 6666
NOTE: the interrupt signal (normally ^C) has been remapped to ^T
ncb: not found
#MYINFO: the following output comes from the remote board via netconsole:
SCRIPT FAILED: continuing...
scanning bus for devices...
data abort
pc : [<7ef94f8e>]          lr : [<7ef911a1>]
reloc pc : [<4a01af8e>]    lr : [<4a0171a1>]
sp : 7af515b0  ip : 0000001c     fp : 000000c0
r10: 00000000  r9 : 7af59ed8     r8 : 00000000
r7 : 7af51830  r6 : 7efd3f54     r5 : 7efdb9b8  r4 : 7efdb9b8
r3 : 00000000  r2 : 00000000     r1 : ea000016  r0 : 7efdb9b8
Flags: nZcv  IRQs off  FIQs off  Mode SVC_32
Code: e92dbd10 f8d045f0 b0858080 1000f8d8 (f8d14604)
Resetting CPU ...


It seems one needs some more commands when doing it inside boot.scr,
or a different method.
Or is the use of the envvar "nc" above maybe buggy: recursive definitions 
maybe? [I just followed the above u-boot doc]

Is such an auto-start of netconsole possible at boot, and if yes how?

Thx

-- 
U.Mutlu



More information about the U-Boot mailing list