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

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.
主站蜘蛛池模板: 涡阳县| 克山县| 邳州市| 伊宁县| 大新县| 温泉县| 金寨县| 英山县| 阜城县| 泽普县| 航空| 遵义县| 沁水县| 平武县| 永年县| 扎鲁特旗| 酒泉市| 维西| 凉城县| 开江县| 闻喜县| 兴安县| 昭觉县| 莱州市| 凤台县| 开原市| 新营市| 囊谦县| 日喀则市| 桐梓县| 新昌县| 清河县| 剑川县| 石首市| 鄂伦春自治旗| 贡觉县| 正阳县| 金坛市| 合作市| 平原县| 鲜城|