Kernel module probe function is never called
Clash Royale CLAN TAG#URR8PPP
Kernel module probe function is never called
I try to load a sample device tree driver, but the probe function is never called.
The entry in dts file looks like this
dummy1
compatible = "ti,dummy";
reg = <0x9f200000 0x1000>,
<0x9f201000 0x8>;
;
And the relevant driver code is:
#define DRV_NAME "dummy"
static const struct of_device_id dummy_of_match =
.compatible = "ti,dummy",
,
,
;
static struct platform_driver dummy_driver =
.driver =
.name = DRV_NAME,
.of_match_table = dummy_of_match,
,
.probe = dummy_probe,
.remove = dummy_remove,
;
MODULE_DEVICE_TABLE(of, dummy_of_match);
module_platform_driver(dummy_driver);
I have recompiled the dtb file (dtdiff shows it contains my device) and have copied it to target, but nothing happens when I insmod the driver.
I also can't find it in /sys/firmware/devicetree/
@yashC I run kernel on beaglebone black which is connected via serial to the host machine. The system boots using Busybox/NFS. By copying to target I mean copying recompiled am335x-boneblack.dtb to the /boot folder on the NFS.
– Bord81
Aug 9 at 9:28
as it is not present in
devicetree/
to start with we can assume that it has something to do with kernel not parsing it. you can try a few things. 1. Explicitly give status=okay
2. if this node is defined as child node of some other node check if that node is disable or so (place it under soc node if it already is not).– yashC
Aug 9 at 11:53
devicetree/
status=okay
@yashC I did it but without slightest change. What's more - the DT successfully loads even with the dtb file removed from NFS! Could it be baked into zImage?
– Bord81
Aug 9 at 14:36
it is is possible that it might be the case. You can try removing the zimage file and adding new kernel image file. it should work then.
– yashC
Aug 9 at 15:01
1 Answer
1
Trying to solve the issue, I even removed the dtb file...and magically the kernel continued to boot as if nothing happened. I thought dtb could be baked into zImage which is possible with some additional tweaking, but that wasn't the case.
Solution:
Finally, I found out that the uboot was also checking the ./boot directory on the emmc card first! Removing the dtb from there immediately made the file on the NFS 'visible'.
P.S.: If you run into similar issues try to read the outputs carefully. I began to to understand the issue when I saw the .dtb load error when I removed it on NFS, but after that a message appeared that it was successfully loaded to the memory.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
what do you mean by copied to target ?
– yashC
Aug 9 at 5:58