Jump to content

GC2035 camera driver is unavailable at sunxi-next 4.13.6 kernel ?


informer15

Recommended Posts

I have Orange PI PC Plus with GC2035 camera module. Upgraded to 4.13.6 sunxi-next mainline kernel and noticed that

GC2035 camera driver is gone! Why is it so? Maybe someone forgot to include this driver to the kernel?

People are still using these cameras and need them! If it was a conscious decision to remove the GC2035 camera

from the sunxi-next tree - then, well, it was a horrible decision that should be reversed.

 

Please return this driver. https://github.com/avafinger/gc2035

Earlier it was at ./drivers/media/video/sunxi-vfe/device/gc2035.c location,

but now the directory structure could be very different...

Link to comment
Share on other sites

@Igor, thank you for the positive response!

 

I built the latest Armbian with mainline kernel and Debian Stretch.

Perhaps I missed to tune some build configuration as now I only have the v4l2-fwnode and v4l2-flash-led-class modules built-in, and no /dev/video* device.

 

Could you please provide some general guidance on how to build the v4l2 module successfully, so that I can use the CSI port on the OPI plus2?

In case I shall rebuild the kernel, this is also acceptable.

Thank you in advance!

Link to comment
Share on other sites

Just now, dando said:

Could you please provide some general guidance on how to build the v4l2 module successfully, so that I can use the CSI port on the OPI plus2?


Sorry, no idea in detail but you will probably need to rebuild the kernel.

Link to comment
Share on other sites

I think VIDEO_SUN6I_CSI=m is missing. I did not see it in the patch.

* I mean if you load it as module you can see it loaded if =y i cant see it.

 

In other words:

CONFIG_VIDEO_SUN6I_CSI=m
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_V4L2=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_DMA_CONTIG=m
CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEO_TUNER=m
CONFIG_V4L2_MEM2MEM_DEV=m
CONFIG_V4L2_FWNODE=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_DVB_CORE=m
 

Edited by @lex
build as modules
Link to comment
Share on other sites

@@lex, thank you for the advice!

 

I reflected these configuration options into the linux-sunxi-dev.config and rebuilt the kernel.

 

After installing the new kernel, the following modules are available:

root@orangepiplus ~# find /lib/modules/4.14.52-sunxi -iname "*v4l*"
/lib/modules/4.14.52-sunxi/kernel/drivers/media/usb/em28xx/em28xx-v4l.ko
/lib/modules/4.14.52-sunxi/kernel/drivers/media/v4l2-core
/lib/modules/4.14.52-sunxi/kernel/drivers/media/v4l2-core/v4l2-fwnode.ko
/lib/modules/4.14.52-sunxi/kernel/drivers/media/v4l2-core/videobuf2-v4l2.ko
/lib/modules/4.14.52-sunxi/kernel/drivers/media/v4l2-core/v4l2-flash-led-class.ko
/lib/modules/4.14.52-sunxi/kernel/drivers/staging/most/aim-v4l2
/lib/modules/4.14.52-sunxi/kernel/drivers/staging/most/aim-v4l2/aim_v4l2.ko

Nevertheless, there is still no /dev/video* device, even after inserting them. I guess I would need the vfe_v4l2 module?

If yes, then how can I build it?

 

Just as a side note, I am using the OrangePi Plus 2, whose chipset is codenamed as sun8i I believe. Shouldn't this be reflected in the configuration options? 

Thank you in advance and sorry if these questions have already been answered.

Link to comment
Share on other sites

33 minutes ago, dando said:

linux-sunxi-dev.config

 

Wrong. You should edit sunxi-next.config ... sunxi-dev is attached to 4.17

 

33 minutes ago, dando said:

whose chipset is codenamed as sun8i I believe


True, but sun8i codename is used only for an old legacy kernel, modern is common for all sun5i, sun6i, sun8i, ...

Link to comment
Share on other sites

3 hours ago, dando said:

 there is still no /dev/video* device, even after inserting them. I guess I would need the vfe_v4l2 module?

 

 

with that configuration, you should have sun6i_csi as a module, when this module loads it creates the device node /dev/video0 but only if you have the end points for the correct sensor. Igor's patch is for ov5640 if you are trying to use gc2035 you need that driver. I think there is no gc2035 driver for mainline yet. If you have ov5640 then check if sun61_csi was built as a module and try to load it and check dmesg for some messages.

 

* Update: And if you have the correct DT node you will not need to load the driver with modprobe, it should be loaded automagically on boot

Link to comment
Share on other sites

@Igor and @@lex, thank you for the fast response!

 

I decided to also prepare an SD card with the legacy kernel, so I compiled one image with 3.4.113 and Debian Jessie server.

So far the OS seems to be running fine.

 

I plan on using a non-standard hardware for a hobby project. However, I have not yet hooked up a camera on the CSI (nor on the USB) port.

In case everything has been built properly, should there be a /dev/video0 device after I modprobe the vfe_v4l2 module, despite that there is nothing connected?

 

On my board I tried it and had the following recorded in the system log (I found it out with dmesg):

[VFE_ERR]Error registering v4l2 subdevice No such device!

Then I uncommented vfe_v4l2 in /etc/modules and rebooted, but there is still no /dev/video0 device :)

Of course, modprob-ing the gc2035 module resulted in an error that the target chipset was not found.

 

Thanks in advance! :)

Link to comment
Share on other sites

On ‎6‎/‎28‎/‎2018 at 4:56 PM, dando said:

@Igor and @@lex, thank you for the fast response!

 

I decided to also prepare an SD card with the legacy kernel, so I compiled one image with 3.4.113 and Debian Jessie server.

So far the OS seems to be running fine.

 

I plan on using a non-standard hardware for a hobby project. However, I have not yet hooked up a camera on the CSI (nor on the USB) port.

In case everything has been built properly, should there be a /dev/video0 device after I modprobe the vfe_v4l2 module, despite that there is nothing connected?

 

On my board I tried it and had the following recorded in the system log (I found it out with dmesg):


[VFE_ERR]Error registering v4l2 subdevice No such device!

Then I uncommented vfe_v4l2 in /etc/modules and rebooted, but there is still no /dev/video0 device :)

Of course, modprob-ing the gc2035 module resulted in an error that the target chipset was not found.

 

Thanks in advance! :)

If I remember correctly, at some point the legacy branch the gc2035 module wasn't functional anymore I think it's since 5.24, but I'm not sure. I had to downgrade to get my gc2035 camera again.

 

Regards

Link to comment
Share on other sites

On 8/13/2018 at 7:50 PM, graki said:

If I remember correctly, at some point the legacy branch the gc2035 module wasn't functional anymore I think it's since 5.24, but I'm not sure. I had to downgrade to get my gc2035 camera again.

for legacy:

should fix this.. 

 

For mainline.. someone has to write a driver first.. :P 

 

@@lex did you ever had a look if there's someone working on a mainline gc2035 driver? I found some android drivers but all of them where somehow sticked to some other SoC specific drivers (I think there's one in RockChips 4.4 kernel)..  

Link to comment
Share on other sites

1 hour ago, chwe said:

did you ever had a look if there's someone working on a mainline gc2035 driver?

Not that i know of,  I don't think there is a need to port gc2035 when ov5640 is a better choice. IMHO. Maybe wens have something working.

Link to comment
Share on other sites

I have built a 5.60 Armbian with kernel 4.18.8 from source, running on an OPi Zero Plus2 H5. 

I notice it has v4l2-core built in.

The ov56xx drivers seem to be integrated through i2c and i2c/soc, there is also camera driver code in the device-tree bindings.

Could someone please explain the difficulty porting the gc2035 camera driver?  Do we need VFE submodule at all, or can the gc2035 code use v4l2 calls from core?  Or would the driver need complete rewrite using the same model as the ov56xx?

I understand the ov5640 is better, but I have gc2035 hardware, time to kill and ARM driver coding experience that I wish to refresh and practise.  Will an ov56xx connected through csi currently work out of the box with this kernel?

Link to comment
Share on other sites

On 9/27/2018 at 5:32 AM, chucklz said:

I understand the ov5640 is better, but I have gc2035 hardware, time to kill and ARM driver coding experience that I wish to refresh and practise.  Will an ov56xx connected through csi currently work out of the box with this kernel?

 

 

I have several Oranges connected to ov5640 and ov5647 cameras, I'm interested in that driver development. Would you need access to my hardware I can setup ssh, just pm me

 

 

Link to comment
Share on other sites

On 10/29/2018 at 2:35 PM, Ben Nibby said:

 

I have several Oranges connected to ov5640 and ov5647 cameras, I'm interested in that driver development. Would you need access to my hardware I can setup ssh, just pm me

 

 


The code for those is mainlined from kernel 4.17.
 

I suggest you compile a kernel with the i2c, csi interfaces and camera modules enabled using "next" branch of the latest version for your boards and build a distro. You may need to disable the option to auto build modules, in order to access the menus that include these drivers. Then you can modprobe the modules and test if they work with dmesg. 

You could do it on the board, but it would take longer. armbian-config lets you switch kernels and branches, then you can compile drivers natively.

Until the boards have the existing drivers installed, there's not much I can dig around for.

If you need a build for a board, and can't do it yourself, let me know which board and I can build a distro on aws ec2 and give you a link to download it. 

 

Link to comment
Share on other sites

Hi all,

I have a Orange Pi One and a g2035 camera module which using for a 3D printer (running OctoPrint)

I installed Armbian Buster mainline based kernel 5.7.y (https://www.armbian.com/orange-pi-one/) but the driver maybe not supported the gc2035 camera.

Can someone help me the image file or step-step instructions for use it. 

Thanks a lot!

Link to comment
Share on other sites

2 hours ago, son said:

Hi all,

I have a Orange Pi One and a g2035 camera module which using for a 3D printer (running OctoPrint)

I installed Armbian Buster mainline based kernel 5.7.y (https://www.armbian.com/orange-pi-one/) but the driver maybe not supported the gc2035 camera.

Can someone help me the image file or step-step instructions for use it. 

Thanks a lot!

 

Link to comment
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...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines