summaryrefslogtreecommitdiff
path: root/scripts/makenodes
blob: 19565a733f7bd4ab327cb253be0fd3aa40724ef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

if [ ! -d /dev/cpu ] ; then
	mkdir /dev/cpu
fi
for i in 0 1 2 3 4 5 6 7
do
	if [ ! -d /dev/cpu/$i ] ; then
		mkdir /dev/cpu/$i
	fi
	if [ ! -f /dev/cpu/$i/cpuid ] ; then
		(cd /dev/cpu/$i ; mknod cpuid c 203 $i)
	fi
	if [ ! -f /dev/cpu/$i/msr ] ; then
		(cd /dev/cpu/$i ; mknod msr c 202 $i)
	fi
done

echo "cpuid & msr /dev nodes created."