Page 1 of 1

Enable camera in buildroot SDK

Posted: 2024-12-17 23:18
by kornpow
I have successfully flashed my Luckfox Pico Pro Max with the stock OS images, which are available on Google Drive. With this image installed, I am able to communicate with the camera.

I see files located in /userdata/ and /dev/video0 is populated.

However, when I use the SDK to do my own buildroot compilation and install, and then flash the image, the camera is not available.

Which packages must be enabled in: `./build.sh buildrootconfig` in order to enable the camera?


More details about buildroot `.config`:
```
$ cat sysdrv/source/buildroot/buildroot-2023.02.6/.config | grep "CAMERA"
BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS=y
BR2_PACKAGE_LIBCAMERA=y
BR2_PACKAGE_LIBCAMERA_V4L2=y
BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE=y
# BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI is not set
BR2_PACKAGE_LIBCAMERA_PIPELINE_RKISP1=y
# BR2_PACKAGE_LIBCAMERA_PIPELINE_SIMPLE is not set
# BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO is not set
# BR2_PACKAGE_LIBCAMERA_PIPELINE_VIMC is not set
# BR2_PACKAGE_LIBCAMERA_COMPLIANCE is not set
# BR2_PACKAGE_LIBCAMERA_APPS is not set
```

```
cat sysdrv/source/buildroot/buildroot-2023.02.6/.config | grep "RKISP"
BR2_PACKAGE_LIBCAMERA_PIPELINE_RKISP1=y
```

Re: Enable camera in buildroot SDK

Posted: 2024-12-18 3:53
by kornpow
I just wanted to add some additional info here:

Here is my `/etc/luckfox.cfg` file:

```
SPI0_M0_CS_ENABLE=1
SPI0_M0_MODE=1
SPI0_M0_STATUS=1
SPI0_M0_MISO_ENABLE=0
SPI0_M0_SPEED=40000000
CSI_ENABLE=1
UART4_M1_STATUS=0
PWM11_M1_STATUS=0
PWM10_M1_STATUS=0
PWM9_M1_STATUS=0
PWM8_M1_STATUS=0
PWM0_M1_STATUS=0
PWM11_M2_STATUS=0
I2C3_M1_STATUS=0
I2C3_M1_SPEED=0
I2C1_M1_STATUS=0
I2C1_M1_SPEED=0
```

Re: Enable camera in buildroot SDK

Posted: 2024-12-19 17:15
by kornpow
In the end, I got it.

It seems like LIBCAMERA_APPS was the missing one.

```
BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS=y
BR2_PACKAGE_LIBCAMERA=y
BR2_PACKAGE_LIBCAMERA_V4L2=y
BR2_PACKAGE_LIBCAMERA_HAS_PIPELINE=y
# BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI is not set
BR2_PACKAGE_LIBCAMERA_PIPELINE_RKISP1=y
# BR2_PACKAGE_LIBCAMERA_PIPELINE_SIMPLE is not set
# BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO is not set
# BR2_PACKAGE_LIBCAMERA_PIPELINE_VIMC is not set
BR2_PACKAGE_LIBCAMERA_COMPLIANCE=y
BR2_PACKAGE_LIBCAMERA_APPS=y
```

Re: Enable camera in buildroot SDK

Posted: 2024-12-20 4:45
by kornpow
In the end, I DONT GOT IT.

The above configuration, does work using SPI flash, but in MicroSD mode, it does not work.

I am quite stumped at this point.

Re: Enable camera in buildroot SDK

Posted: 2024-12-23 1:54
by Crocodile
Hello libcamera is suitable for Raspberry Pi or related ISP products, Luckfox Pico uses the ISP developed by rockchip, buildroot adds LIBCAMERA and cannot be used on RV1103/RV1106, The use of the camera has been described in https://wiki.luckfox.com/Luckfox-Pico/L ... CSI-Camera, please attach the test method you used or the relevant logs