From: Robert Schwebel <r.schwebel@pengutronix.de>
To: David VomLehn <dvomlehn@cisco.com>
Cc: Linus Walleij <linus.ml.walleij@gmail.com>,
linux-embedded@vger.kernel.org
Subject: Re: building Rootfs
Date: Wed, 9 Jul 2008 09:10:48 +0200 [thread overview]
Message-ID: <20080709071048.GW4319@pengutronix.de> (raw)
In-Reply-To: <48740BD2.6090000@cisco.com>
On Tue, Jul 08, 2008 at 05:52:34PM -0700, David VomLehn wrote:
> We do this all the time. We have a very minimal root filesystem and
> aren't currently using any of the frameworks for building root
> filesystems, so everything is done with make. In general, we create tar
> files for each piece. The piece that has device nodes has a make file
> with something like:
>
> all:
> fakeroot make fakeroot-package
>
> fakeroot-package:
> mkdir -p image
> mknod image/dev/null c 1 3
> mknod image/dev/random c 1 8
> tar -C image -czf image.tgz .
That does work fine when packaging the rootfs on the host. It was the
reason why we went the ipkg way: you can put device nodes into them.
> We ran into some issues when we separated running mknod and tar into
> separate fakeroot invocations because there is a bug in fakeroot with
> exporting and importing its state. Fortunately, doing all of this under a
> single fakeroot command works just fine. When we untar the tar files for
> all of the pieces to create a root filesystem image and then run mkcramfs
> to create a CRAMFS image, we do all commands under a single invocation of
> fakeroot.
>
> No stage of the build requires running as root.
The only stage we need root privileges in PTXdist is when creating a
root filesystem which can be booted via nfsroot (which is common during
development). In that case, you *need* /dev/console and /dev/null, which
cannot be created by the user.
We have solved that by using sudo there: the automatic build asks for
the user password, but with a timeout. So in interactive builds, you can
just enter the password and have a rootfs ready to be booted, and it
still works with automatic overnight builds.
rsc
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
next prev parent reply other threads:[~2008-07-09 7:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BAY131-W252EE4B85EEB3F7A87466FE2940@phx.gbl>
[not found] ` <4871E98F.8030802@gmail.com>
[not found] ` <20080707181018.GG4319@pengutronix.de>
2008-07-07 20:34 ` building Rootfs Linus Walleij
2008-07-07 21:21 ` Robert Schwebel
2008-07-09 0:14 ` Linus Walleij
2008-07-09 7:06 ` Robert Schwebel
2008-07-07 23:24 ` Haller, John H (John)
2008-07-08 6:54 ` Robert Schwebel
2008-07-08 14:00 ` Wolfgang Denk
2008-07-08 23:53 ` Linus Walleij
2008-07-09 0:52 ` David VomLehn
2008-07-09 7:10 ` Robert Schwebel [this message]
2008-07-09 6:21 ` Wolfgang Denk
2008-07-09 6:43 ` Robert Schwebel
2008-07-09 7:22 ` Peter Korsgaard
2008-07-09 8:22 ` Marek Skuczynski
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=20080709071048.GW4319@pengutronix.de \
--to=r.schwebel@pengutronix.de \
--cc=dvomlehn@cisco.com \
--cc=linus.ml.walleij@gmail.com \
--cc=linux-embedded@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).