load_android.sh 694 B

123456789101112131415161718192021222324
  1. module="jpu"
  2. device="jpu"
  3. mode="664"
  4. # invoke insmod with all arguments we got
  5. # and use a pathname, as newer modutils don't look in . by default
  6. /system/bin/insmod /system/lib/modules/$module.ko $* || exit 1
  7. echo "module $module inserted"
  8. #remove old nod
  9. rm -f /dev/${device}
  10. #read the major asigned at loading time
  11. major=`cat /proc/devices | busybox awk "\\$2==\"$module\" {print \\$1}"`
  12. echo "$module major = $major"
  13. # Remove stale nodes and replace them, then give gid and perms
  14. # Usually the script is shorter, it's simple that has several devices in it.
  15. busybox mknod /dev/${device} c $major 0
  16. echo "node $device created"
  17. chmod $mode /dev/${device}
  18. echo "set node access to $mode"