关于kernel

3、遇到WARNING:"****" [*****.ko] undefined!

"wiphy_free" [/home/surpass/drv/rtl8189es/rtl8189es.ko] undefined!

我的情况是因为wiphy_free网络82011功能没有打开,

配置:make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- menuconfig

--- Wireless                                                                                                             │ │  
  │ │                                                   <M>   cfg80211 - wireless configuration API                                                                              │ │  
  │ │                                                   [ ]     nl80211 testmode command                                                                                         │ │  
  │ │                                                   [ ]     enable developer warnings                                                                                        │ │  
  │ │                                                   [ ]     cfg80211 regulatory debugging                                                                                    │ │  
  │ │                                                   [*]     enable powersave by default                                                                                      │ │  
  │ │                                                   [ ]     cfg80211 wireless extensions compatibility                                                                       │ │  
  │ │                                                   <M>   Generic IEEE 802.11 Networking Stack (mac80211)                                                                    │ │  
  │ │                                                         Default rate control algorithm (Minstrel)  --->                                                                    │ │  
  │ │                                                   [ ]   Enable mac80211 mesh networking (pre-802.11s) support                                                              │ │  
  │ │                                                   [ ]   Trace all mac80211 debug messages                                                                                  │ │  
  │ │                                                   [ ]   Select mac80211 debugging features  ----

然后编译内核:make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux-

和打包:make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- uImage

2.关于kbuild:

http://blog.chinaunix.net/uid-21712186-id-1818187.html

1、查看当前控制台的打印级别
 cat /proc/sys/kernel/printk
 4    4    1    7
 其中第一个“4”表示内核打印函数printk的打印级别,只有级别比他高的信息才能在控制台上打印出来,既 0-3级别的信息

a、修改打印
 echo "新的打印级别  4    1    7" >/proc/sys/kernel/printk

或者用:dmesg -n 4

b、不够打印级别的信息会被写到日志中可通过dmesg 命令来查看

c、printk的打印级别


#define KERN_EMERG        "<0>" /* system is unusable */
#define KERN_ALERT         "<1>" /* action must be taken immediately */
#define KERN_CRIT            "<2>" /* critical conditions */
#define KERN_ERR             "<3>" /* error conditions */
#define KERN_WARNING   "<4>" /* warning conditions */
#define KERN_NOTICE       "<5>" /* normal but significant condition */
#define KERN_INFO            "<6>" /* informational */
#define KERN_DEBUG       "<7>" /* debug-level messages */

d、printk函数的使用

      printk(打印级别  “要打印的信息”)

       打印级别  既上面定义的几个宏

例如:        printk(KERN_ALERT "CVU UNDISCOVERABLE curval=0x%x,pre_val=0x%x\n",curval,pre_val);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值