14 14
IgZero

Armbian 5.25 on OrangePI PC: The gc2035 video camera doesn't work

Recommended Posts

On 9/2/2018 at 5:57 PM, jps said:

Excuse my clumsiness, but I don't know what to do with the files in https://github.com/avafinger/gc2035

 

i can not find the paths related in this link.... i can not make the camera work in last Armbian. Thanks any help...

Hello,

Could you tell us which nano computer you are using, which version of armbian, and which camera ? thanks

Share this post


Link to post
Share on other sites
On 9/3/2018 at 9:51 PM, Ucino said:

Hello,

Could you tell us which nano computer you are using, which version of armbian, and which camera ? thanks

Sure. Orange Pi Lite + CSI camera orange Pi native (Shenzhen Xunlong Software CO.,Limited) camera, and last Armbian  for Lite Armbian_5.59_Orangepilite_Ubuntu_bionic_next_4.14.65.

Thank you very much

Share this post


Link to post
Share on other sites
On 9/6/2018 at 1:40 PM, Ucino said:

Thanks for your feedback. As olivluca suggest, I think the first step you can try to do is using the 3.X kernel : https://www.armbian.com/orange-pi-lite/ at the end of the page : https://dl.armbian.com/orangepilite/Ubuntu_xenial_default_desktop.7z

Yes, 3.X kernel have the drivers. Works fine. Thank you.

 

But... but I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035.

Thank again.

Share this post


Link to post
Share on other sites

Cool if it works.

 

Sorry I didn't remember about the content of gc2035 on github . If it's works fine for you, maybe you have nothing to do ?  Why do you think you have to care about it, maybe  you have some other problems with the video ?

Share this post


Link to post
Share on other sites

For me the version on github works better than the version included with armbian:

 

On 3/29/2018 at 8:04 PM, olivluca said:

I compiled the module from here https://github.com/avafinger/gc2035 (gc2035.c, without trying to apply the patch in the same repository) and it works much better than the one included in armbian (though it has other quirks, see below).

I tried many of the advertised resolutions and they all work:

  • 640 x 480 (flipped horizontally)
  • 800x600 (ok)
  • 1280x720 (slightly washed up)
  • 1600x1200 (too much for motion)

Let's see if it lasts or if it causes more problems, but if nobody is going to fix the current driver I propose to revert to the older one.

 

Share this post


Link to post
Share on other sites
On 9/9/2018 at 3:22 PM, Ucino said:

Cool if it works.

 

Sorry I didn't remember about the content of gc2035 on github . If it's works fine for you, maybe you have nothing to do ?  Why do you think you have to care about it, maybe  you have some other problems with the video ?

But... I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035...........

 

I mean ... i don't know how to build a module. Anyway, all it's working, so thanks.

Share this post


Link to post
Share on other sites
21 hours ago, jps said:

But... I still have the doubt that what to do with the content of https://github.com/avafinger/gc2035...........

 

I mean ... i don't know how to build a module. Anyway, all it's working, so thanks.

I'm newbie about drivers and compiling things, so becarefull of what I'm writting, it's certainly wrong. You maybe have 3 possibilities :

1) - copy and past a file (this what I have done one time :

2) - compiling the full armbian and adding to him the patch during compiling ( cf. https://docs.armbian.com/Developer-Guide_Build-Preparation/ )

3) - or compiling inside your armbian.

 

When we are looking in https://github.com/avafinger/gc2035

we can see at the end of the page an example of compiling for BSP, so it seems that the right way is the option 3).

 

It seems that you will have to adapt  things of the compiling step :
 

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j2 INSTALL_MOD_PATH=output SUBDIRS=drivers/media/video/sunxi-vfe/device modules CC [M] drivers/media/video/sunxi-vfe/device/gc2035.o Building modules, stage 2. MODPOST 40 modules CC drivers/media/video/sunxi-vfe/device/gc2035.mod.o LD [M] drivers/media/video/sunxi-vfe/device/gc2035.ko

But I'm sorry, I have no idea on how you can adapt this for armbian.

Maybe, after you have done a backup of your files and OS, you can give it a try, and tell us the result ?

Share this post


Link to post
Share on other sites

Thanks Ucino, i arrived till there. In my first post i wrote:

Quote

i can not find the paths related...

so, i need to read much more about how to compile a driver in a live Armbian distribution. Thank you anyway.

Share this post


Link to post
Share on other sites


In case it is useful for somebody else, I put the source and the module here: https://drive.google.com/open?id=1KM3AFoSJCpJ0RpafeKRmH8iZWr3waQlH

There you'll find the binary module (I compiled for my current kernel which is 3.4.113-sun8i #68) and the tar.gz with the source I used to compile it.

It's just the files from github (in the "device" directory), I added a Makefile and the files from the drivers/media/video/sunxi-vfe in the original kernel source (taken from the linux-source-default-sun8i_5.60_all.deb package...well, actually I don't remember where I took those files, but I have compared them to the one provided in the deb and they are the same).

To compile it just cd to the device directory and issue a make (provided you have the linux-headers package installed for the current kernel, but IIRC that's installed by default in armbian).

I don't understand why armbian supplies a worse implementation of the gc2035 module but since I can use the good (or at least not so bad) one I don't care.

Share this post


Link to post
Share on other sites

Well, I didn't implement it, I just took what was already available. Maybe what doesn't work for me works for somebody else or vice-versa, I don't know.
In theory the version supplied with armbian should be better (it should auto select the parameters at device opening time instead of determining them at module load time), in practice it doesn't work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
14 14