cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sitting
Voyager
Voyager
330 Views
Registered: ‎05-04-2014

[Petalinux 2021.1] There is no kernel message when usb flash plugin

Jump to solution

Hi,

I have found there is no kernel message when usb flash is plugin at petalinux 2021.1, I need to use lsusb to check device.

usb_2021.png

I also check with petalinux 2020.2 and there have kernel message when usb flash is plugin as below:

usb_20202.png

Is there any wrong with petalinux 2021.1?

 

Thanks

Sitting

0 Kudos
1 Solution

Accepted Solutions
chaoz
Xilinx Employee
Xilinx Employee
162 Views
Registered: ‎09-14-2018

@sitting 

The issue is due to mis-configured loglevel in 2021.1. 

The issue is only see with vai1.4 image on my side. Cannot change loglevel with bootargs since the loglevel seems to be re-written by sysctl.conf file.

The workaround is to chage console loglevel in an autostart script.

root@xilinx-zcu104-2021_1:/etc# cat init.d/setloglevel.sh

#!/bin/sh

echo "Change current log level to 7..."

dmesg -n 7

 

Chao
----------------------------------------------------------------------------------------------
Don't forget to "Accept as solution" or "Kudo" if it helps. Thanks!
----------------------------------------------------------------------------------------------

 

Chao
----------------------------------------------------------------------------------------------
如果帖子有帮助,别忘“接受为解决方案”或“奖励”。谢谢!
Don't forget to "Accept as solution" or "Kudo" if it helps. Thanks!
----------------------------------------------------------------------------------------------

View solution in original post

4 Replies
sitting
Voyager
Voyager
285 Views
Registered: ‎05-04-2014

I also use dmesg to capture message, and it has the kernel message. I don't know why the message can't show at terminal when I plug in usb flash

usb.png

0 Kudos
chaoz
Xilinx Employee
Xilinx Employee
228 Views
Registered: ‎09-14-2018

Hi @sitting 

This issue is most likely related with Linux log level.

Could you please try with below:

1. Compare if there is any changes in Linux log level settings in 2021.1 VS 2020.2, run below command on board after Linux booting,
    cat /proc/sys/kernel/printk
  The first digit of output is the current Linux log level. Only Printk with higher(smaller digit) level can be printed in console.

2. In 2021.1 console, try to increase the Linux log level digit gradually (i.e. loglevel = 5, 6, 7 .....) and see if USB messages can be printed in console among the steps:

    echo [loglevel]  > /proc/sys/kernel/printk

Chao
----------------------------------------------------------------------------------------------
Don't forget to "Accept as solution" or "Kudo" if it helps. Thanks!
----------------------------------------------------------------------------------------------

Chao
----------------------------------------------------------------------------------------------
如果帖子有帮助,别忘“接受为解决方案”或“奖励”。谢谢!
Don't forget to "Accept as solution" or "Kudo" if it helps. Thanks!
----------------------------------------------------------------------------------------------
0 Kudos
sitting
Voyager
Voyager
221 Views
Registered: ‎05-04-2014

Hi Chao,

 Thanks for your reply. This is my current setting, I have set log level to 7, and petalinux setting is still level 1. It seems it is a bug.

Selection_015.png

0 Kudos
chaoz
Xilinx Employee
Xilinx Employee
163 Views
Registered: ‎09-14-2018

@sitting 

The issue is due to mis-configured loglevel in 2021.1. 

The issue is only see with vai1.4 image on my side. Cannot change loglevel with bootargs since the loglevel seems to be re-written by sysctl.conf file.

The workaround is to chage console loglevel in an autostart script.

root@xilinx-zcu104-2021_1:/etc# cat init.d/setloglevel.sh

#!/bin/sh

echo "Change current log level to 7..."

dmesg -n 7

 

Chao
----------------------------------------------------------------------------------------------
Don't forget to "Accept as solution" or "Kudo" if it helps. Thanks!
----------------------------------------------------------------------------------------------

 

Chao
----------------------------------------------------------------------------------------------
如果帖子有帮助,别忘“接受为解决方案”或“奖励”。谢谢!
Don't forget to "Accept as solution" or "Kudo" if it helps. Thanks!
----------------------------------------------------------------------------------------------

View solution in original post