public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: U.Mutlu <for-gmane@mutluit.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Automatic starting of netconsole at boot
Date: Tue, 9 Apr 2019 19:05:41 +0200	[thread overview]
Message-ID: <q8ijd7$2hm7$1@blaine.gmane.org> (raw)

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

             reply	other threads:[~2019-04-09 17:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 17:05 U.Mutlu [this message]
2019-04-09 18:05 ` [U-Boot] Automatic starting of netconsole at boot U.Mutlu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='q8ijd7$2hm7$1@blaine.gmane.org' \
    --to=for-gmane@mutluit.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox