From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1BA4C3ABC0 for ; Thu, 8 May 2025 07:47:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 4188580D62; Thu, 8 May 2025 07:47:06 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id MCeTdgjxqf4E; Thu, 8 May 2025 07:47:05 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4869780D71 Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 4869780D71; Thu, 8 May 2025 07:47:05 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 9F5831A9 for ; Thu, 8 May 2025 07:47:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9C8EC40B08 for ; Thu, 8 May 2025 07:47:03 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 0RSz_PHG9K9C for ; Thu, 8 May 2025 07:47:02 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.175.196.64; helo=euk33.eukhosting.net; envelope-from=buildroot@cairnwater.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org D177B40342 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D177B40342 Received: from euk33.eukhosting.net (euk33.eukhosting.net [213.175.196.64]) by smtp2.osuosl.org (Postfix) with ESMTPS id D177B40342 for ; Thu, 8 May 2025 07:47:00 +0000 (UTC) Received: from [::1] (port=51448 helo=euk33.eukhosting.net) by euk33.eukhosting.net with esmtpa (Exim 4.98.1) (envelope-from ) id 1uCvy5-0000000FhUe-2EEn; Thu, 08 May 2025 08:46:57 +0100 MIME-Version: 1.0 Date: Thu, 08 May 2025 08:46:57 +0100 From: buildroot@cairnwater.com To: Fiona Klute Cc: Buildroot In-Reply-To: <94c4f329-b903-49df-a1c2-8e91185469cc@gmx.de> References: <94c4f329-b903-49df-a1c2-8e91185469cc@gmx.de> User-Agent: Roundcube Webmail/1.6.9 Message-ID: X-Sender: buildroot@cairnwater.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - euk33.eukhosting.net X-AntiAbuse: Original Domain - buildroot.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - cairnwater.com X-Get-Message-Sender-Via: euk33.eukhosting.net: authenticated_id: buildroot@cairnwater.com X-Authenticated-Sender: euk33.eukhosting.net: buildroot@cairnwater.com X-Source: X-Source-Args: X-Source-Dir: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cairnwater.com; s=default; h=Content-Transfer-Encoding:Content-Type: Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jFP4JzIb4kaJgS8IXbn65AoPNBiViVeoFNPp5uwUTOs=; b=oG7hPwp0VgzqUG2gVWTitpHlrC SiPltm9PY2EvSheF94AK2bvs1YoUASgt7pPPwwHu1s6yUt0D6MZ098AlMB4Co8KzS8KkIHeg7aBpX +VPqYR5V7t32G9UoyJh319B6t+LHXHR9WuDYs8ftWTmLqpA6wpIMjOk9d93s5O3R6OGJlQVnuFV3k av6WuWLH38pK9TvFuaY5W3uwfo7+QBzpgiPlKTdEmLuzjQ2ehsGaP9IhjOasp4Gwq4GPNfXc8szCz VjgbTwUGjaD2yqeeo61RBzgvRchKloWJVHpQFURZjMJNkFx9fNcMddO+XoCiMnhX7PJ3ciql+0W1B WKoG8B+g==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=none (p=none dis=none) header.from=cairnwater.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=cairnwater.com header.i=@cairnwater.com header.a=rsa-sha256 header.s=default header.b=oG7hPwp0 Subject: Re: [Buildroot] Adding Device Tree Overlays for MIPI-CSI2 Camera and libcamera to a buildroot Build X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" 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