01 2014 档案
摘要:其实在去年8月份我做系统移植时就构建好了一个可以用的根文件系统,但是那时是跟着别人的《Linux全线移植文档》做的。有些东西我也不清楚,只是跟着做,做出来能用就了事了,没有深究其中的规范,以及文件系统中哪些要,哪些不要。趁着今年过年的几天假期,我移植重新移植了U-Boot1.3.1和Linux2.6.24到S3C2410及S3C2440后,我想好好的看看有 关文件系统构建方法和规范,整理整理构建根文件系统的文档。之后,我用了近一周的时间,慢慢研究《构建嵌入式Linux系统》这本书有关根文件系统的部 分,以及一些网上的参考资料,不断地实验。构建好了一个精简的根文件系统,下面我只介绍构建的过程和方
阅读全文
摘要:driver.c:#include #include #include #include #include #include #define DRIVER_NAME "my_dev"static int my_probe(struct device *dev){ printk("driver found device !!\n"); return 0;}static int my_remove(struct device *dev){ printk("driver found device unpluged !!\n"); retur
阅读全文
摘要:int platform_driver_register(struct platform_driver *drv){ drv->driver.bus = &platform_bus_type;/*关联总线*/ /*关联driver的设备方法*/ if (drv->probe) drv->driver.probe = platform_drv_probe; if (drv->remove) drv->driver.remove = platform_drv_remove; if (drv->shutdown) drv->dr...
阅读全文