From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: buildroot@buildroot.org, Ioana Ciornei <ciorneiioana@gmail.com>,
Brandon Maier <Brandon.Maier@collins.com>,
Vincent Jardin <vjardin@free.fr>, Julien Olivain <ju.o@free.fr>,
Romain Naour <romain.naour@smile.fr>,
Akhilesh Nema <nemaakhilesh@gmail.com>
Subject: Re: [Buildroot] [PATCH v2 15/18] package/qoriq-mc-utils: new package
Date: Tue, 22 Apr 2025 23:31:57 +0200 [thread overview]
Message-ID: <20250422233157.27a969d7@windsurf> (raw)
In-Reply-To: <20250328180427.3434693-16-olteanv@gmail.com>
Hello Vlad,
Thanks for the v2, which I have applied. I have some comments below,
though.
On Fri, 28 Mar 2025 20:04:23 +0200
Vladimir Oltean <olteanv@gmail.com> wrote:
> The configuration files for the MC firmware binary are distributed
> through a separate repository on GitHub, and need a different package.
> They are licensed differently than the firmware itself, and unlike the
> firmware, they are customizable.
>
> There are two ways for a board to use this package - similar to
> qoriq-rcw. If it is an NXP reference board or if the example files
> otherwise work fine with it, it is recommended to set the _INTREE
> variables to select a pre-existing DPL and DPC. Otherwise, if it is a
> custom board, the best solution is to just provide the DPL and DPC dts
> files in board/, and set the _CUSTOM_PATH variables to point to them.
>
> There are also two ways to deploy to the target.
>
> Traditionally in NXP BSPs, U-Boot loads the MC firmware, DPL and DPC
> from given offsets in the storage medium (outside of the filesystem).
> But this is not hardcoded and it doesn't have to be the case - the
> mcinitcmd U-Boot environment variable is freely customizable. What can
> also be done, and is done for the LX2160A-RDB, is to deploy multiple DPL
> and DPC files (all the files available for a board) to a folder of the
> rootfs, and just have two symlinks: dpl.dtb and dpc.dtb which point to
> the currently active files. This makes easier the processes of
> upgrading, downgrading and keeping multiple file versions.
>
> Nonetheless, the "traditional" method of deploying to the target is also
> possible. The selected DPL and DPC files are deployed to the "images"
> folder and are freely usable with genimage or other post-image scripts.
Very nice commit log, really. It does help people like me, who are not
familiar with the details of QorIQ platforms, understand why the
package is done like this. So clearly thanks a lot for this commit log
(the one on qoriq-mc-binary was equally useful).
> +QORIQ_MC_UTILS_VERSION = 10.39.0
> +QORIQ_MC_UTILS_SITE = $(call github,nxp-qoriq,mc-utils,mc_release_$(QORIQ_MC_UTILS_VERSION))
> +QORIQ_MC_UTILS_LICENSE = BSD-3-Clause
> +QORIQ_MC_UTILS_INSTALL_IMAGES = YES
> +ifeq ($(BR2_PACKAGE_QORIQ_MC_UTILS_TARGET_INSTALL_PATH),)
> +QORIQ_MC_UTILS_INSTALL_TARGET = NO
> +endif
For the same reason as for qoriq-mc-binary, this couldn't work as
$(BR2_PACKAGE_QORIQ_MC_UTILS_TARGET_INSTALL_PATH) is never empty.
> +QORIQ_MC_UTILS_DEPENDENCIES = host-dtc
> +
> +QORIQ_MC_UTILS_DPC_FILES = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPC_CUSTOM_PATH))
> +QORIQ_MC_UTILS_DPC_INTREE = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPC_INTREE))
> +QORIQ_MC_UTILS_DPL_FILES = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPL_CUSTOM_PATH))
> +QORIQ_MC_UTILS_DPL_INTREE = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPL_INTREE))
> +QORIQ_MC_UTILS_INSTALL_PATH = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_TARGET_INSTALL_PATH))
> +
> +define QORIQ_MC_UTILS_INSTALL_FILES
> + $(foreach file, $(QORIQ_MC_UTILS_DPC_FILES) $(QORIQ_MC_UTILS_DPL_FILES), \
> + PATH=$(BR_PATH) dtc -I dts -O dtb $(file).dts -o $(1)/$(notdir $(file)).dtb; )
> + $(foreach file, $(QORIQ_MC_UTILS_DPC_INTREE) $(QORIQ_MC_UTILS_DPL_INTREE), \
> + $(INSTALL) -D $(@D)/config/$(file).dtb $(1)/$(notdir $(file)).dtb; )
Nit: I dropped the ; and moved the parenthesis to the next line, as
this is usually how we format such loops in Buildroot.
However, initially I was confused: you were not doing anything with the
external DPC/DPL files, so I was wondering how the BUILD_CMDS could do
something with them. Turns out you can actually build them "manually"
with dtc at install time.
So I was initially a bit hesitant: I think it would have made more
sense to actually build those files in the build step, and only do the
installation at the install step. Right now, you might be building them
twice (once when installing to images, once when installing to target).
Sure thing, a dtc run isn't long, so performance-wise not a problem.
But if we imagine that DTC was stored a timestamp in the .dtb, then the
.dtb in images/ and target/ would be different. Not super nice, but
overall I decided that it was a bit bike-shedding, so I applied your
patch as-is. But I thought it was worth sharing my thoughts
nevertheless.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2025-04-22 21:32 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 18:04 [Buildroot] [PATCH v2 00/18] Layerscape uprev to lf-6.12.3-1.0.0, initial LX2160A-RDB support Vladimir Oltean
2025-03-28 18:04 ` [Buildroot] [PATCH v2 01/18] configs/ls1046a-frwy: enable the fmc package and dependencies Vladimir Oltean
2025-04-12 14:21 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 02/18] configs/ls1046a-rdb: " Vladimir Oltean
2025-04-12 14:21 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 03/18] configs/ls1043a-rdb: " Vladimir Oltean
2025-04-12 14:22 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 04/18] package/qoriq-cadence-dp-firmware: sync with NXP Yocto download site Vladimir Oltean
2025-04-13 9:44 ` Julien Olivain
2025-04-14 9:11 ` Vladimir Oltean
2025-03-28 18:04 ` [Buildroot] [PATCH v2 05/18] configs/ls1028ardb: update to lf-6.12.3-1.0.0 tag Vladimir Oltean
2025-04-13 9:45 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 06/18] configs/ls1046a-frwy: bump BSP tag to lf-6.12.3-1.0.0 Vladimir Oltean
2025-04-13 9:46 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 07/18] configs/ls1046a-rdb: " Vladimir Oltean
2025-04-13 9:46 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 08/18] configs/ls1043a-rdb: " Vladimir Oltean
2025-04-13 9:47 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 09/18] package/qoriq-rcw: bump " Vladimir Oltean
2025-04-13 9:47 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 10/18] package/fmlib: uprev " Vladimir Oltean
2025-04-13 9:48 ` Julien Olivain
2025-04-14 9:13 ` Vladimir Oltean
2025-03-28 18:04 ` [Buildroot] [PATCH v2 11/18] package/fmc: uprev to lf-6.12 Vladimir Oltean
2025-04-13 9:48 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 12/18] package/qoriq-fm-ucode: uprev to lf-6.12.3-1.0.0 Vladimir Oltean
2025-04-13 9:49 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 13/18] package/qoriq-ddr-phy-binary: new package Vladimir Oltean
2025-04-13 14:04 ` Julien Olivain
2025-03-28 18:04 ` [Buildroot] [PATCH v2 14/18] package/qoriq-mc-binary: " Vladimir Oltean
2025-04-22 21:17 ` Thomas Petazzoni via buildroot
2025-03-28 18:04 ` [Buildroot] [PATCH v2 15/18] package/qoriq-mc-utils: " Vladimir Oltean
2025-04-22 21:31 ` Thomas Petazzoni via buildroot [this message]
2025-03-28 18:04 ` [Buildroot] [PATCH v2 16/18] package/qoriq-restool: " Vladimir Oltean
2025-04-22 21:36 ` Thomas Petazzoni via buildroot
2025-04-24 12:01 ` Vladimir Oltean
2025-03-28 18:04 ` [Buildroot] [PATCH v2 17/18] package/qoriq-firmware-inphi: " Vladimir Oltean
2025-04-22 21:39 ` Thomas Petazzoni via buildroot
2025-03-28 18:04 ` [Buildroot] [PATCH v2 18/18] board/lx2160ardb: new platform Vladimir Oltean
2025-03-29 2:09 ` Vincent Jardin
2025-03-31 10:39 ` Vladimir Oltean
2025-03-31 21:11 ` Vincent Jardin
2025-04-01 8:14 ` Vladimir Oltean
2025-04-02 21:38 ` Vincent Jardin
2025-04-22 21:48 ` Thomas Petazzoni via buildroot
2025-04-22 21:45 ` Thomas Petazzoni via buildroot
2025-05-17 17:35 ` Vladimir Oltean
2025-05-18 15:41 ` Vincent Jardin
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=20250422233157.27a969d7@windsurf \
--to=buildroot@buildroot.org \
--cc=Brandon.Maier@collins.com \
--cc=ciorneiioana@gmail.com \
--cc=ju.o@free.fr \
--cc=nemaakhilesh@gmail.com \
--cc=olteanv@gmail.com \
--cc=romain.naour@smile.fr \
--cc=thomas.petazzoni@bootlin.com \
--cc=vjardin@free.fr \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox