Camera not detected after rootfs encryption

Hi. I’ve faced unusual problem and for now can’t solve it. Mb someone had similar experience and can share the solution.

I’ve installed Zymkey4 as mentioned in official doc (Quickstart - ZYMKEY4 |).
Everything works fine.
Then I add camera for my application. It works fine and detected.
Then I do full rootfs encryption just like said in the doc (Encrypting Root File System with Zymbit Security Modules |). It works fine and now system boots only with zymkey.
But camera is not detected anymore (it worked fine before encryption).

$ libcamera-still --list
No cameras available!

And I can’t make it work. It’s not detected anymore though all overlays mentioned correct in config.txt file.
I think it’s some kind of i2c problem because camera slot shares i2c bus with zymkey, but I checked before encryption and both camera worked fine and zymkey worked fine (was detected and passed basic tests) and by specs i2c can share multiple devices on the same bus.

If some had similar problem please help. Or if you know what it is.
If some files needed to provide to help just let me know plz.
Thanks beforehand guys.

1 Like

@c1ph3r - I think what you need to do is make sure your camera module is included in your initramfs. For instance, if you’re using the picam2 which uses imx219 module, include that in /etc/initramfs-tools/modules,

echo "imx219" >> /etc/initramfs-tools/modules

If you do that before you run the mk_encr_sd_rfs.sh script, it should pick up the module and the camera should work after encryption.

You can also do it after encryption but you will need to run update-initramfs -u and then copy the new initramfs8 (or initramfs_2712 on Pi5) to initrd.img, since that is what is configured to load from config.txt (initramfs initrd.img followkernel) from our encryption script.

Try that and see if it works.