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

Compile Linux Kernel Modules

ÎÒÕýÔÚѧϰдlinux device driver for embedded system.
ÎÒÓÐÒ»¸ölinuxǶÈëʽÉ豸£¬Ò²ÓÐÕâ¸öÉ豸µÄlinuxÔ´´úÂë¡£Ò²ÓÐcross compiler tool chain.
µÚÒ»²½£¬¾ÍÊÇдһ¸ö¼òµ¥µÄhelloÄ£¿é£¬È»ºó×°µ½É豸ÖС£ÒÔÑéÖ¤ÎÒÕâ¸ö¿ª·¢»·¾³¡£
ÔÚÍøÉÏËÑË÷ÁËһϣ¬ how to cross compile linux device driver
·¢ÏÖÔÚlinux´úÂë¸ùĿ¼µÄMakefileÖÐÓйØÓÚcross compileµÄÃèÊö
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
#
# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:
# make ARCH=ia64
# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.
# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
Ö»ÒªÖ¸¶¨ARCHºÍCROSS_COMPILE¾Í¿ÉÒÔÁË¡£
ÔÚÎÒµÄÕâ¸öMakefileÖУ¬ÒѾ­Ö¸¶¨ÁËARCH=arm£¬CROSS_COMPILE=arm-linux-
ÒòΪÔÚ±àÒëmoduleµÄʱºò£¬Ê¹ÓõÄÊÇÄں˹¹Ôìϵͳ£¬Ò²¾ÍÊÇʹÓõÄÉÏÃæËù˵µÄÕâ¸öÔÚÄÚºËÔ´Âë¸ùĿ¼µÄMakefile¡£ËùÒÔÎҾͲ»ÐèÒªÔÚÎÒµ÷ÓÃmakeµÄÃüÁîÐÐÖÐÖ¸¶¨ARCHºÍCROSS_COMPILEÁË¡£
ÓÃÀ´²âÊÔµÄhelloÄ£¿éµÄÔ´ÂëÀ´×Ô http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html
hello.c
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
static int __init hello_start(void)
{
printk(KERN_INFO "Loading hello module...\n");
printk(KERN_INFO "Hello world\n");
return 0;
}
static void


Ïà¹ØÎĵµ£º

linux socket±à³ÌÏà¹ØÖªÊ¶µÄ×ܽá

1£ºsocket±à³ÌÖвÉÓõÄЭÒé×åÖ÷ÒªÓÐÁ½ÖÖ
£º
   1>£ºÍøÂçЭÒé×å(ÐÎʽÈ磺AF_INET, PF_INETµÈ)
   2>£º±¾µØunixÓò¸ñʽµÄЭÒé×å(ÐÎʽÈ磺AF_LOCAL, AF_UNIXµÈ)
   ×¢£ºÐ­Òé×åµÄÑ¡ÔñÌåÏÖÔÚ  int  socket(int domain, inst type, int protocol)º¯ÊýµÄµÚÒ»¸ö²ÎÊý´¦¡£
2£ºÕâÁ½ ......

ÐéÄâ»úÏÂlinuxÉÏÍø

Ô­Àí£ºÊ¹ÓÃWindowsϵÄÁ¬½Ó×÷ÎªÍø¹Ø¡£Linux×÷Ϊһ¸öÐéÄâµÄ¿Í»§¶Ëͨ¹ýÕâ¸öWindowsϵÄÁ¬½ÓÁ¬ÉÏÍø¡£ 1¡¢ÉèÖÃWindowsϵı¾µØÁ¬½Ó´ðÓ¦VMwareµÄÐéÄâÍø¿¨À´¹²ÏíÉÏÍø¡£(ºÜÖØÒª£¡) 2¡¢ÉèÖÃWindowsϵÄVMware²úÉúµÄÐéÄâÍø¿¨1¡£½«ÆäIPÉèÖÃΪ192.168.0.1¡£×ÓÍøÑÚÂëΪ255.255.255.0¡£ 3¡¢ÉèÖÃVMwareµÄÍø¿¨ÎªHost-only 4¡¢Æô¶¯L ......

LinuxµÄÏ̗߳—Çá½ø³Ì

½ø³ÌÀàËÆÓÚÈËÉú£ºËüÃDZ»²úÉú£¬Óлò¶à»òÉÙÓÐЧµÄÉúÃü£¬¿ÉÒÔ²úÉúÒ»¸ö»ò¶à¸ö×Ó½ø³Ì£¬×îÖÕ¶¼ÒªËÀÍö¡£Ò»¸ö΢СµÄ²îÒìÊǽø³ÌÖ®¼äûÓÐÐÔ±ð²îÒ엗ÿ¸ö½ø³Ì¶¼Ö»ÓÐÒ»¸ö¸¸Çס£ÄÇô£¬²Ù×÷ϵͳÓÐÒ»¸öÖØÒªµÄ¸ÅÄî——Ị̈߳¬ÔÚLinuxÉÏÊÇÔõôʵÏÖµÄÄØ£¿¿ÉÒÔÃ÷È·µÄ¸æËßÄ㣬Linux²¢Ã»ÓÐÏß³ÌÕâ¸ö¸ÅÄî¡£ºÇºÇ£¬ÊDz»ÊÇLinuxº ......

Ìí¼Ó¿ª»úlogo£¨amlogic open linux£© ѧϰ±Ê¼Ç

1¡¢ÐÞ¸ÄkernelÅäÖã¨linux os£©
ÔÚlinuxÏ£¬ÖÕ¶Ë---½øÈë±àÒëĿ¼£¬Ö´ÐÐmake k.menuconfig£¬
ÔÚµ¯³öµÄÅäÖô°¿ÚÀïÑ¡ÔñDevice Drivers-----Amlogic Devices Driver-----Amlogic Display Driver-----setup logoºÍlogo on osd0
2¡¢Í¼Æ¬×ª»»£¨windows os£©
   a¡¢´ò¿ªBitmapDataGet.exe¹¤¾ß£¬Ñ¡Ôñ32λ¡£
b¡¢Ñ¡Ôñ¼Ó ......

linuxÉÏʹÓÃrlwrap ½â¾öoracle¿ÉÒÔÉÏϼü²é¿´ÃüÁî

linux ÉϵÄoracle sqlplus ²»ÄÜÀûÓà ÉÏ, Ï ¼üÀ´²é¿´ÃüÁËÑË÷µ½½â¾öÎÊÌâµÄ°ì·¨£¬ÕûÀíÈçÏÂ
°²×°Èí¼þrlwrap¿ÉÒÔ½â¾öÕâ¸öÎÊÌ⣬¸ÃÈí¼þÊÇÓÃcдµÄ³ÌÐò
¹Ù·½ÏÂÔØµØÖ·£ºhttp://utopia.knoware.nl/~hlub/uck/rlwrap/
°²×°¹ý³Ì£º
ÎÒÃÇÒ²¿ÉÒԲ鿴½âѹºóµÄtar°ü£¬²é¿´README°ïÖúÎļþ
shell>tar -zxvf rlwrap-0.36.tar.gz
sh ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ