OSDN Git Service

Add MS7619SE
[uclinux-h8/uClinux-dist.git] / tools / mkdevdir-genromfs.sh
1 #! /bin/sh
2
3 # A little tool to generate /dev directories in a form that genromfs
4 # understands.  It takes as inputs the romfs directory, and the
5 # device table (which is in the same format that genext2fs understands)
6
7 while read filename type mode uid gid major minor start inc count ; do
8 case "$filename" in
9 '#'*)    true ;;
10 *)
11     case $type in
12         d)
13             mkdir -p $1$filename
14             ;;
15         [cb])
16             x=`basename $filename`
17             y=`dirname $filename`
18             touch "$1$y/@$x,$type,$major,$minor"
19             chmod $mode "$1$y/@$x,$type,$major,$minor"
20             ;;
21     esac
22 esac
23 done <$2