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

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.
主站蜘蛛池模板: 深圳市| 潼关县| 溧阳市| 怀宁县| 汤原县| 萍乡市| 疏附县| 常州市| 宝应县| 娄底市| 信宜市| 清镇市| 明星| 凤山市| 凌海市| 柳林县| 农安县| 花莲县| 江津市| 莎车县| 崇明县| 临武县| 会泽县| 衢州市| 特克斯县| 灵武市| 靖宇县| 福清市| 南雄市| 萍乡市| 岫岩| 渭南市| 富平县| 马鞍山市| 武平县| 甘泉县| 饶河县| 剑阁县| 麻栗坡县| 鄄城县| 囊谦县|