* [Buildroot] Both cramfs + jffs2 in buildroot? @ 2008-10-08 12:52 Daniel Nyström 2008-10-09 0:42 ` Hamish Moffatt 2008-10-09 8:16 ` Hinko Kocevar 0 siblings, 2 replies; 5+ messages in thread From: Daniel Nyström @ 2008-10-08 12:52 UTC (permalink / raw) To: buildroot (Sorry if this has been a topic earlier, but it's really hard to search the mailing archive) Is it possible in Buildroot to make both a read-only rootfs and a second writable filesystem? A common setup is using cramfs for / and mounting a jffs2 on /mnt/flash, and then make a symlink of /etc to point at /mnt/flash/etc where all config files are writable. Is this possible to achive with Buildroot? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Both cramfs + jffs2 in buildroot? 2008-10-08 12:52 [Buildroot] Both cramfs + jffs2 in buildroot? Daniel Nyström @ 2008-10-09 0:42 ` Hamish Moffatt 2008-10-09 6:49 ` Daniel Nyström 2008-10-09 8:16 ` Hinko Kocevar 1 sibling, 1 reply; 5+ messages in thread From: Hamish Moffatt @ 2008-10-09 0:42 UTC (permalink / raw) To: buildroot On Wed, Oct 08, 2008 at 02:52:20PM +0200, Daniel Nystr?m wrote: > (Sorry if this has been a topic earlier, but it's really hard to search > the mailing archive) > > Is it possible in Buildroot to make both a read-only rootfs and a second > writable filesystem? > > A common setup is using cramfs for / and mounting a jffs2 on /mnt/flash, > and then make a symlink of /etc to point at /mnt/flash/etc where all > config files are writable. > > Is this possible to achive with Buildroot? No, there's no support for building two file systems with different contents. There might be better ways to handle this anyway, like copying /etc from the cramfs to the rw jffs2 on the first bootup? With regard to mounting /mnt/flash/etc onto /etc, I don't think a symlink will work - you need to use/run stuff from /etc before the second file system can be mounted. I suggest a minimal /etc in the root, enough to get the other file system mounted, and then "mount --bind" the new /etc over the top. Hamish -- Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Both cramfs + jffs2 in buildroot? 2008-10-09 0:42 ` Hamish Moffatt @ 2008-10-09 6:49 ` Daniel Nyström 0 siblings, 0 replies; 5+ messages in thread From: Daniel Nyström @ 2008-10-09 6:49 UTC (permalink / raw) To: buildroot It already works perfectly. I've got a /linuxrc script which not only mounts /etc for init to takeover, but also checks the integrity of the jffs2 fs before mounting as well as look out for a upgrade request if the rootfs has been upgraded (in case it's incompatible with the older jffs2 fs). It even check if the "factory reset"-button is held down, and the rewrites the jffs2 fs. The rootfs always contains a default image of the jffs2 fs. Since it's very small, it doesn't require much disk space. I'd like to recommend a look at Axis ETRAX SDK which does this really in a very nice way, and that's from where I got my inspiration. I hope this will be possible with Buildroot some day, because it both ease for firmware upgrades and makes the product failsafe (in case of a corrupted /etc, it will be rewritten). Regards Daniel Hamish Moffatt wrote: > On Wed, Oct 08, 2008 at 02:52:20PM +0200, Daniel Nystr?m wrote: >> (Sorry if this has been a topic earlier, but it's really hard to search >> the mailing archive) >> >> Is it possible in Buildroot to make both a read-only rootfs and a second >> writable filesystem? >> >> A common setup is using cramfs for / and mounting a jffs2 on /mnt/flash, >> and then make a symlink of /etc to point at /mnt/flash/etc where all >> config files are writable. >> >> Is this possible to achive with Buildroot? > > No, there's no support for building two file systems with different > contents. > > There might be better ways to handle this anyway, like copying /etc from > the cramfs to the rw jffs2 on the first bootup? > > With regard to mounting /mnt/flash/etc onto /etc, I don't think a > symlink will work - you need to use/run stuff from /etc before the > second file system can be mounted. I suggest a minimal /etc in the root, > enough to get the other file system mounted, and then "mount --bind" the > new /etc over the top. > > > Hamish ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Both cramfs + jffs2 in buildroot? 2008-10-08 12:52 [Buildroot] Both cramfs + jffs2 in buildroot? Daniel Nyström 2008-10-09 0:42 ` Hamish Moffatt @ 2008-10-09 8:16 ` Hinko Kocevar 2008-10-10 3:29 ` Hamish Moffatt 1 sibling, 1 reply; 5+ messages in thread From: Hinko Kocevar @ 2008-10-09 8:16 UTC (permalink / raw) To: buildroot Daniel Nystr?m wrote: > (Sorry if this has been a topic earlier, but it's really hard to search > the mailing archive) > > Is it possible in Buildroot to make both a read-only rootfs and a second > writable filesystem? > > A common setup is using cramfs for / and mounting a jffs2 on /mnt/flash, > and then make a symlink of /etc to point at /mnt/flash/etc where all > config files are writable. > > Is this possible to achive with Buildroot? Why not. You'll need to look at the target/jffs2.mk and target/cramfs.mk. Maybe buildroot code has to be modified to allow both fs being built at once. Also kernel configuration must be fixed to support one more MTD partition. Provide your own boot scripts and implement the logic of mounting the jffs etc. HTH, Hinko -- ?ETRTA POT, d.o.o., Kranj Planina 3 4000 Kranj Slovenia, Europe Tel. +386 (0) 4 280 66 03 E-mail: hinko.kocevar at cetrtapot.si Http: www.cetrtapot.si ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Both cramfs + jffs2 in buildroot? 2008-10-09 8:16 ` Hinko Kocevar @ 2008-10-10 3:29 ` Hamish Moffatt 0 siblings, 0 replies; 5+ messages in thread From: Hamish Moffatt @ 2008-10-10 3:29 UTC (permalink / raw) To: buildroot On Thu, Oct 09, 2008 at 10:16:29AM +0200, Hinko Kocevar wrote: > You'll need to look at the target/jffs2.mk and target/cramfs.mk. Maybe > buildroot code has to be modified to allow both fs being built at once. > Also kernel configuration must be fixed to support one more MTD > partition. Provide your own boot scripts and implement the logic of > mounting the jffs etc. buildroot already allows you to enable as many different target filesystems as you like, but they will all contain the same thing - the root file system. Daniel wanted to put /etc on a different file system but some people might want to put some packages elsewhere etc.. it would be quite complicated to build a configuration system for this. Perhaps the hint is in the name "buildroot" ;) Hamish -- Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-10 3:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-08 12:52 [Buildroot] Both cramfs + jffs2 in buildroot? Daniel Nyström 2008-10-09 0:42 ` Hamish Moffatt 2008-10-09 6:49 ` Daniel Nyström 2008-10-09 8:16 ` Hinko Kocevar 2008-10-10 3:29 ` Hamish Moffatt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox