This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

netconsole is missing

Guru 20755 points
Other Parts Discussed in Thread: OMAPL138

Hi,

I'm trying to use netconsole in linux.
I've compiled the linux clean with CONFIG_NETCONSOLE & CONFIG_NETCONSOLE_DYNAMIC:

-dvr-rdk$ cat .config | grep "NETC"
CONFIG_NETCONSOLE=y
CONFIG_NETCONSOLE_DYNAMIC=y

I first tried to boot linux with netconsole. I then got message "console [tty0] enabled, bootconsole disabled" for some seconds, but it continue the printing to console as following:

OMAP clockevent source: GPTIMER1 at 20000000 Hz
Console: colour dummy device 80x30
console [tty0] enabled, bootconsole disabled

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org dm814x ttyO0

Arago 2012.10 dm814x ttyO0

dm814x login: root
root@dm814x:~# cd /sys/

I also tried to set the netconsole dynamic, the netconsole folder is missing in 

cd /sys/kernel/config/ , i.e. I dont have /sys/kernel/config/netconsole/

All the netconsole is issue is relevant because I'm still trying to use KGDB. If there is some solution to my problem of using kgsb, It will be helpful

http://e2e.ti.com/support/embedded/linux/f/354/p/358670/1260155.aspx#1260155

Thanks,

Ran

  • Hi Ran,

    Please refer linux doc.

    linux-source/Documentation/networking/netconsole.txt

    Have you enabled and mounted "configfs" like below ?

    mount none -t configfs /sys/kernel/config
  • Thanks Titus, I'll check and get back to you. 

  • Hi Titus,

    When compiles inside kernel, I see nothing in host.
    When compiled as module I'm doing:
    target> modprobe netconsole netconsole="@/,@10.0.0.1/"

    and then start netcat from ubuntu:

    -dvr-rdk$ nc -l -u 6666


    netconsole: local port 6665
    netconsole: local IP 0.0.0.0
    netconsole: interface 'eth0'
    netconsole: remote port 6666
    netconsole: remote IP 10.0.0.1
    netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
    netconsole: local IP 10.0.0.2
    ubuntu@ubuntu-laptop:~/dvrrdk/DVRRDK_04.01.00.02/ti_tools/linux_lsp/kernel/linux

    the netconsole existed without printing anything mode...
    Is it related to problem in netcat of ubuntu ?


    Thanks,

    Ran

  • Hi Titus,

    Did you find any problem in the steps I described above for using netconsole ?

    Thanks,

    Ran

  • Hi Ran,

    I'm able to enable and got working 'netconsole' without any issues.

    1) Enable "netconsole" support as module

    2) "insert netconsole driver with remote IP

    3) Open the remote port in host PC through "netconole" command (nc)

    If any panic occurs in target side then you would get kernel panic errors through network at host PC.

    Log:


    Target Log:

    root@omapl138-lcdk:/#
    root@omapl138-lcdk:/#
    root@omapl138-lcdk:/#
    root@omapl138-lcdk:/# ifconfig
    eth0      Link encap:Ethernet  HWaddr 1A:A0:E9:9B:4A:EE  
              inet addr:10.100.1.83  Bcast:10.100.1.255  Mask:255.255.255.0
              inet6 addr: fe80::18a0:e9ff:fe9b:4aee/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:20499 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16322 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:12437605 (11.8 MiB)  TX bytes:4542028 (4.3 MiB)
              Interrupt:33

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    root@omapl138-lcdk:/# modprobe netconsole netconsole=@/eth0,@10.100.1.94/00:24:7
    e:0e:f1:5d
    netconsole: local port 6665
    netconsole: local IP 0.0.0.0
    netconsole: interface 'eth0'
    netconsole: remote port 6666
    netconsole: remote IP 10.100.1.94
    netconsole: remote ethernet address 00:24:7e:0e:f1:5d
    netconsole: local IP 10.100.1.83
    console [netcon0] enabled
    netconsole: network logging started
    root@omapl138-lcdk:/#
    root@omapl138-lcdk:/#
    root@omapl138-lcdk:/#
    root@omapl138-lcdk:/# insmod panic.ko   (initiating kernel panic)
    panic: module license 'unspecified' taints kernel.
    Disabling lock debugging due to kernel taint
    crash module starting
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = c091c000
    [00000000] *pgd=c124f831, *pte=00000000, *ppte=00000000
    Internal error: Oops: 17 [#1] PREEMPT
    Modules linked in: panic(P+) netconsole ipv6
    CPU: 0    Tainted: P             (3.1.10 #4)
    PC is at crash_module_init+0x10/0x2c [panic]
    LR is at crash_module_init+0x10/0x2c [panic]
    pc : [<bf054010>]    lr : [<bf054010>]    psr: 60000013
    sp : c1223ec0  ip : 00000007  fp : 0000001a
    r10: 00000001  r9 : 000000b4  r8 : bf054000
    r7 : 00000000  r6 : c1222000  r5 : c03db160  r4 : 00000000
    r3 : 00000000  r2 : 60000013  r1 : 00000001  r0 : 00000019
    Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    Control: 0005317f  Table: c091c000  DAC: 00000015
    Process insmod (pid: 1249, stack limit = 0xc1222270)
    Stack: (0xc1223ec0 to 0xc1224000)
    3ec0: bf052074 c0008854 00000000 00000001 c11ab840 bf052074 bf052074 bf0520bc
    3ee0: 00000001 c0899d40 0000001c 00000001 0000001a c004b828 bf052080 c1223fb0
    3f00: c004a6dc 00000000 c02acbac bf052198 00000028 00012008 c02acb94 00012008
    3f20: c0899a40 c2874000 00000c50 c28744ac c287438d c2874b9c c11ab880 000001ac
    3f40: 000001fc 00000000 00000000 00000018 00000019 00000010 0000000e 0000000d
    3f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c03682ac
    3f80: c122a700 00008a28 00012008 beff2ef5 00000080 c00094a4 c1222000 00000000
    3fa0: 00000000 c0009320 00008a28 00012008 00012018 00000c50 00012008 00000070
    3fc0: 00008a28 00012008 beff2ef5 00000080 00004000 00000000 00000003 00000000
    3fe0: 00000c50 beff2c8c 00008c8c 401e19e4 60000010 00012018 c1ffe831 002fec31
    [<bf054010>] (crash_module_init+0x10/0x2c [panic]) from [<c0008854>] (do_one_initcall+0x30/0x16c)
    [<c0008854>] (do_one_initcall+0x30/0x16c) from [<c004b828>] (sys_init_module+0xe8/0x1990)
    [<c004b828>] (sys_init_module+0xe8/0x1990) from [<c0009320>] (ret_fast_syscall+0x0/0x2c)
    Code: e92d4010 e59f0018 e3a04000 eb4946b9 (e5941000)
    ---[ end trace d07e6444bd8e11cd ]---
    Segmentation fault
    root@omapl138-lcdk:/#
    root@omapl138-lcdk:/#

    Host PC Log:

    titus@Titus:~/titus/ti-e2e/OMAPL138_LCDK/board-support/linux-3.1.10$
    titus@Titus:~/titus/ti-e2e/OMAPL138_LCDK/board-support/linux-3.1.10$ifconfig

    eth0      Link encap:Ethernet  HWaddr 00:24:7e:0e:f1:5d  
              inet addr:10.100.1.94  Bcast:10.100.1.255  Mask:255.255.255.0
              inet6 addr: fe80::224:7eff:fe0e:f15d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1531276 errors:0 dropped:0 overruns:0 frame:0
              TX packets:741746 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:1048232417 (1.0 GB)  TX bytes:365343405 (365.3 MB)
              Interrupt:20 Memory:fe400000-fe420000

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:7502 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7502 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:715202 (715.2 KB)  TX bytes:715202 (715.2 KB)

    titus@Titus:~/titus/ti-e2e/OMAPL138_LCDK/board-support/linux-3.1.10$
    titus@Titus:~/titus/ti-e2e/OMAPL138_LCDK/board-support/linux-3.1.10$ netcat -u -l 6666
    panic: module license 'unspecified' taints kernel.
    Disabling lock debugging due to kernel taint
    crash module starting
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = c091c000
    [00000000] *pgd=c124f831, *pte=00000000, *ppte=00000000
    Internal error: Oops: 17 [#1] PREEMPT
    Modules linked in: panic(P+) netconsole ipv6
    CPU: 0    Tainted: P             (3.1.10 #4)
    PC is at crash_module_init+0x10/0x2c [panic]
    LR is at crash_module_init+0x10/0x2c [panic]
    pc : [<bf054010>]    lr : [<bf054010>]    psr: 60000013
    sp : c1223ec0  ip : 00000007  fp : 0000001a
    r10: 00000001  r9 : 000000b4  r8 : bf054000
    r7 : 00000000  r6 : c1222000  r5 : c03db160  r4 : 00000000
    r3 : 00000000  r2 : 60000013  r1 : 00000001  r0 : 00000019
    Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    Control: 0005317f  Table: c091c000  DAC: 00000015
    Process insmod (pid: 1249, stack limit = 0xc1222270)
    Stack: (0xc1223ec0 to 0xc1224000)
    3ec0: bf052074 c0008854 00000000 00000001 c11ab840 bf052074 bf052074 bf0520bc
    3ee0: 00000001 c0899d40 0000001c 00000001 0000001a c004b828 bf052080 c1223fb0
    3f00: c004a6dc 00000000 c02acbac bf052198 00000028 00012008 c02acb94 00012008
    3f20: c0899a40 c2874000 00000c50 c28744ac c287438d c2874b9c c11ab880 000001ac
    3f40: 000001fc 00000000 00000000 00000018 00000019 00000010 0000000e 0000000d
    3f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c03682ac
    3f80: c122a700 00008a28 00012008 beff2ef5 00000080 c00094a4 c1222000 00000000
    3fa0: 00000000 c0009320 00008a28 00012008 00012018 00000c50 00012008 00000070
    3fc0: 00008a28 00012008 beff2ef5 00000080 00004000 00000000 00000003 00000000
    3fe0: 00000c50 beff2c8c 00008c8c 401e19e4 60000010 00012018 c1ffe831 002fec31
    [<bf054010>] (crash_module_init+0x10/0x2c [panic]) from [<c0008854>] (do_one_initcall+0x30/0x16c)
    [<c0008854>] (do_one_initcall+0x30/0x16c) from [<c004b828>] (sys_init_module+0xe8/0x1990)
    [<c004b828>] (sys_init_module+0xe8/0x1990) from [<c0009320>] (ret_fast_syscall+0x0/0x2c)
    Code: e92d4010 e59f0018 e3a04000 eb4946b9 (e5941000)
    ---[ end trace d07e6444bd8e11cd ]---