Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux c and asm ͬʱʹÓÃ

from: ¡¶×Ô¼º¶¯ÊÖд²Ù×÷ϵͳ¡·
1. ÖжÏÏòÁ¿±í ²é¿´ linux/init/main.c in http://lxr.linux.no/#linux+v2.6.32/init/main.c
2.
; [root@XXX XXX]# nasm -f elf foo.asm -o foo.o
; [root@XXX XXX]# gcc -c bar.c -o bar.o
; [root@XXX XXX]# ld -s foo.o bar.o -o foobar
; [root@XXX XXX]# ./foobar
; the 2nd one
; [root@XXX XXX]#
µ«ÊÇÎÒµÄcygwinϱ¨´í£º
$ ld -s foo.o bar.o -o foo
foo.o: In function `start':
foo.asm:(.text+0xb): undefined reference to `choose'
bar.o:bar.c:(.text+0x1e): undefined reference to `myprint'
bar.o:bar.c:(.text+0x34): undefined reference to `myprint'
3. cygwin ÖÐÎÄÂÒÂë £¨http://blog.sina.com.cn/s/blog_3ee207aa010008ml.html £©
Ö±½ÓÖ´ÐÐ
alias ls='ls --color --show-control-chars
--time-style=long-iso'
»òÕß°ÑÉÏÃæµÄÄÚÈݼӵ½/etc/profileÖÐÖØÆôCygwin¼´¿É¡£
ΪÁËʹʹÓøü·½±ã£¬ÍƼöÔö¼ÓÈçÏÂÅäÖÃÐÅÏ¢£º
1. ±à¼­Óû§homeĿ¼ÏµÄÎļþ.inputc£¬È¥³ýÒÔϼ¸ÐеÄ×¢ÊÍ£º
set meta-flag on
# ¹Ø±ÕbashÃüÁîÐÐ8×Ö½Ú×Ö·ûתÒå·ûµÄת»»
set convert-meta off
# ʹbashÃüÁîÐÐÖ§³Ö8×Ö½Ú×Ö·ûÊä³ö
set output-meta on
set input-meta on
2
±à¼­Óû§homeĿ¼ÏµÄÎļþ.bash_profile£¬ÔÚÎļþĩβ¼ÓÉÏÏÂÃæ¼¸ÐУº
alias ls='ls --color --show-control-chars
--time-style=long-iso'
export LC_ALL=zh_CN.GB23122
export LC_CTYPE=zh_CN.GB2312
export LANG=zh_CN.GB2312
export XMODIFIERS="@im=Chinput"3
stty cs8 -istrip
stty pass8
# Update: ÉÙÁËÕâ¸öless¾Í²»Ö§³ÖÖÐÎÄÁË
export LESSCHARSET=latin1


Ïà¹ØÎĵµ£º

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâÆª·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´Ë×ªÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨ÕâÆª²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

Linux ÖÐÎÄÂÒÂë½â¾ö

ÐÞ¸Ä linux ϵͳ/ect/profile Îļþ
ÔÚ×îºóÃæ¼Ó
export LC_ALL="zh_CN.GB18030"
ÐÞ¸Ä /etc/sysconfig/i18nÎļþ
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"
SYSFONTACM="iso01"
ÕâÑù¾Í¿ÉÒÔ½â¾ölinuxÏÂÖÐÎÄ ......

LINUXϹØÓÚCPUÐÅÏ¢»ñÈ¡

1. TOP    ÃüÁî È»ºó°´“1”£¬¿ÉÒԲ鿴CPUÓжàÉÙ¸öºË¡£
2. less /proc/cpuinof ¿ÉÒԲ鿴 CPUÄں˸öÊý¼°¸ü¶àÄÚºËÐÅÏ¢¡£
3.dmesg |grep CPU ¿ÉÒÔºËʵCPUÄں˸öÊýÇÒ»ùÓÚ¶àÉÙ¸öÎïÀíCPU¼°ÏêϸÐÅÏ¢¡£
4.dmidecode |grep "CPU"  ¿ÉÒÔºËʵ¶àÉÙ¸öÎïÀíCPU¡£
ÁíÍâ  grep '' * ÓÐÃîÓ㬿ÉÒԲ鿴 ......

linuxϵͳµÄld.so.confÎļþ

½ñÌìÖØÐ±àÒëÒÔǰµÄÒ»¸ö³ÌÐò£¬ÀïÃæÓõ½iconv¿â£ºgcc test.cc -liconv
ÔËÐÐʱ£ºa.out:error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
ÒÔǰ±àÒëÔËÐÐÊÇ¿ÉÒԵģ¬¿ÉÄÜÊDz»¾ÃǰÉý¼¶ÁËiconv¿âÓ°Ïì¡£ÔÚ/usr/local/libÏ¿ÉÒÔÕÒµ½libiconv.so.2£¬°Ñ/usr/local/l ......

C/C++±à³ÌGUI¿â±È½Ï

×îÇ¿µÄGUI¿âµ±ÊôQt£¬±Ï¾¹ÊÇÉÌÒµ»¯µÄ¶«Î÷£¬¹¦ÄÜ×îÍêÕû£¬Ê²Ã´¶¼ºÃ£¬°üÀ¨ÀàËÆjava´úÂë·ç¸ñ£¬Á¼ºÃµÄ¿ò¼ÜÉè¼Æ£¬µ«Óм¸µãÖµµÄÒ»Ì᣺
     1.ËüûÓÐʹÓÃSTL£¬¶øÊÇ×Ô¼ºÊµÏÖÁËÒ»Ì×Ìæ´ú·½°¸QTL£»
     2.ʼþÄ£ÐÍʹÓÃ×Ô´´µÄsignal/slot»úÖÆ£¬ËùÒÔÐèÒªmoc.exeÀ´Ô¤´¦ÀíÍ·Îļþ£»
  &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ