Kernel crash while booting in I-Pi SMARC 1200

Hi currently I am working on I-Pi SMARC 1200. I have built the Yocto Image and enabled the mtk-camera entries. It has built without any issues and I am using the default ap1302 overlay ( camera-ar0830-ap1302-csi0-std.dtbo ). I am flashing with this using genio-flash –load-dtbo camera-ar0830-ap1302-csi0-std.dtbo. While booting the mtk-camera is failing and causing it to crash. I have not connected any hardware ( camera ). Can you kindly let me know how to mitigate this crash. I have attached the log below

[ 4.870237] mtk_cam_get_meta_fmts platform fp is NULL
[ 4.871822] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
[ 4.874351] Mem abort info:
[ 4.875039] ESR = 0x96000004
[ 4.875498] EC = 0x25: DABT (current EL), IL = 32 bits
[ 4.876473] SET = 0, FnV = 0
[ 4.876876] EA = 0, S1PTW = 0
[ 4.877780] FSC = 0x04: level 0 translation fault
[ 4.878413] Data abort info:
[ 4.878785] ISV = 0, ISS = 0x00000004
[ 4.879278] CM = 0, WnR = 0
[ 4.879899] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001092ba000
[ 4.881344] [0000000000000008] pgd=0000000000000000, p4d=0000000000000000
[ 4.882390] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 4.883111] Modules linked in: crct10dif_ce mediatek_drm_hdmi mtk_cam_isp(O+) mtk_vcodec_dec_v1_mt8395(O) mtk_vcodec_enc_v1_mt8395(O) mtk_vcu_mt8395(O) mtk_vcodec_common_mt8395(O) mtk_jpeg mtk_mdp3 mtk_cam_plat_util(O) v4l2_fwnode v4l2_mem2mem v4l2_async videobuf2_dma_contig mtk_ccd(O) mtk_ccd_rpmsg(O) videobuf2_memops videobuf2_v4l2 ftdi_sio videobuf2_common videodev mc rtc_pcf8563 snd_soc_tlv320aic3x_i2c mali_kbase(O) snd_soc_tlv320aic3x memory_group_manager(O) phy_mtk_hdmi_drv mtk_pmic_keys rtc_mt6397 mtk_scp mtk_rpmsg mtk_rng mtk_scp_ipi rng_core pwm_bl moal mlan cfg80211 rfkill fuse ipv6
[ 4.889883] CPU: 0 PID: 280 Comm: systemd-udevd Tainted: G O 5.15.42-lec-mtki1200-23.2 #1
[ 4.891091] Hardware name: Adlinktech LEC-MTK-I1200 board with UFS storage (DT)
[ 4.892021] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 4.892910] pc : mtk_cam_video_register+0x180/0x420 [mtk_cam_isp]
[ 4.893757] lr : mtk_cam_video_register+0x158/0x420 [mtk_cam_isp]
[ 4.894593] sp : ffff80000bbf3610
[ 4.895020] x29: ffff80000bbf3610 x28: ffff0000cccc14a8 x27: ffff0000cccc0f60
[ 4.895938] x26: ffff0000cccc0d08 x25: ffff0000cccc1510 x24: 0000000000000001
[ 4.896856] x23: ffff0000cccc0080 x22: ffff0000cccc16f0 x21: ffff0000cccc0088
[ 4.897774] x20: ffff800001b22730 x19: ffff0000cccc0ca8 x18: 0000000000000000
[ 4.898691] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[ 4.899607] x14: 0000000000000000 x13: 0000000000000000 x12: fefefefefefefeff
[ 4.900524] x11: 0000ffffa37b0ec0 x10: 000000000000002d x9 : ffff800001af19d8
[ 4.901442] x8 : 000000000000002d x7 : 0000000000000003 x6 : 000000000000002d
[ 4.902358] x5 : 00000000000000e8 x4 : 0000000000000048 x3 : 000000000000000e
[ 4.903274] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000002
[ 4.904190] Call trace:
[ 4.904508] mtk_cam_video_register+0x180/0x420 [mtk_cam_isp]
[ 4.905300] mtk_raw_register_entities+0x5ec/0xa10 [mtk_cam_isp]
[ 4.906126] mtk_cam_master_bind+0x12c/0x35c [mtk_cam_isp]
[ 4.906884] try_to_bring_up_master+0x16c/0x1e0
[ 4.907474] component_master_add_with_match+0xbc/0x104
[ 4.908146] mtk_cam_probe+0x638/0x7c4 [mtk_cam_isp]
[ 4.908839] platform_probe+0x74/0x114
[ 4.909326] really_probe.part.0+0xa4/0x310
[ 4.909867] __driver_probe_device+0xf0/0x1a0
[ 4.910429] driver_probe_device+0x4c/0x1a0
[ 4.910968] __driver_attach+0x114/0x1f0
[ 4.911474] bus_for_each_dev+0x80/0xe0
[ 4.911970] driver_attach+0x30/0x40
[ 4.912433] bus_add_driver+0x114/0x214
[ 4.912928] driver_register+0x84/0x140
[ 4.913424] __platform_driver_register+0x34/0x40
[ 4.914029] mtk_cam_init+0x30/0x1000 [mtk_cam_isp]
[ 4.914712] do_one_initcall+0x54/0x2b0
[ 4.915209] do_init_module+0x50/0x260
[ 4.915696] load_module+0x23c0/0x29e0
[ 4.916181] __do_sys_finit_module+0xa8/0xf0
[ 4.916732] __arm64_sys_finit_module+0x2c/0x40
[ 4.917316] invoke_syscall+0x50/0x120
[ 4.917802] el0_svc_common.constprop.0+0xdc/0x100
[ 4.918419] do_el0_svc+0x34/0xa0
[ 4.918849] el0_svc+0x48/0x170
[ 4.919260] el0t_64_sync_handler+0xa8/0x130
[ 4.919808] el0t_64_sync+0x1a0/0x1a4
[ 4.920287] Code: b9401e63 b9086a63 8b022022 37180d60 (b9400840)
[ 4.921066] —[ end trace 3803a5450dd17a46 ]—
[ 5.024129] mt8195-audio 10890000.mt8195-afe-pcm: mt8195_mt6359_mtkaif_calibration(), start
[ 5.025861] mt8195-audio 10890000.mt8195-afe-pcm: mt8195_mt6359_mtkaif_calibration(), end, calibration ok 0
[ 5.098274] systemd-journald[221]: Oldest entry in /run/log/journal/e99fff16ec2f409e898fd783bb018cdf/system.journal is older than the configured file retention duration (1month), suggesting rotation.
[ 5.100510] systemd-journald[221]: /run/log/journal/e99fff16ec2f409e898fd783bb018cdf/system.journal: Journal header limits reached or header out-of-date, rotating.
[ 5.124370] [MTK_V4L2] level=0 venc_if_get_param(),87: venc_if_get_param init drv_handle = 0xffff0000c635df00
[ 5.125712] [MTK_V4L2] level=0 venc_if_get_param(),87: venc_if_get_param init drv_handle = 0xffff0000c635df00
[ 5.126977] [MTK_V4L2] level=0 fops_vcodec_open(),158: 1a020000.venc encoder [1]
[ 5.128022] [MTK_V4L2] level=0 fops_vcodec_release(),196: [1] encoder
[ 5.128437] input: mt8195_demo HDMI Jack as /devices/platform/mt8195-sound/sound/card0/input1
[ 5.133859] mediatek-dpi 1c112000.disp_dpi1: Found bridge node: /soc/hdmi@1c300000
[ 5.134749] [MTK_V4L2] level=0 mtk_vdec_s_ctrl(),3451: [1] V4L2_CID_MPEG_MTK_SEC_DECODE id 10035211 val 0
[ 5.136084] [MTK_V4L2] level=0 fops_vcodec_open(),180: 18000000.vdec decoder [1]
[ 5.137130] [MTK_V4L2] level=0 fops_vcodec_release(),232: [1] decoder
[ 5.178243] mt8195-audio 10890000.mt8195-afe-pcm: mt8195_adda6_only_set(), kcontrol name MTKAIF_ADDA6_ONLY, mtkaif_adda6_only 0
[ 5.322870] usbcore: registered new interface driver lan78xx

Hi @Harish_V ,

Could you provide the Yocto version you use?
Do you make any modifications?

Thanks.

Hi Andy,
Currently I am using this version
DISTRO_VERSION=“23.2-release”.

I had modified the necessary configs to support mtk-camera by default. I wanted to port a YUV sensor which required the seninf platform driver. By default these were not enabled, so I modified to support the drivers. I am currently able to generate .ko and by default are present in the /lib/modules , but I am facing this kernel crash.

Could you please guide me on this. Thanks

Hi @Harish_V ,

The Yocto v23.2-release is very old. Could you try the latest v25.1 release? YUV Sensor (V4L2 Sensor) — IoT Yocto documentation

If your sensor is a YUV sensor and you don’t need the ISP processing. The driver mtk-camera is unnecessary.

Thanks

Hi Andy,
Will try with the latest yocto, thanks for the input.
Regarding leaving out mtk-camera, While media linking we need seninf drivers, the seninf drivers are present under mtk-camisp-driver if I am not wrong, Even the ar0830 dtbo which is the default supported dtbo, it has the seninf driver compatibles. The following is the snippet:
fragment@7 {
target = <&seninf_top>;
overlay {
seninf_csi_port_0: seninf_csi_port_0 {
compatible = “mediatek,seninf”;
csi-port = “0”;
hs_trail_parameter = <0x08>;

         fragment@7 {
                target = <&seninf_top>;
                __overlay__ {
                        seninf_csi_port_0: seninf_csi_port_0 {
                                compatible = "mediatek,seninf";
                                csi-port = "0";
                                hs_trail_parameter = <0x08>;

                                port {
                                        seninf_csi_port_0_in: endpoint {
                                                remote-endpoint = <&sensor0_out>;
                                                data-lanes = <1 2 3 4>;
                                        };
                                };
                        };
                };
        };

So for YUV camera porting the seninf drivers from meta-camispdriver is not required. Can you please confirm on this. Thanks

Hi @Harish_V ,

To enable camera functionality on the Genio 1200, the mtk-camisp-driver repository is required. Here is a breakdown of its core components and their specific roles:

  • drivers/media/platform/mtk-isp: This directory contains the primary ISP hardware control logic. It is essential for all camera operations, whether you require full ISP processing or a pure sensor data dump.
  • drivers/media/platform/mtk-camera: This component facilitates communication with the camera daemon that handles the ISP processing pipeline. This is only necessary if your application requires active ISP processing; it can be bypassed if you only need a pure data dump.

Availability Update:

  • In v23.2: The mtk-camisp-driver was restricted to private builds under NDA, as the ISP features were classified as NDA-protected.
  • In v24.0: We have transitioned the mtk-camisp-driver to public builds to facilitate “pure data dump” support, providing broader access for basic camera functionality.

I hope this clarifies the structure and availability. Please let us know if you have further questions.

Thanks

Thank you for your response Andy.
Can you please let me know where to find the source and build procedure for v25.1.

Thanks

Please check this announcement. v25.1 release

The latest v25.1.1 release.

The most important information from online document.

Thank you for your response.
I went through the page and i found this section and have been confused.

Public & Private Build Configuration

IoT Yocto has a configuration NDA_BUILD that controls if the recipe fetches software from access-controlled “private” repositories. These private repositories are located under the https://gitlab.com/mediatek/aiot/nda URL namespace, hence the name NDA_BUILD.

All the prebuilt images provided in this v25.1.1 release are built using NDA_BUILD = "1" configuration. These images are also referred to as private build images.

By setting NDA_BUILD = "0", you could still build an IoT Yocto image with packages that are available without explicit access permissions to the GitLab NDA namespace. We call this a public build image.

In the public build configuration, some proprietary components are provided in binary-only format, and certain proprietary features are excluded, for example:

  • Security features are excluded, e.g.

    • eFuse writer and custom data field access

    • RPMB access API

  • ISP support for RAW sensors and YUV sensors on Genio 510, Genio 700 and Genio 1200 is excluded.

Starting from v24.0 release, we no longer provide prebuilt public images for download and evaluation, as their features are a subset of the private images. The public build configuration is still supported, so developers can build images themselves using the NDA_BUILD = "0" configuration.

From the below point and the points Andy mentioned are a bit contradictory, my query is in v25.1.1 will I be able to port a YUV sensor without NDA

ISP support for RAW sensors and YUV sensors on Genio 510, Genio 700 and Genio 1200 is excluded.”