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

ǶÈëʽLinuxϵͳCGI³ÌÐòÉè¼Æ¼¼Êõ

ǶÈëʽLinuxϵͳCGI³ÌÐòÉè¼Æ¼¼Êõ
ÕªÒª£ºÔÚÏêϸ½éÉÜÒ»ÖÖǶÈëʽWeb·þÎñÆ÷BOAµÄʵÏÖÓëÅäÖ÷½·¨µÄ»ù´¡ÉÏ£¬ÒÔÒ»¸öWebÔÚÏßÔ¶³Ì¼à¿ØGPIO£¨Í¨ÓÃÊäÈë/Êä³ö£©µÄ³ÌÐòΪʵÀý£¬½éÉÜǶÈëʽLinuxϵͳÏÂCPU³ÌÐòÉè¼Æ¼¼Êõ¡£
   ¹Ø¼ü´Ê£ºÇ¶ÈëʽϵͳLinux BOA CGI GPIO
1 ¸ÅÊö
Ëæ×Å»¥ÁªÍøÓ¦ÓõÄÆÕ¼°£¬Ô½À´Ô½¶àµÄÐÅÏ¢»¯²úÆ·ÐèÒª½ÓÈ뻥ÁªÍøͨ¹ýWebÒ³Ãæ½øÐÐÔ¶³Ì·ÃÎÊ¡£Ç¶ÈëʽWebϵͳÌṩÁËÒ»ÖÖ¾­¼Ã¡¢ÊµÓõĻ¥ÁªÍøǶÈëʽ½ÓÈë·½°¸¡£ÕâÀï½áºÏÒ»ÖÖǶÈëʽWeb Server BOAÀ´½éÉÜǶÈëʽLinuxϵͳϵÄCGI³ÌÐòÉè¼Æ¼¼Êõ¡£
2 Web Server BOAµÄʵÏÖÓëÅäÖÃ
2.1 uClinuxÏ£¬Ö÷ÒªÓÐÈý¸öWeb Server:HTTPD¡¢THTTPDºÍBOA¡£HTTPDÊÇ×î¼òµ¥µÄÒ»¸öWeb Server,ËüµÄ¹¦ÄÜ×îÈõ£¬²»Ö§³ÖÈÏÖ¤£¬²»Ö§³ÖCGI¡£THTTPDºÍBOA¶¼Ö§³ÖÈÏÖ¤¡¢CGIµÈ£¬¹¦Äܶ¼±È½ÏÈ«¡£BOAÊÇÒ»¸öµ¥ÈÎÎñµÄСÐÍHTTP·þÎñÆ÷£¬Ô´´úÂ뿪·Å¡¢ÐÔÄÜÓÅÐ㣬ÌرðÊʺÏÓ¦ÓÃÔÚǶÈëʽϵͳÖС£Ä¿Ç°µÄuClinuxµÄ´úÂëÖÐÒѾ­°üº¬BOAµÄÔ´´úÂë¡£ÔÚuClinuxÏÂʵÏÖBOA£¬Ö»ÐèÒª¶ÔBOA×öһЩÅäÖúÍÐ޸ġ£ÒÔÏÂÊÇÅäÖõĹý³Ì¡£
£¨1£©±àÒëBOAµ½ÄÚºË
Ê×ÏÈ£¬ÐèÒª°ÑBOA±àÒëµ½Äںˣ¬¼´Ö´ÐÐmake menuconfig£¬ÔÚÓ¦ÓóÌÐòÑ¡µ¥ÖÐnetwork applicationÏîÏÂÃæÑ¡Ôñboa¡£¸Ã²Ù×÷ÐèÒªÖØбàÒëÄںˡ£
£¨2£©±àÖÆÅäÖÃÎļþboa.conf
ÔÚLinux²Ù×÷ϵͳÏ£¬Ó¦ÓóÌÐòµÄÅäÖö¼ÊÇÒÔÅäÖÃÎļþµÄÐÎʽÌṩµÄ£¬Ò»°ã¶¼ÊÇ·ÅÔÚÄ¿±ê°å/etc/Ŀ¼Ï»òÕß/etc/configĿ¼Ï¡£µ«boaµÄÅäÖÃÎļþboa.contÒ»°ã¶¼ÐýתÔÚÄ¿±ê°å/home/httpd/Ŀ¼Ï¡£
ÀýÈ磬һ¸öµäÐ͵Äboa.confÎļþ¸ñʽÈçÏ£º
ServerName Samsung-ARM
DocumentRoot/home/httpd
ScriptAlias/cgi-bin/home/httpd/cgi-bin/
ScriptAlias/index.html/home/httpd/index.html
ËüÖ¸¶¨ÁËHTMLÒ³Ãæ±ØÐë·Åµ½/home/httpdĿ¼Ï£¬cgiÍⲿÀ©Õ¹³ÌÐò±ØÐë·Åµ½/home/httpd/cgi-binĿ¼Ï¡£
£¨3£©±àÒëÉÕдÄÚºË
ÖØбàÒëÄں˺ó£¬Í¨¹ýÉÕд¹¤¾ßÉÕдÄںˣ¬¾Í¿ÉÒÔÔÚPCÉÏͨ¹ýIEä¯ÀÀÆ÷·ÃÎÊ¿ª·¢°åÉϵÄWeb Server¡£ÀýÈ磬ÊäÈ뿪·¢°åµÄIPµØÖ·http://192.168.0.101£¬¼´¿É·ÃÎʵ½×Ô¼º×öµÄÍøÒ³index.htmlÁË¡£²¢ÇÒ£¬Í¨¹ý±àдCGIÍⲿÀ©Õ¹³ÌÐò£¬¿ÉÒÔʵÏÖ¶¯Ì¬Web¼¼Êõ£¬ÏÂÃ潫Ïêϸ½éÉÜ¡£
2£®2 ¾ßÓÐMMUƽ̨µÄLinuxÏÂB0AµÄʵÏÖÓëÅäÖÃ
¶ÔÓÚÓÐMMU£¨ÄÚ´æ¹ÜÀíµ¥Ôª£©µÄƽ̨£¬ÈçarmlinuxºÍppclinux£¬¿ÉÒÔµ½ÍøÉÏÏÂÔØÒ»¸öÖ÷Á÷°æ±¾µÄboa·¢Ðаü¡£ÒòΪÊÇÔËÐÐÔÚÄ¿±êϵͳ£¬ËùÒÔÒªÓý»²æ±àÒ빤¾ß±àÒ룬¼´ÐèÒªÐÞ¸Äboa/src/MakefileÀïÃæµÄ±àÒëÆ÷¡£ÀýÈ磺
CC=/LinuxPPC/CDK/bin/powerpc-lin


Ïà¹ØÎĵµ£º

LinuxϵͳϵĶàÏ̱߳à³ÌÈëÃÅ


LinuxϵͳϵĶàÏ̱߳à³ÌÈëÃÅ
2006-01-17 09:13×÷Õߣºpcstudy³ö´¦£ºblogchinaÔðÈα༭£º·½ÖÛ
    Ïà¹ØרÌ⣺ LinuxÉ豸Çý¶¯³ÌÐò¿ª·¢ÈëÃÅ
¡¡¡¡ÒýÑÔ
¡¡¡¡Ị̈߳¨thread£©¼¼ÊõÔçÔÚ60Äê´ú¾Í±»Ìá³ö£¬µ«ÕæÕýÓ¦ÓöàÏ̵߳½²Ù×÷ϵͳÖÐÈ¥£¬ÊÇÔÚ80Äê´úÖÐÆÚ£¬solarisÊÇÕâ·½ÃæµÄٮٮÕß¡£´«Í³µÄUnixÒ²Ö§³ÖÏ̵߳ĸÅÄî ......

linux api±Ê¼Ç£¨3£©£ºỊ̈߳¨Ò»£©

±¾ÎÄÖн«½²Êölinux»·¾³±à³ÌÖÐÏ̵߳ÄʹÓᣲ»Ëµ·Ï»°Ö±½ÓÉÏ´úÂ룺
#include <pthread.h>
#include <assert.h>
struct ThreadData
{
int i;
};
void * ThreadProc(void* arg)
{
ThreadData* data = static_cast<ThreadData*>(arg);
//do something

pthread_exit(data);
}
int main() ......

¹ØÓÚlinuxµÄÊØ»¤½ø³Ì

Linux·þÎñÆ÷ÔÚÆô¶¯Ê±ÐèÒªÆô¶¯ºÜ¶àϵͳ·þÎñ£¬ËüÃÇÏò±¾µØºÍÍøÂçÓû§ÌṩÁËLinuxµÄϵͳ¹¦Äܽӿڣ¬Ö±½ÓÃæÏòÓ¦ÓóÌÐòºÍÓû§¡£ÌṩÕâЩ·þÎñµÄ³ÌÐòÊÇÓÉÔËÐÐÔÚºǫ́µÄÊØ»¤½ø³Ì£¨daemons£©À´Ö´Ðеġ£ÊØ»¤½ø³ÌÊÇÉú´æÆÚ³¤µÄÒ»ÖÖ½ø³Ì¡£ËüÃǶÀÁ¢ÓÚ¿ØÖÆÖն˲¢ÇÒÖÜÆÚÐÔµÄÖ´ÐÐijÖÖÈÎÎñ»òµÈ´ý´¦ÀíijЩ·¢ÉúµÄʼþ¡£ËûÃdz£³£ÔÚϵͳÒýµ¼×°ÈëʱÆô¶ ......

linux °²×°Kmplayer²¥·ÅÆ÷


°²×°Kmplayer²¥·ÅÆ÷
£¨×÷Õß/l4nneret£©ÎªÁËÄÜÔÚ Linux ÏÂÒ²Äܲ¥·Å¶àýÌåÎļþ£¬ÓÚÊÇ°²×°¾Ý³ÆºÜÇ¿º·µÄ Kmplayer ²¥·ÅÆ÷¡£¹ý³ÌÈçÏ£ºÔÚ http://www.mplayerhq.hu/MPlayer/ ÕâÀï¿´µ½ Kmplayer µÄÖ÷³ÌÐòÒѾ­¸üе½ÁË 1.0rc2 °æ¡£
ÏÂÔØÖ÷³ÌÐò£ºMPlayer-1.0rc2.tar.bz2
Á½¸ö½âÂë°ü£ºall-20071007.tar.bz2 ºÍ windows-all-2007 ......

linux api±Ê¼Ç£¨5£©£ºỊ̈߳¨Èý£©

ÕâÀï¼ÌÐøÉÏһƪ¹ØÓÚÏ̺߳¯ÊýµÄ½éÉÜ£º
int pthread_detach (pthread_t thread_handle);
 
Õâ¸öº¯ÊýµÄ×÷ÓÃÊÇÈÃthread_handleÖ¸ÏòµÄÄ¿±êÏß³ÌÔÚÖÐÖ¹µÄʱºòÇåÀí×Ô¼ºÓµÓеÄÊý¾Ý¡£ÔÚÕâ¸öº¯Êýµ÷ÓÃÖ®ºó£¬
²»ÄÜÔÙ¶Ôthread_handleʹÓÃpthread_join¡£
ÏÔ¶øÒ×¼ûµÄÊÇ£¬Èç¹ûÎÒÃÇûÓжÔд´½¨µÄÏ̵߳÷ÓÃpthread_detach£¬Õâ¸öÏß ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ