Kernel Debug messages options

Hi Everyone,

newbie question.

Is there a way to show more kernel messages during boot-up maybe building my image with some peculiar

set-up in menuconfig or does Openwrt give no options about this ? With messages I mean the ones

you can get typing #dmesg to figure out what is going on at boot time.

Any feedback would be greatly appreciated. Thank you

Hi,

can't find a solution. Googling around I found different stuffs maybe its because of different linux kernel version and linux distribution.

So far what I am getting. Working with openwrt 18.06.1 - kernel 4.9 - gl-inet-ar150 ar9330/1 Soc.

My u-boot bootargs:

uboot> printenv
bootargs=console=ttyATH0,115200 board=domino root=31:03 rootfstype=squashfs,jffs2 noinitrd mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1280k(kernel),14656k(rootfs),64k(nvram),64k(art)ro,15936k@0x5000)

My kernel dmesg at starup`

[    0.000000] Kernel command line:  board=GL-AR150 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro console=ttyATH0,115200 rootfstype=squashfs noinitrd

My openwrt/target/linux/ar71xx/config-4.9

CONFIG_CMDLINE="rootfstype=squashfs noinitrd"
CONFIG_CMDLINE_BOOL=y
# CONFIG_CMDLINE_OVERRIDE is not set

from http://redsymbol.net/linux-kernel-boot-parameters/4.9/

I get:

   ignore_loglevel [KNL]
                        Ignore loglevel setting - this will print /all/
                        kernel messages to the console. Useful for debugging.
                        We also add it as printk module parameter, so users
                        could change it dynamically, usually by
                        /sys/module/printk/parameters/ignore_loglevel.

is there a way to add 'ignore_loglevel' somewhere in the aboves

to try to get more messages, or maybe I am already getting them all,

before the part where I get at startup ?

[    3.580088] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.596699] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.766058] jffs2: notice: (359) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

If I have to do it at u-boot level using

setenv - set environment variables

does setenv saves them somewhere ? or change them just in memory ?

I don't' want to brick my bootloader, from what I understood (and I could be wrong)

the bootloader is not touched when I flash my gl-inet-ar150 with openwrt sysupgrade.bin.

What additional kernel messages are you missing or looking for?

something about:

[    0.664483] libphy: Fixed MDIO Bus: probed
[    0.685293] libphy: ag71xx_mdio: probed
[    1.317699] ag71xx-mdio.1: unknown phy id '0067:7861'                              +-----------------------------+
[    1.323631] NET: Registered protocol family 10          

problem is [ 1.317699] ag71xx-mdio.1: unknown phy id '0067:7861'

I am messing up things about board config platforms and drivers

I dont know about so I need the more info I can get

HHi Tmomas !

Is there a way to add more printk() messages to my Mach-gl-ar150.c or dev-Eth.h or net drivers ? Or openwrt Linux 4.9 uses something else ? I found some starting points in kernel debugging on Bootlin slides:

image image image image

© Copyright 2004-2018, Bootlin. Creative Commons BY-SA 3.0 license. Latest update: November 2, 2018.

But I don’t know if they are relevant to openwrt Linux 4.9 ?

Do you think I should try to figure out something from them ? I am very new to embedded Linux and more new to Linux so I am not sure openwrt was the right starting point ! Are these bootlin slides a good starting point ? Or I should look at something else ?

Hi

used

>  cat proc/sys/kernel/printk
7	4	1	7

according to this (https://elinux.org/Debugging_by_printing) is maximum

To determine your current console_loglevel you simply enter:

$ cat /proc/sys/kernel/printk
	7       4       1       7
	current	default	minimum	boot-time-default

what I am not sure its if this apply to events before

[    3.580088] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.596699] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.766058] jffs2: notice: (359) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

or not ?

hi

did you ever find solution to this? i'm having same issue with ath10k dbg messages, warn and err are printed on serial console, dbg messages are not. i can view them in dmesg but it doesn't help in cases when system crashed

ok, ignore_loglevel works and nice thing is full kernel recompile is not even needed