Good day!
Where can I find sources which was used to build camera-engine-rkaiq_3.0.2_arm64.deb from debos-radxa repo?
Good day!
Where can I find sources which was used to build camera-engine-rkaiq_3.0.2_arm64.deb from debos-radxa repo?
I recently started to dive into the Rockchip camera engine and the sources are a total mess. I have a work in progress repo on Launchpad linked below. The camera engine SDK for RK3588 has not been updated it a long time, so I forked the repo from Firefly. I still need to add the tuning files for Radxa cameras but it’s at least a start.
I’ve tried firefly sources. As well as even more recent sources: https://github.com/JeffyCN/mirrors/tree/rkaiq-2024_04_08 . The main issue with both is it requires more recent kernel part of the driver. In rk-camera-module.h there are defined structures used to pass to/from kernel via ioctl. But those structures in firefly camera_engine_rkaiq sources actually differs from ones defined in radxa kernel-5.10 sources, so it’s not gonna work with radxa debos. More recent kernel required. I don’t wanto to build entire firefly world and hoped to find working userspace rkaiq sources. Like the ones which was used to build camera-engine-rkaiq_3.0.2_arm64.deb package.
What are the instructions you use to build the package?
I tried the latest version, but it seems to have skipped building rkaiq_3A_server. It builds librkaiq.so fine.
I’ve altered cmake recipes a little to build static librkaiq.a and rkaiq_3A_server linked statically with librakaiq in a single step. But as I recall you could just build rkaiq_3A_server after you build librkaiq.so. Just specify it’s directory for cmake. Something like this:
cmake ../camera_engine_rkaiq
cmake ../camera_engine_rkaiq/rkaiq_3A_server
But it’s not going to work anyway due to 2 issues:
We probably could fix those but it would be much easier if manufacturer just shared with us working sources or patches.
I built the latest code but cannot get past this:
media get entity by name: rkisp-isp-subdev is null
media get entity by name: rkisp-input-params is null
media get entity by name: rkisp-statistics is null
media get entity by name: rkisp_mainpath is null
Cound not find rkisp dev names, skipped /dev/media0
ERR: Bad media topology for: /dev/media0
DBG: get rkisp-isp-subdev devname: /dev/v4l-subdev3
DBG: get rkisp-input-params devname: /dev/video19
DBG: get rkisp-statistics devname: /dev/video18
DBG: get rkisp_mainpath devname: /dev/video11
rkaiq log level ff1
XCORE:K:rk_aiq_init_lib, ISP HW ver: 30************************** VERSION INFOS **************************
version release date: 2024-03-03
AIQ: AIQ v6.0x6.1
************************ VERSION INFOS END ************************
ERR: Bad media topology for: /dev/media2
ERR: Bad media topology for: /dev/media3
ERR: Bad media topology for: /dev/media4
ERR: Bad media topology for: /dev/media5
ERR: Bad media topology for: /dev/media6
ERR: Bad media topology for: /dev/media7
ERR: Bad media topology for: /dev/media8
ERR: Bad media topology for: /dev/media9
ERR: Bad media topology for: /dev/media10
ERR: Bad media topology for: /dev/media11
ERR: Bad media topology for: /dev/media12
ERR: Bad media topology for: /dev/media13
ERR: Bad media topology for: /dev/media14
ERR: Bad media topology for: /dev/media15
XCORE:E:invalid main scene len!AWB:E:lost smartRun para in json
Segmentation fault
Could be the kernel version or wrong json… who knows.
Yeah, it works with the correct json and kernel 6.1.
media get entity by name: rkisp-isp-subdev is null
media get entity by name: rkisp-input-params is null
media get entity by name: rkisp-statistics is null
media get entity by name: rkisp_mainpath is null
Cound not find rkisp dev names, skipped /dev/media0
ERR: Bad media topology for: /dev/media0
DBG: get rkisp-isp-subdev devname: /dev/v4l-subdev3
DBG: get rkisp-input-params devname: /dev/video19
DBG: get rkisp-statistics devname: /dev/video18
DBG: get rkisp_mainpath devname: /dev/video11
rkaiq log level ff1
XCORE:K:rk_aiq_init_lib, ISP HW ver: 30************************** VERSION INFOS **************************
version release date: 2024-03-03
AIQ: AIQ v6.0x6.1
************************ VERSION INFOS END ************************
ERR: Bad media topology for: /dev/media2
ERR: Bad media topology for: /dev/media3
ERR: Bad media topology for: /dev/media4
ERR: Bad media topology for: /dev/media5
ERR: Bad media topology for: /dev/media6
ERR: Bad media topology for: /dev/media7
ERR: Bad media topology for: /dev/media8
ERR: Bad media topology for: /dev/media9
ERR: Bad media topology for: /dev/media10
ERR: Bad media topology for: /dev/media11
ERR: Bad media topology for: /dev/media12
ERR: Bad media topology for: /dev/media13
ERR: Bad media topology for: /dev/media14
ERR: Bad media topology for: /dev/media15
XCORE:E:invalid main scene len!IPCSERVER:K:cid[0] Process path:/tmp/UNIX.domain0, sockfd:16
XCORE:K:cid[0] rk_aiq_uapi_sysctl_init success. iq:/etc/iqfiles//imx415_CMK-OT2022-PX1_IR0147-50IRC-8M-F20.json
CAMHW:E:failed to set hdr mode 0
XCORE:K:cid[0] rk_aiq_uapi_sysctl_prepare success. mode:0
DBG: subscribe events from /dev/video19 success !
DBG: /dev/media1: wait stream start event…
DBG: /dev/media1: wait stream start event success …
DBG: device manager start
CAMHW:K:cid[0] start success. isGroup:0, isOnline:1, isMultiIsp:0, init_ens:0x19fc8ffe473b
XCORE:K:cid[0] rk_aiq_uapi_sysctl_start success.
DBG: rkisp_init engine succeed
DBG: /dev/media1: wait stream stop event…
AF:E:the time to wait motor move is too long, force stable
CPU usage:
That’s probably due to changes in iq-parser. Try this patch: imx415_RADXA-CAMERA-4K_DEFAUL.patch.zip (874 Bytes) . Apply it on your /etc/iqfiles//imx415_CMK-OT2022-PX1_IR0147-50IRC-8M-F20.json
Did you build just kernel and booted radxa debos or build entire firefly world?
Just the kernel. I think it would also work with the latest radxa kernel and image (the ‘test only’ image).
I will try the kernel 6.1.57 and see what i get.
So, we have working pair: kernel + camera_engine_rkaiq server. Could you specify exactly repositories and hashes for those?
I built today the kernel 6.1.57 and cloned the camera engine you linked above, it worked.
I did not apply your patch yet, the json file i used:
./isp3x/imx415_CMK-OT2022-PX1_IR0147-50IRC-8M-F20.json
it works, though i have some errors like this one:
CAMHW:E:handle_sof: sof_id[566]: set exposure failed!!!
CAMHW:E:handle_sof: sof_id[567]: set exposure failed!!!
CAMHW:E:handle_sof: sof_id[568]: set exposure failed!!!
CAMHW:E:handle_sof: sof_id[569]: set exposure failed!!!
CAMHW:E:handle_sof: sof_id[570]: set exposure failed!!!
CAMHW:E:handle_sof: sof_id[571]: set exposure failed!!!
Where should the patch be applied?
./isp39/imx415_CMK-OT2022-PX1_IR0147-50IRC-8M-F20.json
./isp32/imx415_CMK-OT2022-PX1_IR0147-36IRC-8M-F20.json
./isp3x/imx415_CMK-OT2022-PX1_IR0147-50IRC-8M-F20.json
./isp20/imx415_YT-RK415-V1_IR0147-60IRC-8M-F20.xml
./isp20/imx415_YT10092_IR0147-36IRC-8M-F20.xml
./isp20/imx415_YT10092_IR0147-60IRC-8M-F20.xml
./isp20/imx415_YT10092_IR0147-36IRC-8M-F20-hdr3.xml
./isp20/imx415_YT10092_IR0147-28IRC-8M-F20-hdr3.xml
./isp20/imx415_YT10092_IR0147-28IRC-8M-F20.xml
./isp20/imx415_YT10092_IR0147-60IRC-8M-F20-hdr3.xml
If your build of rkaiq_3A_Server doesn’t crash on startup you propably don’t need that patch. The main idea of the patch is to rename ‘EnvLv’ to ‘CtrlData’.
Today I’ve tried to build kernel-6.1.43 from radxa github. But it fails to boot on my rock-5a ( rock-5a_ubuntu_jammy_cli_b18.img.xz ). Tried to boot with rk3588s-rock-5a.dtb
and with rk3588-rock-5b.dtb
. How did you managed to boot kernel-6.1?
So far I have rock5-5c booting 6.1 due to the camera not working with 5.10 on this board (something is missing on 5.10), my rock-5b works rock solid with 5.10 for what i need.
You probably need radxa latest u-boot.