From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 04 Feb 2022 15:47:51 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nFzsN-005bh1-L3 for lore@lore.pengutronix.de; Fri, 04 Feb 2022 15:47:51 +0100 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 1nFzsM-000451-OU; Fri, 04 Feb 2022 15:47:50 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFzs3-00044s-Og; Fri, 04 Feb 2022 15:47:31 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nFzs3-00018L-23; Fri, 04 Feb 2022 15:47:31 +0100 Date: Fri, 4 Feb 2022 15:47:31 +0100 From: Michael Olbrich To: Christian Melki Message-ID: <20220204144731.GN11273@pengutronix.de> Mail-Followup-To: Christian Melki , ptxdist@pengutronix.de References: <20220114115647.2049883-1-christian.melki@t2data.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 15:31:46 up 55 days, 23:17, 90 users, load average: 0.16, 0.12, 0.10 User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] [PATCH] image-hdimg.make: Add PROJECT and PROJECT_VERSION variables. 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: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 On Fri, Feb 04, 2022 at 02:13:53PM +0100, Christian Melki wrote: > On 1/21/22 9:19 AM, Michael Olbrich wrote: > > On Fri, Jan 14, 2022 at 12:56:47PM +0100, Christian Melki wrote: > > > Ideally, I'd like this to be in the generic genimage env. > > > I need this to be able to name images according to the project. > > > > I don't really like adding random stuff here. And it's easy to expand this > > locally: > > > > IMAGE_HDIMG_ENV += \ > > PROJECT=$(PTXCONF_PROJECT) \ > > PROJECT_VERSION=$(PTXCONF_PROJECT_VERSION) > > > > In rules/image-hdimg..make in your BSP since ptxdist-2021.12.0 or in > > rules/post/.make before that. > > So you don't need to overwrite the upstream rule entirely and it's easy to > > maintain. > > > > Michael > > > > Is there some form of documentation on this somewhere? Unfortunately not yet. > An example? Say I want to add a file to the weston targetinstall? > Can that be used for such things? > Is the weston.something.make a copy of the original? What needs to be in > this file? > Does it override the entire target? For example targetinstall? It does not override anything. The ..make has two features: 1. It is always included directly after .make. This means that any variable defined in .make is already defined when ..make. This helps for anything where the parse order in make is relevant. 2. As an individual file, it has the same override mechanism as .make. The rest is just make syntax. 'targetinstall' is a make target. Redefining a make target results in a warning from make and the new definition replaces the old one. So there is no way to expand it. To change 'targetinstall' like that you need a full copy of .make in your BSP. PTXdist will then use that one instead. What you can du in ..make is change variables. This works because the variables used in a make target are expanded when the target is executed. At that point all files are parsed and the variables have whatever value was assigned last. Michael > > So many questions. :) > > > > Signed-off-by: Christian Melki > > > --- > > > rules/image-hdimg.make | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/rules/image-hdimg.make b/rules/image-hdimg.make > > > index b470c0fb6..6f0012a85 100644 > > > --- a/rules/image-hdimg.make > > > +++ b/rules/image-hdimg.make > > > @@ -57,6 +57,8 @@ IMAGE_HDIMG_ENV = \ > > > PARTITION_TABLE_TYPE=$(call ptx/ifdef, PTXCONF_IMAGE_HDIMG_GPT,gpt,mbr) \ > > > PARTITION_TYPE_SUFFIX=$(call ptx/ifdef, PTXCONF_IMAGE_HDIMG_GPT,-uuid) \ > > > ROOT_PARTITION_TYPE=$(call ptx/ifdef, PTXCONF_IMAGE_HDIMG_GPT,L,0x83) \ > > > + PROJECT=$(PTXCONF_PROJECT) \ > > > + PROJECT_VERSION=$(PTXCONF_PROJECT_VERSION) \ > > > $(IMAGE_HDIMG_BOOTLOADER_ENV) > > > $(IMAGE_HDIMG_IMAGE): > > > -- > > > 2.30.2 > > > > > > > > > _______________________________________________ > > > ptxdist mailing list > > > ptxdist@pengutronix.de > > > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > > > > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de