mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Creating links in the root filesystem
Date: Mon, 21 Jan 2013 12:25:10 +0100	[thread overview]
Message-ID: <20130121112510.GC4597@pengutronix.de> (raw)
In-Reply-To: <eme40360d6-d033-4262-8ce6-c78a44ee464d@nb-mak>

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

      reply	other threads:[~2013-01-21 11:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 10:07 Matthias Klein
2013-01-21 11:25 ` Michael Olbrich [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=20130121112510.GC4597@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --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