agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
510 stars 398 forks source link

Add support for Raspberry Pi Camera Module v3 to Kirkstone (compatibility patch) #1197

Open Jessseee opened 1 year ago

Jessseee commented 1 year ago

The imx708 devicetree layer is required for use of the Raspberry Pi Camera Module v3. This was implemented in #1158 on master. However, the dts file is not included with Kernel 5.10. Therefore, to port these changes to Kirkstone, I added a dynamic layer to install the imx708 devicetree overlay when building for Linux kernel 5.10. Also see #1172 for more context.

agherzan commented 1 year ago

Could you add the rationale and context in the description?

agherzan commented 1 year ago

Reopened as I've closed it by mistake.

Jessseee commented 1 year ago

Could you add the rationale and context in the description?

I hope this is clear enough.

mhazley commented 9 months ago

@Jessseee made it here from the Balena thread? Any way we can help get this over the line, we'd like to use camera v3 on Balena OS on Pi4

agherzan commented 9 months ago

I'm generally happy with this, but we will need to first land it via a review in master. It looks good to me otherwise.

mhazley commented 9 months ago

I'm generally happy with this, but we will need to first land it via a review in master. It looks good to me otherwise.

Is is possible this is already done via #1158?

agherzan commented 9 months ago

That's what I hoped and thought, but this seems to include more things. @Jessseee can you explain the backport so I understand where we are with this?

I suspect it is something along the "we don't have the right dtb in the kirkstone kernel versions" but I would expect a bbappend to our recipes not an external layer.

mhazley commented 9 months ago

but this seems to include more things

Sorry, I completely missed that!

Jessseee commented 9 months ago

I am quite new to working with yocto, so I am not quite sure what the best approach is. However, my idea was that because the dts file is completely missing from Kernel 5.10 it has to be externally added.

agherzan commented 9 months ago

That makes sense @Jessseee. I think the best would be to introduce it in the kernel recipes we have in the layer - linux-raspberrypi ones.

mhazley commented 9 months ago

@Jessseee I think you can just make your bbappend for the dts recipes-kernel/linux/linux-raspberrypi_%.bbappend and it will apply the append to both the 5.10 and the 5.15 recipes.

I am quite new to yocto too, but I patched a dtoverlay in a similar way in BalenaOS once.

Jessseee commented 9 months ago

@mhazley The problem is that the devicetree files should only be added to linux-raspberrypi-dev and raspberrypi-5.10, because I think you will run into issues with 5.15 as it already has these files. As @agherzan said, they need to be added directly to the kernel recipes. Also, I found out that apparently the devicetree layer also needs a dtsi file.

ScottGibb commented 9 months ago

@agherzan Is there any update on this approved? Also thank you for doing the work and adding it to the meta-raspberrypi layer!

agherzan commented 9 months ago

@Jessseee This looks good. One last request: can you please squash "imx708: Add compatibility layer " into "recipe-bsp: Add support for Raspberry Pi Camera Module v3". They make sense as one commit. Otherwise, I think we are good to go.

Jessseee commented 8 months ago

I squashed the commits and updated the branch.

compiaffe commented 4 months ago

What is the next step to get this merged in? @agherzan @Jessseee