1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #!/bin/sh
- #-------------------------------------------------------------------------------
- #- --
- #- This software is confidential and proprietary and may be used --
- #- only as expressly authorized by a licensing agreement from --
- #- --
- #- Hantro Products Oy. --
- #- --
- #- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
- #- ALL RIGHTS RESERVED --
- #- --
- #- The entire notice above must be reproduced --
- #- on all copies and should not be removed. --
- #- --
- #-------------------------------------------------------------------------------
- #-
- #-- Description : Load device driver
- #--
- #--------------------------------------------------------------------------------
- #--
- #-- Version control information, please leave untouched.
- #--
- #-- $RCSfile: driver_load.sh,v $
- #-- $Revision: 1.1 $
- #-- $Date: 2007/03/27 11:06:41 $
- #--
- #--------------------------------------------------------------------------------
- module="hx170dec"
- device="/tmp/dev/hx170"
- mode="666"
- echo
- #insert module
- insmod /lib/modules/4.14.88/kernel/drivers/soc/arkmicro/hx170dec/$module.ko $* || exit 1
- echo "module $module inserted"
- #remove old nod
- rm -f $device
- #read the major asigned at loading time
- major=`cat /proc/devices | grep $module | cut -c1-3`
- echo "$module major = $major"
- #create dev node
- mknod $device c $major 0
- echo "node $device created"
- #give all 'rw' access
- chmod $mode $device
- echo "set node access to $mode"
- #the end
- echo
|