OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [block/] [paride/] [mkd] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
#!/bin/bash
2
#
3
# mkd -- a script to create the device special files for the PARIDE subsystem
4
#
5
#  block devices:       pd (45), pcd (46), pf (47)
6
#  character devices:   pt (96), pg (97)
7
#
8
function mkdev {
9
  mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1
10
}
11
#
12
function pd {
13
  D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) )
14
  mkdev pd$D b 45 $[ $1 * 16 ]
15
  for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
16
  do mkdev pd$D$P b 45 $[ $1 * 16 + $P ]
17
  done
18
}
19
#
20
cd /dev
21
#
22
for u in 0 1 2 3 ; do pd $u ; done
23
for u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done
24
for u in 0 1 2 3 ; do mkdev pf$u  b 47 $u ; done
25
for u in 0 1 2 3 ; do mkdev pt$u  c 96 $u ; done
26
for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done
27
for u in 0 1 2 3 ; do mkdev pg$u  c 97 $u ; done
28
#
29
# end of mkd
30
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.