diff options
Diffstat (limited to 'recipes-graphics/vc-graphics/files/vchiq.sh')
| -rw-r--r-- | recipes-graphics/vc-graphics/files/vchiq.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes-graphics/vc-graphics/files/vchiq.sh b/recipes-graphics/vc-graphics/files/vchiq.sh new file mode 100644 index 0000000..c73e3a9 --- /dev/null +++ b/recipes-graphics/vc-graphics/files/vchiq.sh | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | ### BEGIN INIT INFO | ||
| 3 | # Provides: vchiq.sh | ||
| 4 | # Required-Start: $remote_fs rmnologin | ||
| 5 | # Required-Stop: | ||
| 6 | # Default-Start: S | ||
| 7 | # Default-Stop: | ||
| 8 | # Short-Description: Create /dev/vchiq. | ||
| 9 | # Description: Get the major number from /proc/devices and use it | ||
| 10 | # ti create /dev/vchiq | ||
| 11 | ### END INIT INFO | ||
| 12 | |||
| 13 | rm -f /dev/vchiq | ||
| 14 | |||
| 15 | #Get the major number | ||
| 16 | major=$(awk "\$2==\"vchiq\" {print \$1}" /proc/devices) | ||
| 17 | |||
| 18 | if [ -z "$major" ]; then | ||
| 19 | echo "Error: Cannot find vchiq in /proc/devices" | ||
| 20 | exit 2 | ||
| 21 | else | ||
| 22 | mknod /dev/vchiq c "$major" 0 | ||
| 23 | chmod a+w /dev/vchiq | ||
| 24 | fi | ||
