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);