[英]Linux kernel and my kernel module
我試圖將驅動程序作為Linux內核的一部分。 以下是Makefile。 rs_pci模塊取決於rs_9x。 但是,內核嘗試在構建rs_9x之前先構建rs_pci,這將導致rs_pci的編譯失敗。 我希望內核先編譯rs_9x,然后再編譯rs_pci。 我該怎么做?
以下是我的Makefile
rs_9x-y += rs_a.o
rs_9x-y += rs_b.o
rs_9x-y += rs_c.o
rs_pci-y += rs_pci.o rs_pci_ops.o
obj-$(CONFIG_RS) := rs_9x.o
obj-$(CONFIG_RS_PCI) := rs_pci.o
In the .config file, I have both options enabled as modules.
CONFIG_RS=m
CONFIG_RS_PCI=m
請幫幫我。
首先檢查:確保已啟用CONFIG_RS
第二次檢查:將rs_9x.o放在rs_pci.o的上方,如下所示:
obj-$(CONFIG_RS) += rs_9x.o
rs_pci-y += rs_pci.o rs_pci_ops.o
obj-$(CONFIG_RS_PCI) += rs_pci.o
也可以像上面一樣嘗試將“:”更改為“ +”,它將為您解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.