8.0.X: netconsole feature unusable and the way to fix it

  • Hello.

    libreelec 8 kernel has built in netconsole feature (netconsole.txt)
    which is useful for debugging kernel related problems.

    Unfortunately it's built in into kernel and not as module. When it's built in into kernel the only way to activate it is to pass
    parameters via /flash/cmdline.txt like:

    Code
    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 netconsole=@/,@192.168.0.249/ quiet

    That won't work because eth0 is initialized later, after netconsole thus kernel will say:

    Code
    [    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 netconsole=@/,@192.168.0.249/ quiet root=/dev/ram0 rdinit=/init BOOT_IMAGE=/kernel.img usbcore.autosuspend=-1
    [    0.964904] netpoll: netconsole: local port 6665
    [    0.964909] netpoll: netconsole: local IPv4 address 0.0.0.0
    [    0.964911] netpoll: netconsole: interface 'eth0'
    [    0.964913] netpoll: netconsole: remote port 6666
    [    0.964915] netpoll: netconsole: remote IPv4 address 192.168.0.249
    [    0.964921] netpoll: netconsole: remote ethernet address ff:ff:ff:ff:ff:ff
    [    0.964925] netpoll: netconsole: eth0 doesn't exist, aborting
    [    0.965019] netconsole: cleaning up

    Solutions:
    1) make netconsole as module instead of built-in, so it can be modprobbed like

    Code
    modprobe netconsole netconsole=@/,@192.168.0.249/

    OR

    2) enable dynamic netconsole configuration capability CONFIG_NETCONSOLE_DYNAMIC

    Code
    LibreELEC:~ # modprobe configs
    LibreELEC:~ # zcat /proc/config.gz |grep NETCONS | grep DYNA
    # CONFIG_NETCONSOLE_DYNAMIC is not set


    I hope one or both solutions can be applied to libreelec kernel.

    Thanks!

  • By all means submit a PR (ideally for all projects).

    For niche requirements like this it's unlikely anyone is going to make the change unless you submit the PR, where it can be considered/debated, and ultimately merged for a future release.


  • Where to submit PR?


    GitHub - LibreELEC/LibreELEC.tv: Just enough OS for KODI


    What are other projects?


    LibreELEC.tv/projects at master · LibreELEC/LibreELEC.tv · GitHub


    Would be good if thread-83.html mentioned that PR is needed to fix bugs.

    PRs from users are not *needed* to fix bugs, but as it's difficult to describe this as a bug (and even if it is, it affects almost no-one, ie. it's very niche) I simply suggested you submit the changes as I'm not sure anymore else will consider this as something that needs "fixing". Plus, you sounded like you were relatively "technical" so I didn't expect a request for a PR to phase you.

    It's not entirely clear why netconsole is enabled at all, as it obviously doesn't work as configured (in which case, maybe it should be disabled/removed).

  • Ah, pull request (was thinking about "problem report" as this is also used in some bug tracking systems like GNATS for example).

    Are there kernel build logs (from official builds) available anywhere? Would like to verify things before creating pull request.

    netconsole is quite useful for tracking kernel related problems and the fix is easy, so it's better to get this fixed.

    Thanks

  • No build logs I'm afraid. If you just want to change netconsole to a module then that should be relatively straightforward (and once you've pushed a change it can be added in test builds, ie RPi/RPi2/Generic). I suggest running "make oldconfig" for the kernel and updated config if you can, in case there are any other related/dependent changes. If you're not able to do this then I can do it and feed back any necessary changes.