From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 27 Aug 2021 07:48:37 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mJUjF-0007zE-VZ for lore@lore.pengutronix.de; Fri, 27 Aug 2021 07:48:37 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mJUjF-0003AE-MV; Fri, 27 Aug 2021 07:48:37 +0200 Received: from mail.thorsis.com ([92.198.35.195]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJUib-0003A0-QR for ptxdist@pengutronix.de; Fri, 27 Aug 2021 07:48:01 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id 70C75DA8 for ; Fri, 27 Aug 2021 07:47:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LqWtrLCknuZV for ; Fri, 27 Aug 2021 07:47:51 +0200 (CEST) Received: by mail.thorsis.com (Postfix, from userid 109) id 9B613F34; Fri, 27 Aug 2021 07:47:51 +0200 (CEST) From: Alexander Dahl To: ptxdist@pengutronix.de Date: Fri, 27 Aug 2021 07:47:48 +0200 Message-ID: <11171859.zAdYJvTbVr@ada> In-Reply-To: References: <20210826084842.21421-1-ada@thorsis.com> X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] [PATCH 0/2] Add u-boot template X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Guillermo Rodriguez Garcia MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 () > = > escribi=F3: > > 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 > > = > > escribi=F3: > > > > 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', bu= t 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 piece= s = 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 ow= n. = 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@p= engutronix.de