2009-01-08 05:44:39     problem with netconsole

Document created by Aaronwu Employee on Aug 9, 2013
Version 1Show Document
  • View in full screen mode

2009-01-08 05:44:39     problem with netconsole

abhrajit datta (INDIA)

Message: 67621   

 

Hi,

 

in u-boot i have set stdout and stdin to nc as described in the documentation.

 

i then set the bootargs =  netconsole=@/,@172.22.68.68/        // 172.22.68.68 is my remote host ip address where i want to see the logs,

 

then i run nc on hyperterminal.

 

on the host side i use the command         nc -u -p 6666 -v 172.22.68.225 6666  // 172.22.68.225 is the ip addr of the board..

 

 

i get the u-boot prompt in my remote host console and i boot linux using bootm.

 

in the host console i get the following messages:

 

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.22.19-ADI-2008R1.5-svn

   Created:      2009-01-08  15:58:00 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3978990 Bytes =  3.8 MB

   Load Address: 00001000

   Entry Point:  001be000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 1be000

 

 

 

 

after which the rest of the log messages come in the other console(hyperterminal) and i dont get the linux command prompt in the host console.Why does the stdout and stdin switch from nc to serial just after starting the kernel. Is there any way i can get the whole log messages+command prompt of linux on my host machine?

 

Thanks

 

abhri

QuoteReplyEditDelete

 

 

2009-01-08 10:14:50     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67627   

 

HI,

 

After seeing the kernel messages i found that

 

netconsole: not configured, aborting

 

though i have enabled netconsole in make menuconfig.

 

Any ideas why this is happening?

 

thanks

 

abhri

QuoteReplyEditDelete

 

 

2009-01-08 10:43:09     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67629   

 

my netconsole configuration is setenv bootargs netconsole=6666@172.22.68.225/,@172.22.68.32/

 

it hangs after

 

Starting Kernel at = 1be000

 

thanks

 

abhri

QuoteReplyEditDelete

 

 

2009-01-08 23:54:21     Re: problem with netconsole

Parimala Baggiri (INDIA)

Message: 67646   

 

Hi Abhrajit,

 

                Why did tou enable your netconsole? if you want to see linux cmd prompt and Log messages on your Hyper Terminal then configure the console to serial.

 

Regards.

 

Parimala

 

                     

QuoteReplyEditDelete

 

 

2009-01-09 00:02:11     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67647   

 

Hi,

 

I want the command prompt and log messages in another remote linux machine. And I am enabling the netconsole for cases where it is not possible to use uart.

 

Abhri

QuoteReplyEditDelete

 

 

2009-01-09 00:25:46     Re: problem with netconsole

Parimala Baggiri (INDIA)

Message: 67648   

 

Hi,

 

     If at all my understanding is correct, r u trying to access ur board remotely using network? If yes one option for that is telnet to ur board using the configured ip address(telnet 172.22.68.225 23). To do this network should be up. Then u will get command prompt & u could see ur log messages at /var/log/messages.

 

Regards

 

Parimala

QuoteReplyEditDelete

 

 

2009-01-09 01:13:57     Re: problem with netconsole

Mike Frysinger (UNITED STATES)

Message: 67652   

 

the kernel netconsole is one way (log messages are only transmitted).  you cannot communicate with it.

QuoteReplyEditDelete

 

 

2009-01-09 02:02:38     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67653   

 

Hi,

 

i want to restate my problem. Here's what i have till now.

 

In linux i included netconsole in make menuconfig.

 

In u-boot i configured netconsole as:

 

setenv bootargs netconsole=6666@172.22.68.225/,@172.22.68.68/

 

//172.22.68.225 is board ip 172.22.68.68 is remote machine ip

 

 

in remote machine i start listening to port 6666 using  nc –u –p 6666 –v 172.22.68.225 6666

 

in u-boot i set stdout nc and stdin nc and run nc

 

i get bfin>  uboot prompt in remote machine.

 

now i download linux image and run bootm.

 

i get the following messages in remote machine:

 

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.22.19-ADI-2008R1.5-svn

   Created:      2009-01-08  15:58:00 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3978990 Bytes =  3.8 MB

   Load Address: 00001000

   Entry Point:  001be000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 1be000

 

 

after which thr are no messages in .. remote machine...it hangs

 

thr are no messages in u-boot also after i run nc..

 

it just hangs.

 

Ne thing i missed in configuration?

 

Thanks

 

Abhri

 

 

QuoteReplyEditDelete

 

 

2009-01-09 02:35:49     Re: problem with netconsole

Mike Frysinger (UNITED STATES)

Message: 67654   

 

using u-boot exactly as documented works fine for me:

http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:netconsole

 

as for the kernel, you wont get early output as netconsole cant be enabled until the network device is setup.  boot over the uart normally and make sure you get the netconsole: lines.

QuoteReplyEditDelete

 

 

2009-01-09 04:09:06     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67656   

 

Hi Mike,

 

Can u post your netconsole configuration for command line. I boot over the uart using the following :

 

bootdelay=5

baudrate=57600

loads_echo=1

rootpath=/romfs

hostname=bf527-ezkit

loadaddr=0x1000000

ubootfile=u-boot.ldr

update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 0x2003FFFF;erase 0x2

0000000 0x2003FFFF;cp.b $(loadaddr) 0x20000000 $(filesize)

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):

$(hostname):eth0:off

ramargs=set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 conso

le=tty0 console=ttyBF0,57600

ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsver

s=3

nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm

flashboot=bootm 0x20100000

ethact=Blackfin EMAC

bootcmd=tftp 0x1200000 uImage;bootm 0x1200000

filesize=0

gatewayip=172.22.0.1

netmask=255.255.252.0

ipaddr=172.22.68.225

serverip=172.22.68.32

nc=setenv stdout nc;setenv stdin nc

ncip=172.22.68.68

ethaddr=00:14:C2:CB:BD:DB

stdin=serial

stdout=serial

stderr=serial

bootargs=root=/dev/mtdblock0 rw netconsole=6666@172.22.68.225/,@172.22.68.68/

 

Environment size: 1061/8188 bytes

 

when i boot it hangs after starting kernel at 0x1be00 line...

 

Thanks

 

Abhri

QuoteReplyEditDelete

 

 

2009-01-09 04:27:00     Re: problem with netconsole

Mike Frysinger (UNITED STATES)

Message: 67692   

 

boot over the uart first to make sure the kernel even works.  otherwise verify the kernel log buffer using this:

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:debug:post_mortem

QuoteReplyEditDelete

 

 

2009-01-09 04:49:01     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67695   

 

Hi Mike,

 

Without configuring the netconsole my kernel boots via uart..

 

bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=tty0 cons

ole=ttyBF0,57600

bootdelay=5

baudrate=57600

loads_echo=1

rootpath=/romfs

hostname=bf527-ezkit

loadaddr=0x1000000

ubootfile=u-boot.ldr

update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 0x2003FFFF;erase 0x2

0000000 0x2003FFFF;cp.b $(loadaddr) 0x20000000 $(filesize)

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):

$(hostname):eth0:off

ramargs=set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 conso

le=tty0 console=ttyBF0,57600

ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsver

s=3

nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm

flashboot=bootm 0x20100000

ethact=Blackfin EMAC

bootcmd=tftp 0x1200000 uImage;bootm 0x1200000

filesize=0

gatewayip=172.22.0.1

netmask=255.255.252.0

ipaddr=172.22.68.225

serverip=172.22.68.32

nc=setenv stdout nc;setenv stdin nc

ncip=172.22.68.68

ethaddr=00:14:C2:CB:BD:DB

stdin=serial

stdout=serial

stderr=serial

 

i get the linux root prompt...

 

 

 

 

 

when i configure the netconsole:

 

bootdelay=5

baudrate=57600

loads_echo=1

rootpath=/romfs

hostname=bf527-ezkit

loadaddr=0x1000000

ubootfile=u-boot.ldr

update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 0x2003FFFF;erase 0x2

0000000 0x2003FFFF;cp.b $(loadaddr) 0x20000000 $(filesize)

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):

$(hostname):eth0:off

ramargs=set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 conso

le=tty0 console=ttyBF0,57600

ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsver

s=3

nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm

flashboot=bootm 0x20100000

ethact=Blackfin EMAC

bootcmd=tftp 0x1200000 uImage;bootm 0x1200000

filesize=0

gatewayip=172.22.0.1

netmask=255.255.252.0

ipaddr=172.22.68.225

serverip=172.22.68.32

nc=setenv stdout nc;setenv stdin nc

ncip=172.22.68.68

ethaddr=00:14:C2:CB:BD:DB

stdin=serial

stdout=serial

stderr=serial

bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=tty0 cnso

le=ttyBF0,57600 netconsole=6666@172.22.68.225/,@172.22.68.68/00:18:8B:81:44:7E

 

after issuing bootm it shows the following log and hangs:

 

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.22.19-ADI-2008R1.5-svn

   Created:      2009-01-09  12:13:48 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4018039 Bytes =  3.8 MB

   Load Address: 00001000

   Entry Point:  001c0000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 1c0000

Linux version 2.6.22.19-ADI-2008R1.5-svn (abhrajit@localhost) (gcc version 4.1.2

(ADI svn)) #158 Fri Jan 9 17:43:43 IST 2009

early printk enabled on early_BFuart0

Hardware Trace Active and Enabled

Reset caused by Software reset

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF527 Rev 0.0

Warning: Unsupported Chip Revision ADSP-BF527 Rev 0.0 detected

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 525 MHz core clock and 131 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x00144fc0

  rodata    = 0x00145000-0x001a6090

  data      = 0x001a7000-0x001c0000

    stack   = 0x001a8000-0x001aa000

  init      = 0x001c0000-0x00784000

  bss       = 0x00784000-0x00797840

  available = 0x00797840-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

NOMPU: setting up cplb tables for global access

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 16002

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 conso

le=tty0 cnsole=ttyBF0,57600 netconsole=6666@172.22.68.225/,@172.22.68.68/00:18:8

B:81:44:7E

netconsole: local port 6666

netconsole: local IP 172.22.68.225

netconsole: interface eth0

netconsole: remote port 6666

netconsole: remote IP 172.22.68.68

netconsole: remote ethernet address 00:18:8b:81:44:7e

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Console: colour dummy device 80x25

console handover: boot [early_BFuart0] -> real [tty0]

 

 

thanks

 

abhri

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-09 04:54:14     Re: problem with netconsole

Mike Frysinger (UNITED STATES)

Message: 67696   

 

so is it actually working ?

QuoteReplyEditDelete

 

 

2009-01-09 05:01:41     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67698   

 

it hangs when i configure the netconsole . if i dont configure netconsole it boots .

 

abhri

QuoteReplyEditDelete

 

 

2009-01-09 05:04:57     Re: problem with netconsole

Mike Frysinger (UNITED STATES)

Message: 67699   

 

it isnt hanging.  you told it to not output to the serial console so it didnt.  if you dont set console= to anything you cant be surprised if nothing comes out.

 

QuoteReplyEditDelete

 

 

2009-01-09 05:27:15     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67703   

 

Hi,

 

How do i output it to my remote machine?

 

Abhri

QuoteReplyEditDelete

 

 

2009-01-09 05:43:29     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67705   

 

Hi,

 

Ok i changed the console = ttyBF0 and now my kernel's booting.But what i want is that the command prompt and log messages should come in the remote machine. my kernel command line is:

 

setenv bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=ttyBF0  netconsole=6666@172.22.68.225/,22@172.22.68.68/00:18:8B:81:44:7E

 

then i set stdin and stdout to nc and run nc;

 

in the remote machine i use nc -u -p 6666 -v 172.22.68.225 6666

i get bfin > u-boot prompt and i run bootm:

 

in the remote host machine i get log messages till:

 

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.22.19-ADI-2008R1.5-svn

   Created:      2009-01-09  12:13:48 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4018039 Bytes =  3.8 MB

   Load Address: 00001000

   Entry Point:  001c0000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 1c0000

 

after which the messages start getting logged in my serial console:

 

netconsole: local IP 172.22.68.225

netconsole: interface eth0

netconsole: remote port 22

netconsole: remote IP 172.22.68.68

netconsole: remote ethernet address 00:18:8b:81:44:7e

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Console: colour dummy device 80x25

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Kernel managed physical pages: 16127

Memory available: 56152k/65536k RAM, (5904k init code, 1295k kernel code, 571k d

ata, 1024k dma, 588k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (42 KB free)

Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

Generic PHY: Registered new driver

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, pio, host, debug=0

musb_hdrc: ConfigData=0x00 (UTMI-8)

musb_hdrc: kernel must blacklist external hubs

musb_hdrc: hw_ep 0shared, max 64

musb_hdrc: hw_ep 1tx, max 128

musb_hdrc: hw_ep 1rx, max 128

musb_hdrc: hw_ep 2tx, max 128

musb_hdrc: hw_ep 2rx, max 128

musb_hdrc: hw_ep 3tx, max 128

musb_hdrc: hw_ep 3rx, max 128

musb_hdrc: hw_ep 4tx, max 128

musb_hdrc: hw_ep 4rx, max 128

musb_hdrc: hw_ep 5tx, max 1024

musb_hdrc: hw_ep 5rx, max 1024

musb_hdrc: hw_ep 6tx, max 1024

musb_hdrc: hw_ep 6rx, max 1024

musb_hdrc: hw_ep 7tx, max 1024

musb_hdrc: hw_ep 7rx, max 1024

musb_hdrc: USB Host mode controller at ffc03800 using PIO, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bfin-t350mcqb: 320x240 24-bit RGB FrameBuffer initializing...

dma_alloc_init: dma_page @ 0x03855000 - 256 pages at 0x03f00000

Console: switching to colour frame buffer device 53x21

bfin-otp: initialized

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_

clk=2500000Hz(mdc_div=25)@sclk=131MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

netconsole: device eth0 not up yet, forcing it

netconsole: carrier detect appears untrustworthy, waiting 4 seconds

PHY: 0:01 - Link is Up - 100/Full

netconsole: network logging started

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, r

egs_base@ffc00500, dma channel@7

sl811: driver sl811-hcd, 19 May 2005

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

mice: PS/2 mouse device common for all mice

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

usbcore: registered new interface driver usbhid

drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50

2006 UTC).

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

Setting up Blackfin MMR debugfs

rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 02:45:11 (9911)

Freeing unused kernel memory: 5904k freed

 

logo comes up

 

root:/>

 

why is this happening? Cant i get everything on my remote machine?

 

Thanks

 

Abhri

QuoteReplyEditDelete

 

 

2009-01-09 06:14:26     Re: problem with netconsole

Mike Frysinger (UNITED STATES)

Message: 67707   

 

if you set the remote port to 22 but then listen on port 6666, that doesnt sound like it'll work at all

QuoteReplyEditDelete

 

 

2009-01-09 07:06:25     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67710   

 

Hi Mike,

 

I corrected that mistake and set remote port to 6666.

 

now the kernel log shows

 

 

netconsole: local port 6665

netconsole: local IP 172.22.68.225

netconsole: interface eth0

netconsole: remote port 6666

netconsole: remote IP 172.22.68.68

netconsole: remote ethernet address 00:18:8b:81:44:7e

Configuring Blackfin Priority Driven Interrupts

 

still when i use nc -u -p 6666 -v 172.22.68.225 6666

i get the messages till

 

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.22.19-ADI-2008R1.5-svn

   Created:      2009-01-09  12:13:48 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4018039 Bytes =  3.8 MB

   Load Address: 00001000

   Entry Point:  001c0000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 1c0000

on the remote host.

 

rest of the log till the command prompt comes in the serial console only.

 

Am i missing something else? Really running out of ideas..

 

Abhri

QuoteReplyEditDelete

 

 

2009-01-09 07:12:31     Re: problem with netconsole

Mike Frysinger (UNITED STATES)

Message: 67712   

 

then use wireshark to make sure the packets are being sent to the right place

QuoteReplyEditDelete

 

 

2009-01-09 07:27:55     Re: problem with netconsole

abhrajit datta (INDIA)

Message: 67714   

 

Mike

 

what i cant understand is how come few messages come to the remote machine and the rest go to the serial console...

 

abhri

Attachments

    Outcomes