[coreboot] using overlayfs to have several coreboot dev envs

Charlotte Plusplus pluspluscharlotte at gmail.com
Sun Nov 13 21:34:49 CET 2016


Hello

With the cross compiling tool chain, coreboot takes 1G. If you are a bit
short on space, or if you want to save writes to your SSD, instead of
having multiple copies of the coreboot source folder, I have found out
overlayfs is very practical.

If you have done git clone in /opt/coreboot/src/, simply create 4 extra
folders there:
coreboot-normal
coreboot-fallback
coreboot-normal.upper
coreboo-fallback.upper

The first 2 will contain a pseudo filesystem, the last 2 will contain the
files that uniquely different between your versions

Then run:

mount -t overlayfs overlay -o lowerdir=/opt/coreboot/src/
coreboot,upperdir=/opt/coreboot/src/coreboot-normal.upper
/opt/coreboot/src/coreboot-normal
mount -t overlayfs overlay -o lowerdir=/opt/coreboot/src/
coreboot,upperdir=/opt/coreboot/src/coreboot-fallback.upper/
/opt/coreboot/src/coreboot-fallback

You can have as many as you want in parallel. Useful if you are testing a
feature but want to alternate quickly without having to recompile the other
branch

When you are done, umount your folders, you will see your changes are only
in the .upper folder. The original folder will not be affected.

Charlotte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20161113/f84b6a8d/attachment.html>


More information about the coreboot mailing list