From: "Cristian Axenie" <cristian.axenie@gmail.com>
To: "Nicholas Mc Guire" <hofrat@hofr.at>,
linuxppc-embedded@ozlabs.org,
"Joachim Foerster" <mls.JOFT@gmx.de>
Subject: Re: USB Flash rootfs prep!
Date: Sat, 15 Nov 2008 13:15:07 +0200 [thread overview]
Message-ID: <9c789a000811150315u3e390a49gf8fa16c16adfbf51@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0811150138440.4494@vlab.hofr.at>
[-- Attachment #1: Type: text/plain, Size: 3218 bytes --]
On Sat, Nov 15, 2008 at 12:40 PM, Nicholas Mc Guire <hofrat@hofr.at> wrote:
> > >
> > > did you check that it is actually a valid character device (c 5 1) ?
> > > it can easaly happend during copying of a tree into your image that
> > > they become regular files.
> > >
> > > hofrat
> > >
> > I think that you are right, butr how can I test this validity??
> >
> just check with ls -l that the device file is actually still a character
> device with the right major/minor number.
>
> crw--w--w- 1 root tty 5, 1 Nov 13 22:18 /mnt/dev/console
>
> modes and date of course may be diferent.
>
> hofrat
>
I mount my ext2.img and run ls -l and I get
crw-r----- 1 root root 5, 1 2008-11-15 02:24 console
I think is not ok ?!
Now regarding some steps in the creation of the rootfs:
use "tmpfs" for cases where a writable file system is needed and add the
following lines to the /etc/rc.sh script:
# mount TMPFS because root-fs is readonly
/bin/mount -t tmpfs -o size=2M tmpfs /tmpfs
create the same symbolic links for device files that must be placed in a
writable filesystem: dev/ptyp0 → /tmpfs/dev/ptyp0 dev/ttyp0 →
/tmpfs/dev/ttyp0
dev/ptyp1 → /tmpfs/dev/ptyp1 dev/ttyp1 → /tmpfs/dev/ttyp1
dev/ptyp2 → /tmpfs/dev/ptyp2
dev/ttyp2 → /tmpfs/dev/ttyp2 dev/ptyp3 → /tmpfs/dev/ptyp3 dev/ttyp3
→ /tmpfs/dev/ttyp3 dev/ptyp4 → /tmpfs/dev/ptyp4 dev/ttyp4 →
/tmpfs/dev/ttyp4
dev/ptyp5 → /tmpfs/dev/ptyp5 dev/ttyp5 → /tmpfs/dev/ttyp5
dev/ptyp6 → /tmpfs/dev/ptyp6
dev/ttyp6 → /tmpfs/dev/ttyp6 dev/ptyp7 → /tmpfs/dev/ptyp7 dev/ttyp7
→ /tmpfs/dev/ttyp7 dev/ptyp8 → /tmpfs/dev/ptyp8 dev/ttyp8 →
/tmpfs/dev/ttyp8
dev/ptyp9 → /tmpfs/dev/ptyp9 dev/ttyp9 → /tmpfs/dev/ttyp9
dev/ptypa → /tmpfs/dev/ptypa
dev/ttypa → /tmpfs/dev/ttypa dev/ptypb → /tmpfs/dev/ptypb dev/ttypb
→ /tmpfs/dev/ttypb dev/ptypc → /tmpfs/dev/ptypc dev/ttypc →
/tmpfs/dev/ttypc
dev/ptypd → /tmpfs/dev/ptypd dev/ttypd → /tmpfs/dev/ttypd
dev/ptype → /tmpfs/dev/ptype
dev/ttype → /tmpfs/dev/ttype dev/ptypf → /tmpfs/dev/ptypf dev/ttypf
→ /tmpfs/dev/ttypf tmp → /tmpfs/tmp var → /tmpfs/var dev/log →
/var/log/log
In case you use dhclient also: etc/dhclient.conf →
/tmpfs/var/lib/dhclient.conf
etc/resolv.conf → /tmpfs/var/lib/resolv.conf
Shall I create the symlinks manually?
Is rc.sh executed ??
I,ve created a tmpfs directory in my rootfs directory and even if I mount it
on my host it's not populateed.
place the corresponding directories and device files in the tmpfs file
system, the following code is added to the /etc/rc.sh script:
mkdir -p /tmpfs/tmp /tmpfs/dev \
/tmpfs/var/lib/dhcp /tmpfs/var/lock /tmpfs/var/run
while read name minor
do
mknod /tmpfs/dev/ptyp$name c 2 $minor
mknod /tmpfs/dev/ttyp$name c 3 $minor
done <<__EOD__
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
a 10
b 11
c 12
d 13
e 14
f 15
__EOD__
chmod 0666 /tmpfs/dev/*
Cristian
[-- Attachment #2: Type: text/html, Size: 6484 bytes --]
next prev parent reply other threads:[~2008-11-15 11:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-15 1:05 USB Flash rootfs prep! Cristian Axenie
2008-11-15 8:18 ` Joachim Foerster
[not found] ` <9c789a000811150112q3088a044ub8b38489b2119a60@mail.gmail.com>
2008-11-15 9:12 ` Cristian Axenie
2008-11-15 10:01 ` Nicholas Mc Guire
2008-11-15 10:17 ` Cristian Axenie
2008-11-15 10:40 ` Nicholas Mc Guire
2008-11-15 11:15 ` Cristian Axenie [this message]
2008-11-15 12:12 ` Cristian Axenie
[not found] ` <Pine.LNX.4.58.0811150700530.5061@vlab.hofr.at>
2008-11-16 14:21 ` Cristian Axenie
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=9c789a000811150315u3e390a49gf8fa16c16adfbf51@mail.gmail.com \
--to=cristian.axenie@gmail.com \
--cc=hofrat@hofr.at \
--cc=linuxppc-embedded@ozlabs.org \
--cc=mls.JOFT@gmx.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;
as well as URLs for NNTP newsgroup(s).