官术网_书友最值得收藏!

Getting ready

To realize our first char driver, we need the module presented in the previous chapter. This is because using kernel modules is the simplest method we have to inject code into kernel space. Of course, we can decide to compile our driver as built in to the kernel but, in this manner, we have to fully recompile the kernel and reboot our system each time we have to modify the code (it's a possibility but definitely not the best!).

Just a note before carrying on: to provide a clearer explanation regarding how a char driver works and to present a really simple example, I decided to use the legacy way to register a char driver into the kernel.  There's nothing to be concerned about, since this mode of operation is perfectly legal and still supported and, in any case, in the Using a device tree to describe a character driver recipe, in  Chapter 4, Using the Device Tre e , I'm going to present the currently advised way of registering char drivers.
主站蜘蛛池模板: 额尔古纳市| 余江县| 樟树市| 广宗县| 武功县| 渝北区| 景德镇市| 台州市| 泽普县| 钟祥市| 龙陵县| 应城市| 织金县| 集安市| 甘孜| 德兴市| 三河市| 陵川县| 景泰县| 靖远县| 隆安县| 突泉县| 临澧县| 简阳市| 夹江县| 临桂县| 宜君县| 榆树市| 闵行区| 平度市| 渝中区| 华阴市| 大埔区| 嘉兴市| 大丰市| 常熟市| 绥滨县| 长岭县| 石楼县| 静海县| 镇江市|