All of lore.kernel.org
 help / color / mirror / Atom feed
From: buildroot@cairnwater.com
To: Fiona Klute <fiona.klute@gmx.de>
Cc: Buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] Adding Device Tree Overlays for MIPI-CSI2 Camera and libcamera to a buildroot Build
Date: Thu, 08 May 2025 08:46:57 +0100	[thread overview]
Message-ID: <e147c44847cdb3c965cbf99e41751d26@cairnwater.com> (raw)
In-Reply-To: <94c4f329-b903-49df-a1c2-8e91185469cc@gmx.de>

Hi Fiona,

Thank you very much - that's an enormous help - I'd have got very 
confused trying to work that out.

I'll study what you said and the links in detail and take more time to 
think about it.

Thank you very much again!

Will

On 2025-05-07 21:06, Fiona Klute wrote:
> Am 07.05.25 um 20:31 schrieb buildroot@cairnwater.com:
>> Hi Fiona,
>> 
>> Thank you very much! That's a big help to know to use 
>> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR for that.
>> 
>> What directory structure is needed for the overlays? Just the DTO 
>> files in a directory or something more complicated?
> 
> It's expected to match the structure of the per-arch dts directory in 
> the kernel source, with vendor directories. The 
> polyhex_debix_model_a_defconfig uses the freescale/imx8mp-debix-model-a 
> DTS, so inside your BR2_LINUX_KERNEL_CUSTOM_DTS_DIR you'll probably 
> need something like freescale/my-camera.dtso (whatever you want to call 
> your DTSOs, the DTBOs will match the source names).
> 
>>> From there you'll need to adjust the boot process for your board to 
>>> actually apply the overlay. If you want to send a patch, the 
>>> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR should be inside the board directory.
>> 
>> Thank you very much. I don't know how to do that. What's the best way 
>> to get the boot process to apply the overlay? I'd heard that it can be 
>> done by the kernel or by U-Boot but I'm doing this for the first time 
>> so I'm not sure what I'm doing.
> 
> I'm not familiar with the board, but usually U-Boot will be the right 
> place. On some boards (like RPi) the firmware can also do it (only 
> useful if U-Boot & kernel then use that FDT), last time I checked 
> mainline Linux cannot, but some patched kernels can. There are a number 
> of options with U-Boot, which one to pick depends on how you configure 
> the boot (at a glance the defconfig seems to use extlinux.conf):
> 
> * If you use extlinux.conf, use the "devicetree-overlay" option.
> * If you use a boot script, load the overlay and apply it before 
> starting the kernel.
> * If you use a FIT image, add the overlay to it and the relevant boot 
> config defined in it.
> 
> See also:
> https://docs.u-boot.org/en/latest/develop/distro.html (for 
> extlinux.conf)
> https://docs.u-boot.org/en/latest/usage/fdt_overlays.html (for the 
> latter 2 options)
> 
> Either way you may have to enable overlay support in the U-Boot build 
> config (if it isn't by default).
> 
> On the Buildroot side you need to make sure that the DTBOs and adjusted 
> config get included in the image where U-Boot expects them (depending 
> on the boot setup you use), if you need to make adjustments there it'll 
> probably be in a post-build or post-image script, or in the genimage 
> config.
> 
> The defconfig seems to put everything into the root partition image, so 
> it might just work, as long as you use the right path in the U-Boot 
> config. Maybe just set BR2_LINUX_KERNEL_CUSTOM_DTS_DIR, build, and see 
> if you end up with a DTBO somewhere in your /boot dir. If yes, 
> adjusting the U-Boot config to use it should be enough. ;-)
> 
> Best regards,
> Fiona
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-05-08  7:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 15:41 [Buildroot] Adding Device Tree Overlays for MIPI-CSI2 Camera and libcamera to a buildroot Build buildroot
2025-05-07 16:41 ` Fiona Klute via buildroot
2025-05-07 18:31   ` buildroot
2025-05-07 20:06     ` Fiona Klute via buildroot
2025-05-08  7:46       ` buildroot [this message]
2025-05-14 17:36         ` buildroot
2025-05-14 18:59           ` Edgar Bonet via buildroot
2025-05-15 16:11             ` buildroot
2025-05-21 17:17               ` Fiona Klute via buildroot
2025-05-21 17:26           ` Fiona Klute via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e147c44847cdb3c965cbf99e41751d26@cairnwater.com \
    --to=buildroot@cairnwater.com \
    --cc=buildroot@buildroot.org \
    --cc=fiona.klute@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.