KERNELRELEASE µÄ¶¨Ò壬Linux $(KERNELRELEASE)
×î½üÓÃÓÑÉÆÖ®±ÛµÄ°å×Ó£¬·¢ÏÖÄں˵ÄÃû³ÆÊÇ£ºLinux-2.6.29.4-FriendlyARM.ºóÃæÄǸöFriendlyARMËÀ»îÈ¥²»µô¡£ºóÀ´Ö»ºÃ¿´´úÂë¡£
1¡¢2.6.29.4Õâ¸ö°æ±¾ºÅÊÇÊÇubootÔÚ×öuimageµÄʱºò¼ÓÉϵģ¬¿´arch/arm/boot/Makefile:
quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
-C none -a $(LOADADDR) -e $(LOADADDR) \
-n 'Linux-$(KERNELRELEASE)' -d $< $@
2¡¢¶Ô±È£¬¿É¼û2.6.29.4-FriendlyARM¾ÍÊÇ = $(KERNELRELEASE)£¬Òò´ËÎÒÃÇÐèÒªÕÒµ½$(KERNELRELEASE)Ôõô¶¨ÒåµÄ¡£
3¡¢ËÑË÷¿ÉÒÔÖªµÀ$(KERNELRELEASE)ÔÚinclude/config/kernel.release¶¨Ò壬µ«ÊǸÄÁËÒÔºóÖØÐÂmakeÓÖ»¹ÓÐFriendlyARM¡£
4¡¢¿´Äں˶¥²ãµÄmakefile£¬Ô¼872ÐÐÓÐ˵Ã÷£º
# Build the kernel release string
¡£¡£¡£
# $(localver-auto) (only if CONFIG_LOCALVERSION_AUTO is set)
# ./scripts/setlocalversion (SCM tag, if one exists)
# $(LOCALVERSION) (from make command line if provided)
×Ðϸ¶Ô±È£¬ÔÀ´Õâ¸öFriendlyARMÊÇ$(LOCALVERSION)£¡£¬ËÑË÷Ï£¬·¢ÏÖautoconf.hÓУ¬¹þ¹þ£¬Õâ¾ÍÊÇÄÚºËͼÐÎÅäÖóöÀ´µÄÂï
5¡¢ÂíÉÏmake menuconfig£¬ËÑË÷$(LOCALVERSION)£¬¹Ô¹Ô£¬ÔÀ´ÔÚGernel Setup¡£¡£¡££¬ÂíÉÏÈ¥µô£¬ÖØбàÒë¡£ÕâÏÂûÁË£¡
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
ת×Ô£ºhttp://roclinux.cn/?p=1288#more-1288
½ñÌìµÄÄÚÈÝÊÇLinuxµÄwcÃüÁÕâ¸öÃû×ֺܺüǣ¬ÒòΪʲô£¬ÄãÒ²ÖªµÀ¡£
Õâ¸öÃüÁîµÄ¹¦ÄÜÒ²ºÜºÃ¼Ç£¬ÒòΪËü¹¦ÄܺÜÓÐÏÞ£º
wc -c filename£ºÏÔʾһ¸öÎļþµÄ×Ö½ÚÊý
wc -m filename£ºÏÔʾһ¸öÎļþµÄ×Ö·ûÊý
wc -l filename£ºÏÔʾһ¸öÎļþµÄÐÐÊý
wc -L filename£ºÏÔʾһ¸öÎļþÖеÄ×î³ ......
ѧϰ±ðÈ˵ģ¬¼Ç¼×Ô¼ºµÄ¡£
1¡¢sysinfoÓ÷¨
#include <sys/sysinfo.h>
int sysinfo(struct sysinfo info);
¼Ç¼ÁËlinuxÖÐÆô¶¯Ê±¼ä¡¢ÄÚ´æÐÅÏ¢¡¢½»»»·ÖÇø¡¢cpu¸ºÔصÈÐÅÏ¢¡£
³É¹¦·µ»Ø0£¬Ê§°Ü·µ»Ø-1
struct sysinfo {
long uptime;   ......
ÔÚlinuxµÄprocÎļþϵͳÖУ¬Í¨¹ý²é¿´/proc/net/devÎļþ
¿ÉÒԵõ½Ã¿¸öÍøÂç½Ó¿ÚµÄÍÌÍÂÁ¿£¬µ«ÊÇÎÞ·¨»ñµÃʵʱ´ø¿í
×î½ü·¢ÏÖÁËÒ»ÖÖ»ùÓÚncurses¿âµÄС³ÌÐòbmon£¬¿ÉÒÔ»ñµÃʵʱ´ø¿í
Example:
Ö´ÐÐ
[root@debian ~]# bmon -o ascii -p eth0
Interface RX Rate RX # TX Rate TX #
eth0 0.00B 0.0 0.00B 0.0
eth0 0.00B 0.0 ......