Jump to content

How to build mcp251x module for cubieboard2


EugeneCh

Recommended Posts

Hello.  I want to add some changes in mcp251x.c and rebuild it.  I've installed linux-headers via armbian-config.  During build process i got this error:

 

/m_mcp251x.c:1042:8: error: implicit declaration of function ‘devm_clk_get_optional’ [-Werror=implicit-function-declaration]
  clk = devm_clk_get_optional(&spi->dev, NULL);
        ^~~~~~~~~~~~~~~~~~~~~

 

if i comment this line it passes compile process but when i do insmod i get these kernel debug messages:

 

[  583.741089] m_mcp251x: loading out-of-tree module taints kernel.
[  583.741626] m_mcp251x: Unknown symbol can_free_echo_skb (err -2)
[  583.741673] m_mcp251x: Unknown symbol can_put_echo_skb (err -2)
[  583.741707] m_mcp251x: Unknown symbol can_get_echo_skb (err -2)
[  583.741800] m_mcp251x: Unknown symbol open_candev (err -2)
[  583.741874] m_mcp251x: Unknown symbol alloc_can_skb (err -2)
[  583.741921] m_mcp251x: Unknown symbol unregister_candev (err -2)
[  583.741963] m_mcp251x: Unknown symbol can_change_mtu (err -2)
[  583.742005] m_mcp251x: Unknown symbol free_candev (err -2)
[  583.742042] m_mcp251x: Unknown symbol alloc_candev_mqs (err -2)
[  583.742105] m_mcp251x: Unknown symbol close_candev (err -2)
[  583.742327] m_mcp251x: Unknown symbol can_bus_off (err -2)
[  583.742409] m_mcp251x: Unknown symbol alloc_can_err_skb (err -2)
[  583.742464] m_mcp251x: Unknown symbol register_candev (err -2)

 

So what i should do to build this module properly?  (Linux cubieboard2 4.19.62-sunxi #5.92 SMP Wed Jul 31 22:07:23 CEST 2019 armv7l GNU/Linux)

Edited by EugeneCh
Link to comment
Share on other sites

Successfully  updated to 5.3.9. But armbian-config still installs old header files 4.19.  Got https://apt.armbian.com/pool/main/l/linux-5.3.9-sunxi/linux-headers-current-sunxi_19.11.3_armhf.deb it now builds without errors but

 

 sudo insmod mcp251x.ko
insmod: ERROR: could not insert module mcp251x.ko: Unknown symbol in module

 

dmesg:

[  599.227996] mcp251x: loading out-of-tree module taints kernel.
[  599.228363] mcp251x: Unknown symbol can_free_echo_skb (err -2)
[  599.228389] mcp251x: Unknown symbol can_put_echo_skb (err -2)
[  599.228408] mcp251x: Unknown symbol can_get_echo_skb (err -2)
[  599.228467] mcp251x: Unknown symbol open_candev (err -2)
[  599.228515] mcp251x: Unknown symbol alloc_can_skb (err -2)
[  599.228541] mcp251x: Unknown symbol unregister_candev (err -2)
[  599.228559] mcp251x: Unknown symbol can_change_mtu (err -2)
[  599.228587] mcp251x: Unknown symbol free_candev (err -2)
[  599.228607] mcp251x: Unknown symbol alloc_candev_mqs (err -2)
[  599.228649] mcp251x: Unknown symbol close_candev (err -2)
[  599.228669] mcp251x: Unknown symbol can_bus_off (err -2)
[  599.228709] mcp251x: Unknown symbol alloc_can_err_skb (err -2)
[  599.228737] mcp251x: Unknown symbol register_candev (err -2)
[  608.071945] mcp251x: Unknown symbol can_free_echo_skb (err -2)
[  608.071978] mcp251x: Unknown symbol can_put_echo_skb (err -2)
[  608.071997] mcp251x: Unknown symbol can_get_echo_skb (err -2)
[  608.072055] mcp251x: Unknown symbol open_candev (err -2)
[  608.072103] mcp251x: Unknown symbol alloc_can_skb (err -2)
[  608.072130] mcp251x: Unknown symbol unregister_candev (err -2)
[  608.072147] mcp251x: Unknown symbol can_change_mtu (err -2)
[  608.072176] mcp251x: Unknown symbol free_candev (err -2)
[  608.072195] mcp251x: Unknown symbol alloc_candev_mqs (err -2)
[  608.072238] mcp251x: Unknown symbol close_candev (err -2)
[  608.072259] mcp251x: Unknown symbol can_bus_off (err -2)
[  608.072300] mcp251x: Unknown symbol alloc_can_err_skb (err -2)
[  608.072328] mcp251x: Unknown symbol register_candev (err -2)

 

What am i doing wrong?
 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines