From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from moutng.kundenserver.de ([212.227.126.187]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TU1WF-00066O-CT for ptxdist@pengutronix.de; Thu, 01 Nov 2012 21:37:40 +0100 Received: from idefix.lespocky.dyndns.org ([192.168.0.91] helo=[127.0.0.1]) by idefix.lespocky.dyndns.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1TU1W6-0005Na-CI for ptxdist@pengutronix.de; Thu, 01 Nov 2012 21:37:32 +0100 Message-ID: <5092DD86.1080501@lespocky.de> Date: Thu, 01 Nov 2012 21:37:26 +0100 From: Alexander Dahl MIME-Version: 1.0 References: In-Reply-To: Subject: Re: [ptxdist] UBIFS generation question Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1765887671==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1765887671== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig45EE58E6F8AD7B985E60E13B" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig45EE58E6F8AD7B985E60E13B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hei Jeff, On 01.11.2012 19:22, Jeff Horn wrote: > echo $(shell git rev-parse --verify HEAD) > $(ROOTDIR)/etc/revision I personally use `git describe --tags` for this, but that's more a question of taste. > That works fine for creating the file in the platform/root directory. = When > I started to use the UBI image I noticed that file was missing from my = root > filesystem. I see that the ubi.make script does a targetinstall to > platform/images/working_dir and then generates the UBI image from there= =2E > Which obviously does not have my revision. How can I fix/modify my li= ne > above so it makes it into both the root directory and the UBI image. What about creating the file in projectroot/etc/revision, putting a placeholder e.g. @REVISION@ in it and using something like this in your rule: @$(call install_alternative, somepackage, 0, 0, 0644, \ /etc/revision) @$(call install_replace, somepackage, /etc/revision, \ @REVISION@, $(shell git rev-pares --verify HEAD) ) Like this the file gets in the package file and should be installed in the UBI image. We have a similar approach working in our BSP. Greets Alex --------------enig45EE58E6F8AD7B985E60E13B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlCS3YoACgkQj7p3RMyHENBXkgCfQ6iLG+gW6XSKFOpPBncIyqxi ZagAoJRkPYoBNIyXaLLXGDaAU4NzkAHP =V5OH -----END PGP SIGNATURE----- --------------enig45EE58E6F8AD7B985E60E13B-- --===============1765887671== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============1765887671==--