15 15
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
3 hours ago, olivluca said:

I don't understand why armbian supplies a worse implementation

 

Because someone needs to implement and test. We seriously lack "someones".

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

Hi! Did anybody solved the problem with gc2035?

$ uname -a
Linux orangepipcplus 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l armv7l armv7l GNU/Linux

$ modprobe gc2035
modprobe: FATAL: Module gc2035 not found in directory /lib/modules/4.19.20-sunxi

$ modprobe vfe_v4l2
modprobe: FATAL: Module vfe_v4l2 not found in directory /lib/modules/4.19.20-sunxi
 

 

Share this post


Link to post
Share on other sites
On 3/28/2019 at 9:43 AM, r3mu5 said:

Hi! Did anybody solved the problem with gc2035?

$ uname -a
Linux orangepipcplus 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l armv7l armv7l GNU/Linux

 

 

In short, there is no hope to get the camera working on 4.x kernels, because they don't have CSI support ATM. I did not get it to work yet, but, first, grab something using 3.4.x kernel. Spent 3 days on it, still stuck.

 

Also, try gc_2035 ... just in case ... or with dash ... not sure.

Share this post


Link to post
Share on other sites
(edited)
On 3/28/2019 at 9:43 AM, r3mu5 said:

Hi! Did anybody solved the problem with gc2035?

 

At last, I have found something that works, and produces images. In short, use ubuntu_lxde_desktop_OrangePipc_v0_9_1.img . Long story is here: http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=4270&page=1&extra=#pid25253

 

Edit: I also suceeded with image Armbian_5.75_Orangepione_Ubuntu_xenial_default_3.4.113_desktop.7z

Edited by DoubleHP

Share this post


Link to post
Share on other sites

the CSI driver isn't the problem here.. iirc @@lex already had successfully cameras working under mainline linux (ov5640 if I'm right).. Problem is, there's to my knowledge no gc2035 mainline driver available (at least, there wasn't the last time I checked it).. As long as nobody touches this up we won't see gc2035 cameras working on mainline.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
15 15