balena-raspberrypi icon indicating copy to clipboard operation
balena-raspberrypi copied to clipboard

Missing `CONFIG_RPIVID_MEM` kernel config for Pi 4

Open richbayliss opened this issue 5 years ago • 10 comments

richbayliss avatar Feb 03 '20 17:02 richbayliss

[richbayliss] This issue has attached support thread https://jel.ly.fish/#/e260cf26-d5f4-4b23-89ff-b665e4551b67

balena-ci avatar Feb 03 '20 17:02 balena-ci

Where should this config with the others be added to rebuild the image with Broadcom driver?

zub0r avatar Feb 05 '20 08:02 zub0r

Hi @matohavo what are you trying to achieve?

floion avatar Feb 06 '20 12:02 floion

Fixed by https://github.com/balena-os/balena-raspberrypi/pull/457

floion avatar Feb 06 '20 12:02 floion

Disclaimer - I'm new to all of this, so I might be totally off.

Ultimately I'm trying to make hardware accelerated decoding of HEVC video work with BalenaOS on RPi4.

If I understand correctly, the broadcom driver needs to be used for that matter, because ffmpeg patch requires video devices also from this driver:

/dev/rpivid-hevcmem
/dev/vc-mem
/dev/vcsm
/dev/vcsm-cma
/dev/vchiq
/dev/vcio
  • Those devices are not present in current 64bit, so I'm not sure if unavailability of vc4 on 64bit systems affect this somehow and if I have to use 32bit image.
  • I've tried to build 32bit image for RPi4 - the build succeeded after I added a coffee file, but it didn't boot. There was no coffee file for barys for 32bit RPi4, although the machine file is there - is there a reason for that?
  • guys from LibreELEC managed to get this working using V4L2, but they used newer kernel 5.4.16 - is it possible to build BalenaOS with new kernels?

Thanks

zub0r avatar Feb 06 '20 15:02 zub0r

Hi, I can do a remote host OS update on a test device of yours if you wish and then you can check if the CONFIG_RPIVID_MEM is all that's needed of if something else needs to be enabled. We only ever tested the 64 bits OS and we have no plan going forward to add the 32 bits machine so no idea why it was not booting for you. We will be switching to a new kernel once the BSP uses a newer kernel. I see that the newest BSP branch is zeus which has kernel 4.19.93 so 5.x is a long wait I would say.

floion avatar Feb 09 '20 06:02 floion

Ok, thank you. I need these configs:

CONFIG_BRCM_CHAR_DRIVERS=y
CONFIG_BCM_VCIO=y
CONFIG_BCM_VC_SM=y
CONFIG_BCM2835_DEVGPIOMEM=y
CONFIG_RPIVID_MEM=y

Building vc_sm for 64bit is failing.

zub0r avatar Feb 11 '20 15:02 zub0r

Thanks for suggested approach, it helped. Closes #453

zub0r avatar Apr 01 '20 16:04 zub0r

Hi @zub0r is this still something you need?

floion avatar Feb 16 '22 02:02 floion

Momentarily not, the project came to a halt.

zub0r avatar Feb 16 '22 16:02 zub0r