Gentoo Archives: gentoo-embedded

From: Ed W <lists@××××××××××.com>
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] quickpkg and PKG_INSTALL_MASK
Date: Mon, 23 Jan 2012 19:03:47
In Reply to: Re: [gentoo-embedded] quickpkg and PKG_INSTALL_MASK by Joakim Tjernlund
On 26/12/2011 18:03, Joakim Tjernlund wrote:
> I am contemplating a greater problem too. Our system require we can install > multiple versions of our SW and switch between them. This is easy to do when it > comes to our own app but not when one want to upgrade core parts of the system, like > libc etc. > > So I am thinking one could use --bind mounts and switch_root to solve that. Basically > one has a skeleton root FS with /bin, /lib, /usr /opt etc. > Each upgrade goes into dirs like: > bin_1.x.y/ usr_1.x.y/ lib_1.x.y/ opt_1.x.y/ sbin_1.x.y/ > Then, from an initramfs, one selects which of xxx_1.x.y dir one wants to use > and --bind mounts them under the corresponding skeleton dir. >
I'm doing something like this using aufs. The performance seems "not bad", but you get a couple MB or so memory hit. (I'm using squashfs as well, so unsure which causes the main memory increase). I think if the device is reasonably beefy then you should have no problem with aufs or some similar overlay filesystem (I think some new one got added to kernel recently?). Failing that, what about good old "cp -a" to merge all the input dirs? Takes some time and disk space, but nice and simple? Good luck Ed W


Subject Author
Re: [gentoo-embedded] quickpkg and PKG_INSTALL_MASK Joakim Tjernlund <joakim.tjernlund@×××××××××.se>