5th Android porting and driving
By studying this chapterAndroidTransplant and drive, yes.Androidporting and driving relationships. Where the device driver includes the kernel driver and the user space driver. Linuxsystem equipment is divided into3class: Character devices, block devices, and network devices. In addition to network devices, character devices and block devices are mapped toLinuxFile system files and directories, system call interfaces via file systemOpen(),Write (),Read(),Close() and other functions to access character devices and block devices. AndroidThe structure and standard of the kernelLinux2.6The kernel is basically the same,Androidon the basis of which private content was added. AndroidThe dedicated driver is notLinuxstandard driver, which is the function of auxiliary system operation, generally do not operate the actual hardware. Androidof theLoggerdrivers are provided for user-level programsLogsupport for this drive as a tool to use. AndroidThe main equipment used in theFramebufferdrive, input device driver,v412Webcam-video-driven,OSSAudio driver,ALSAAudio driver,MTDdriver, Bluetooth driver,WlanDrive. Androiddriven byHellowordinstance. First oneIFEP($ (kernelrelease,)is not useful at present, its origin refers to theLinuxunder the source root directoryMakefilewhen compiling the kernel,Kernelreleasemacros are defined, so if you start from the source root directory Makeit will bemyhello.othe module is compiled into the kernel. The experimental steps are (1) The folderExl-hello-worldcopied toLinuxin the Environment (2)#cd/home/linux/test/exl-hello-world (3) #make (4)throughInmodcommand to add modules to the kernel:#insmod insmod Hello.ko. (5) byLsmodTo view the kernel modules:#lsmod |grep Hello (6)throughRmmodto delete a module in the kernel:#rmmodhello.
5th Android Porting and driving