Jump to content

can4linux on cubie2 ?


Bino Oetomo

Recommended Posts

dear All.

I need CAN-BUS on my cubie2.
I Found that I can reach it via PH20-PH21 Mux-4 and fortunately they are maped to extention port.
So I made FEX modification like :
 

[can_para]
can_used = 1
can_tx = port:PH20<4><default><default><default>
can_rx = port:PH21<4><default><default><default>


Currently my board run with --> 3.4.107-cubietruck

I found a banananian guy post ( http://www.lemaker.org/thread-13107-1-1.html ) a tutorial on how he make it for his BananaPI board.

I tried to follow his step, but skip steps about uImage and firmware .. since I don't know how to adapt it to Armbian.

when the proses complete, reboot ... I got /dev/can0 as expected
but dmesg say alot of error about can4linux.
I post error messages on pastebin --> http://pastebin.com/qp5Gnvj7

Kindly please give me any enlightenment to fix the problem.

Sincerely
-bino-

Link to comment
Share on other sites

It doesn't work for me either.

 

All I did was:

svn checkout https://svn.code.sf.net/p/can4linux/code/trunk can4linux-code
cd /root/can4linux-code/can4linux/
make TARGET=BANANAPI
insmod can4linux.ko

I guess it's kernel related. Perhaps there is a conflict with some module, try without all ... kernel source is also not exactly the same as on Bananian. I'll try later on Banana.

 

What you can try is to grab my build script.

 

Change kernel source https://github.com/igorpecovnik/lib/blob/second/configuration.sh#L28 for this one: https://github.com/linux-sunxi/linux-sunxi It's maintained a bit more conservatively.

 

... and build a kernel on your desktop PC. Change KERNEL_ONY to "yes" before. Install all deb files and try again.

Link to comment
Share on other sites

It's working on Banana PI so you need to play with the config. I haven't touch the fex file yet ... compile / load. No errors, latest Banana PI Jessie Armbian.

[  871.156213] can4linux: ISA-Allwinner A20 CANCAN Driver 4.4_BANANAPI SVN version 504 (c) Sep 11 2015 10:11:17
[  871.163995] can4linux:  H.J. Oertel (oe@port.de)
[  871.166814] can4linux:  MAX_CHANNELS 1
[  871.169556] can4linux:  CAN_MAX_OPEN 4
Link to comment
Share on other sites

Wow !!!
A very fast response .. I really appreciate it

 

It's working on Banana PI so you need to play with the config. I haven't touch the fex file yet ... compile / load. No errors, latest Banana PI Jessie Armbian.

 

I'm not good in 'playing with the config'.
Do you mean '.config' ?
If So ... I'll take dumb stupid workaround.
I'll try to compile 'kernel only' for both ... and try to compare both '.config' generated by the process ...

Sincerely
-bino-
 

Link to comment
Share on other sites

I can take a look but that won't be this fast :) I think you need to alter can configuration prior to compile ...there is no much difference between Cubietruck and Banana, software and hardware wise.

 

Wrote on mobile phone

Link to comment
Share on other sites

dear Sir

I can take a look but that won't be this fast :) I think you need to alter can configuration prior to compile ...there is no much difference between Cubietruck and Banana, software and hardware wise.

Wrote on mobile phone

I read your response 2 days ago ... but I didn't response back ... I just don't want to push you make another response while in weekend.

Now , I'm preparing new clean VM box just to do all this build thing.

I'll back as soon as some new progress appear.

Sincerely
-bino-

Link to comment
Share on other sites

OK. Just a note. You don't need to recompile kernel to get this working. All of my kernel images are prepared with headers and I also successfully compiled driver directly on Banana. From this I conclude it must work on Cubie too.

Link to comment
Share on other sites

OK. Just a note. You don't need to recompile kernel to get this working. All of my kernel images are prepared with headers and I also successfully compiled driver directly on Banana. From this I conclude it must work on Cubie too.

100% right.

 

The last Legacy-kernel Image (i use Jesse) is working greate as expected.

 

Currently I use PH20/PH21 to MUX4 , while by default they're connected to mux1 for status leds.

 

Hmmm ... its time to trace the board and cut the line.

 

I really appreciate your help.

 

Sincerely

-bino-

Link to comment
Share on other sites

Only I admin and a moderator can. Speaking about - an extra hand for keeping forum clean is welcomed. Any volunteers?  :)

Well ....

 

Since I decide to use cubieboard and armbian as my embeded system development base, it'll good for me to check this sub-forum frequently.

But if you thingking to let me give my hand, kindly please first send me email about the rule , job, and expectation .. i need to know if i'm good enough for this.

 

Sincerely

-bino-

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