mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Cc: Guillermo Rodriguez Garcia <guille.rodriguez@gmail.com>
Subject: Re: [ptxdist] [PATCH 0/2] Add u-boot template
Date: Fri, 27 Aug 2021 07:47:48 +0200	[thread overview]
Message-ID: <11171859.zAdYJvTbVr@ada> (raw)
In-Reply-To: <CABDcavbtnikGhiNaJXk1AxBiTgwe_YsuHHEUVu-_3YnyyhT53A@mail.gmail.com>

Hello Guillermo,

Am Donnerstag, 26. August 2021, 18:16:37 CEST schrieb Guillermo Rodriguez 
Garcia:
> Hi Alexandar,
> 
> El jue, 26 ago 2021 a las 14:25, Alexander Dahl (<ada@thorsis.com>)
> 
> escribió:
> > Hello Guillermo,
> > 
> > Am Thu, Aug 26, 2021 at 01:43:25PM +0200 schrieb Guillermo Rodriguez
> > 
> > Garcia:
> > > Hi Alexander,
> > > 
> > > El jueves, 26 de agosto de 2021, Alexander Dahl <ada@thorsis.com>
> > 
> > escribió:
> > > > Hei hei,
> > > > 
> > > > I crafted this in the last weeks for a DistroKit based generic BSP,
> > > > which uses U-Boot for half a dozen boards.  Maybe someone else finds
> > > > it
> > > > useful?
> > > 
> > > What does this do exactly, and how does it work?
> > 
> > This adds a new package type 'u-boot' to the `ptxdist newpackage`
> > command.  That newpackage command uses templates to create the
> > necessary rule files for a new package.  You can write your own
> > templates and add it to your BSP, too.
> > 
> > So why a package type 'u-boot' if there's already an u-boot package?
> > I had the idea when working with DistroKit [1] as a base layer for
> > another generic BSP.  You can build a BSP with a rootfs common to
> > different SoCs of the armv7 family and use a common kernel as well.
> > However bootloaders for different SoC families differ, so for such a
> > generic BSP you need to build different bootloaders, and what you do
> > then is duplicate those bootloaders packages in ptxdist with slighty
> > changed names/variables making them unique.  DistroKit for example has
> > multiple barebox packages.
> > 
> > Creating such packages by copy and paste and search and replace is
> > cumbersome and error prone, so I thought why not doing the same thing
> > pengutronix did with barebox for u-boot as well?!
> 
> This looks great. I am sure I have a use for this in my BSPs.
> 
> Is it possible to add these templates to my BSP without modifying ptxdist
> itself?

Yes.

> Where should the files be installed?

The templates go to 'rules/templates' or to 'configs/platform-foo/rules/
templates', I'm not sure however if there are constraints on file names, I 
just sticked with the scheme I found in distributed template files.  Have a 
look at patch 2/2 of the series.

You don't need to change 'scripts/lib/ptxd_lib_template.sh' however (like I 
did for upstreaming).  I have the same pieces (added lines) from that file in 
a separate script 'configs/platform-v7a/scripts/lib/ptxd_lib_u_boot.sh', but I 
think putting that just to 'scripts/lib' should also work?  Probably the 
script must have that 'ptxd_lib_' prefix, but I'm not sure about that.

Don't know if someone should put all that information into 'doc'?  At least my 
colleague already urged me to do so for our internal library/application 
rules?! *lol*

What might be interesting though is how you can add additional script pieces 
like I did in patch 1/2 for that u-boot-url thing, which I copied from 
barebox.  Or how you can extend those functions in scripts/lib with your own.  
But that's anothing topic.

HTH & Greets
Alex




_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


      parent reply	other threads:[~2021-08-27  5:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  8:48 Alexander Dahl
2021-08-26  8:48 ` [ptxdist] [PATCH 1/2] u-boot: Introduce make macro for URL Alexander Dahl
2021-08-26  8:48 ` [ptxdist] [PATCH 2/2] templates: Introduce new u-boot template Alexander Dahl
2021-09-03 15:23   ` Michael Olbrich
     [not found] ` <CABDcavZJN7-BmEKPi5s_r=J-vi=_5=-RHofjbsVgNmuBz5QPQg@mail.gmail.com>
2021-08-26 12:25   ` [ptxdist] [PATCH 0/2] Add " Alexander Dahl
     [not found]     ` <CABDcavbtnikGhiNaJXk1AxBiTgwe_YsuHHEUVu-_3YnyyhT53A@mail.gmail.com>
2021-08-27  5:47       ` Alexander Dahl [this message]

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=11171859.zAdYJvTbVr@ada \
    --to=ada@thorsis.com \
    --cc=guille.rodriguez@gmail.com \
    --cc=ptxdist@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox