[Buildroot] [PATCH 1/1] package/ti-k3-r5-loader: support patching in same way as u-boot

Bryan Brattlof bb at ti.com
Wed Jun 5 17:30:20 UTC 2024


On May 17, 2024 thus sayeth Marc Murphy:
> Hi Bryan,
> 
> > Hi Marc,
> > 
> > On May 16, 2024 thus sayeth Marc Murphy:
> > > Signed-off-by: Marc Murphy <marc.murphy at sancloud.com>
> > > ---
> > >  boot/ti-k3-r5-loader/Config.in          | 12 ++++++++++++
> > >  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 19 +++++++++++++++++++
> > >  2 files changed, 31 insertions(+)
> > >
> > > diff --git a/boot/ti-k3-r5-loader/Config.in
> > > b/boot/ti-k3-r5-loader/Config.in index c276528fad..0e26a15369 100644
> > > --- a/boot/ti-k3-r5-loader/Config.in
> > > +++ b/boot/ti-k3-r5-loader/Config.in
> > > @@ -69,6 +69,18 @@ config BR2_TARGET_TI_K3_R5_LOADER_VERSION
> > >  		if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT || \
> > >  		   BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG  || \
> > >  		   BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
> > > +
> > > +config BR2_TARGET_TI_K3_R5_LOADER_PATCH
> > > +	string "Custom U-Boot patches"
> > > +	default ""
> > > +	help
> > > +	  A space-separated list of patches to apply to U-Boot.
> > > +	  Each patch can be described as an URL, a local file path,
> > > +	  or a directory. In the case of a directory, all files
> > > +	  matching *.patch in the directory will be applied.
> > > +
> > > +	  Most users may leave this empty
> > > +
> > 
> > Thanks for the patch! Just trying to understand what we're trying to do.
> 
> When we use an external config (BR2_EXTERNAL) and specify the version of u-boot to use we need to apply platform specific patches we normally use:
> $BR2_EXTERNAL /board/board-type/patches/uboot
> 
> If we want to use a dedicated Ti release e.g. 08.06.00.007 and apply our patches to it, this is good for the normal uboot bootloader.  If we need to apply patches to the k3 bootloader it is not possible and buildroot checks out a dedicated folder for building:
> drwxr-xr-x  25 marc marc    4096 May 16 14:34 ti-k3-r5-loader-custom
> drwxr-xr-x  25 marc marc    4096 May 16 14:34 uboot-custom
> 
> We have dedicated board configs, device tree and some code changes that are not in mainline and need applying to both builds of uboot.
> If there is another way to do this I would appreciate the feedback.
> 

Ah yeah. I've been trying to find a way good way to do that myself. 
Ideally these packages should be exactly the same with a different cross 
compiler. My end goal is trying to find a way to short-circuit the DL 
path and the PATCH directory to point to U-Boot but I haven't found a 
way to do that yet. :/

This solution works for me as a stopgap for now but if you know of a way 
to point these variables to whatever uboot/ is using let me know

~Bryan


More information about the buildroot mailing list