Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPL compliance: please, provide sources for kernel modules #40

Open
krasin opened this issue Aug 11, 2024 · 6 comments
Open

GPL compliance: please, provide sources for kernel modules #40

krasin opened this issue Aug 11, 2024 · 6 comments

Comments

@krasin
Copy link

krasin commented Aug 11, 2024

Hi LicheeRV Nano team,

thank you for working on supporting this great board!

I am currently trying to get a camera-based solution developed on LicheeRV Nano, and I need to debug kernel modules, in particular, soph_jpeg.ko. Unfortunately, it's only included in the binary form in this repository: https://github.com/sipeed/LicheeRV-Nano-Build/tree/main/osdrv/interdrv/v2/jpeg/phobos_riscv

Can you please provide a link to the sources for this kernel module and the instruction to build it?

Thank you in advance!

@krasin
Copy link
Author

krasin commented Aug 13, 2024

My best answer to this question:

  1. No chance of getting sources for the kernel drives posted in this repo.
  2. LicheeRV Nano and MilkV Due 256m are closely related, and there's a lot of progress on getting open source drives in the v2 version of buildroot for MilkV: https://github.com/milkv-duo/duo-buildroot-sdk-v2/tree/develop/osdrv/interdrv/v2/jpeg

Unfortunately, this new version does not work yet (even for MilkV) and then it will take Sipeed time to get these advancements available for LicheeRV Nano.

@scpcom
Copy link

scpcom commented Aug 15, 2024

The driver sources can also be found on the chip vendors git:
https://github.com/sophgo/osdrv/tree/sg200x-dev/interdrv/v2/cvi_vc_drv
https://github.com/sophgo/osdrv/tree/sg200x-dev/interdrv/v2/jpeg
I already successfully integrated them into LicheeRV Nano Build but need to test them before I can say if they work.
Did you test the drivers yourself or do you have a link which describes the problem?

@krasin
Copy link
Author

krasin commented Aug 15, 2024

Thank you so much for your response! I will give them a try.

For some context, I am looking to synchronize multiple LicheeRV Nano cameras together (as best as I could) to record volumetric videos, and that requires a little more tight control over what happens in the camera path.

@scpcom
Copy link

scpcom commented Sep 3, 2024

Here is the result of my work:
#45
It is backward compatible to existing projects.
I successfully tested it with NanoKVM lite and full.
Next step is testing it with LicheeRV Nano W(E) and camera module if it arrives.

@scpcom
Copy link

scpcom commented Sep 11, 2024

I tested it now with gc4653 camera module on LicheeRV Nano W(E).
I reverted some changes and kept only the source of cvi_vc_drv and jpeg itself and minimal header changes.

I could not find any rtsp demo/sample that works with gc4653, the samples from the current unmodified image did not work.

So I decided to replace pre-built middleware/v2/sample/test_mmf/libmaix_mmf.a with the code found here:
https://github.com/sipeed/LicheeRV-Nano-Build/blob/20240515/middleware/v2/sample/test_mmf/sophgo_middleware.c
The older version can also be found here:
https://github.com/sipeed/MaixCDK/blob/main/components/3rd_party/sophgo-middleware/sophgo-middleware/v2/sample/vio/sophgo_middleware.c
The enhanced cpp version is also based on this:
https://github.com/sipeed/MaixCDK/tree/main/components/maixcam_lib

There are three places with hardcoded pixel format, I needed to change it to NV21 for gc4653:
scpcom@20ae1a9

The updated samples are here:
https://github.com/scpcom/LicheeRV-Nano-Build/tree/middleware-maix_mmf
camera to jpg file (working headless):
/mnt/system/usr/bin/test_mmf 4
camera to h265 rtsp (working headless):
/mnt/system/usr/bin/test_mmf 10
camera to h265 rtsp and vo (works only with oled attached, crashes the whole system if not):
/mnt/system/usr/bin/test_mmf 12

All together here:
https://github.com/scpcom/LicheeRV-Nano-Build/tree/develop

@krasin
Copy link
Author

krasin commented Sep 11, 2024

Thank you, @scpcom! I confirm that I can build an image using your repository (https://github.com/scpcom/LicheeRV-Nano-Build/tree/develop) and it boots.

Unfortunately, RNDIS is broken recently (last time it worked was around 378a067), and I don't currently have a USB-Serial dongle around. Once I have it, I will try to connect through the serial console and check if everything (modulo RNDIS) is working.

Thanks again for working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants