blob: 03a1a8550e3817eb0ff4d0c8dce26dc0ef55aeb7 [file] [log] [blame]
Mark Whitleya0ba9f42001-05-04 21:46:00 +00001#!/bin/sh
2#
3# makedev.sh - creates device files for a busybox boot floppy image
4
5
6# we do our work in the dev/ directory
7if [ -z "$1" ]; then
8 echo "usage: `basename $0` path/to/dev/dir"
9 exit 1
10fi
11
12cd $1
13
14
15# miscellaneous one-of-a-kind stuff
16mknod console c 5 1
17mknod full c 1 7
18mknod kmem c 1 2
19mknod mem c 1 1
20mknod null c 1 3
21mknod port c 1 4
22mknod random c 1 8
23mknod urandom c 1 9
24mknod zero c 1 5
25ln -s /proc/kcore core
26
27# IDE HD devs
28# note: not going to bother creating all concievable partitions; you can do
29# that yourself as you need 'em.
30mknod hda b 3 0
31mknod hdb b 3 64
32mknod hdc b 22 0
33mknod hdd b 22 64
34
35# loop devs
36for i in `seq 0 7`; do
37 mknod loop$i b 7 $i
38done
39
40# ram devs
41for i in `seq 0 9`; do
42 mknod ram$i b 1 $i
43done
44ln -s ram1 ram
45
46# ttys
47mknod tty c 5 0
48for i in `seq 0 9`; do
49 mknod tty$i c 4 $i
50done
51
52# virtual console screen devs
53for i in `seq 0 9`; do
54 mknod vcs$i b 7 $i
55done
56ln -s vcs0 vcs
57
58# virtual console screen w/ attributes devs
59for i in `seq 0 9`; do
60 mknod vcsa$i b 7 $i
61done
62ln -s vcsa0 vcsa