From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from optimeas.de ([78.46.18.2]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TxEHa-0003Ps-Q2 for ptxdist@pengutronix.de; Mon, 21 Jan 2013 11:07:15 +0100 Received: from [127.0.0.1] (ip-109-90-243-32.unitymediagroup.de [109.90.243.32]) by optimeas.de (Postfix) with ESMTPSA id 2120F4207A56 for ; Mon, 21 Jan 2013 11:07:09 +0100 (CET) From: "Matthias Klein" Date: Mon, 21 Jan 2013 10:07:09 +0000 Message-Id: Mime-Version: 1.0 Subject: [ptxdist] Creating links in the root filesystem Reply-To: ptxdist@pengutronix.de, Matthias Klein List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0464317655==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de --===============0464317655== Content-Type: multipart/alternative; boundary="------=_MB94628BBE-A2A6-4F62-9E7B-8FE08031FF90" --------=_MB94628BBE-A2A6-4F62-9E7B-8FE08031FF90 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; format=flowed; charset=utf-8 Hello, I try to put links into the read-only rootfs which should point into a=20 RAM filesystem. For example I want to put the resolv.conf file into the tmpfs which is=20 mounted at /tmp that the DHCP client can modify that file at runtime. I tried to create a link in the projectroot: cd projectroot/etc ln -s ../tmp/resolv.conf resolv.conf But then I get the following error with a "ptx go": ------------------------------------- target: os-release.targetinstall.post ------------------------------------- finished target os-release.targetinstall.post make: *** No rule to make target=20 `/home/user/development/bsp/branch2_tx53/projectroot/etc/resolv.conf',=20 needed by=20 `/home/user/development/bsp/branch2_tx53/platform-optimeas-tx53/state/rootf= s.targetinstall'.=20 Stop. If I create an empty file at projectroot/tmp/resolv.conf the file will=20 be copied in the rootfs instead if the link... What is the right way to create such links? If I create an own package (in + rule) which creates these links, how=20 can I ensure that my package is called as the last package to overwrite=20 files from other packages ? Best regards, Matthias --------=_MB94628BBE-A2A6-4F62-9E7B-8FE08031FF90 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Hello,
 
I try to put links into the read-only rootfs which should point into= a RAM filesystem.
For example I want to put the resolv.conf file into the tmpfs which= is mounted at /tmp that the DHCP client can modify that file at runtime.
 
I tried to create a link in the projectroot:
 
cd projectroot/etc
ln -s ../tmp/resolv.conf resolv.conf
 
 
But then I get the following error with a "ptx go":
 
-------------------------------------
target: os-release.targetinst= all.post
-------------------------------------
 
finished target os-release.targetinstall.post
make: *** No rule = to make target `/home/user/development/bsp/branch2_tx53/projectroot/etc/res= olv.conf', needed by `/home/user/development/bsp/branch2_tx53/platform-opti= meas-tx53/state/rootfs.targetinstall'.  Stop.
 
If I create an empty file at projectroot/tmp/resolv.conf the file will= be copied in the rootfs instead if the link...
 
 
What is the right way to create such links?
If I create an own package (in + rule) which creates these links, how= can I ensure that my package is called as the last package to overwrite= files from other packages ?
 
 
Best regards,
 
Matthias
 
--------=_MB94628BBE-A2A6-4F62-9E7B-8FE08031FF90-- --===============0464317655== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============0464317655==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1TxFV0-0008Re-2r for ptxdist@pengutronix.de; Mon, 21 Jan 2013 12:25:10 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1TxFV0-0003tp-1B for ptxdist@pengutronix.de; Mon, 21 Jan 2013 12:25:10 +0100 Date: Mon, 21 Jan 2013 12:25:10 +0100 From: Michael Olbrich Message-ID: <20130121112510.GC4597@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] Creating links in the root filesystem Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Hi, On Mon, Jan 21, 2013 at 10:07:09AM +0000, Matthias Klein wrote: > I try to put links into the read-only rootfs which should point into > a RAM filesystem. > For example I want to put the resolv.conf file into the tmpfs which > is mounted at /tmp that the DHCP client can modify that file at > runtime. > > I tried to create a link in the projectroot: > > cd projectroot/etc > ln -s ../tmp/resolv.conf resolv.conf > > > But then I get the following error with a "ptx go": > > ------------------------------------- > target: os-release.targetinstall.post > ------------------------------------- > > finished target os-release.targetinstall.post > make: *** No rule to make target `/home/user/development/bsp/branch2_tx53/projectroot/etc/resolv.conf', > needed by `/home/user/development/bsp/branch2_tx53/platform-optimeas-tx53/state/rootfs.targetinstall'. > Stop. With 'install_alternative' ptxdist follows links and tries to install the contents, so this cannot work. > If I create an empty file at projectroot/tmp/resolv.conf the file > will be copied in the rootfs instead if the link... For /etc/resolv.conf newer versions of ptxdist have an option to make it a link to /run/resolv.conf, which is a better location as /tmp/. > What is the right way to create such links? @$(call install_link, rootfs, /run/resolv.conf, /etc/resolv.conf) > If I create an own package (in + rule) which creates these links, > how can I ensure that my package is called as the last package to > overwrite files from other packages ? That's not possible. But you can disable all files in rootfs and install you're one versions with install_link. For everything else you need to copy the rules into your BSP and modify them. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de