Guest User

Untitled

a guest
Jun 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.16 KB | None | 0 0
  1. SUBSYSTEM=="graphics", SYMLINK+="$env{SUBSYSTEM}/%k"
  2. SUBSYSTEM=="block", SYMLINK+="$env{SUBSYSTEM}/%k"
  3. SUBSYSTEM=="oncrpc", SYMLINK+="$env{SUBSYSTEM}/%k"
  4. SUBSYSTEM=="adsp", SYMLINK+="$env{SUBSYSTEM}/%k"
  5. SUBSYSTEM=="msm_camera", SYMLINK+="$env{SUBSYSTEM}/%k"
  6. SUBSYSTEM=="mtd", SYMLINK+="$env{SUBSYSTEM}/%k"
  7. SUBSYSTEM=="block", SYMLINK+="$env{SUBSYSTEM}/%k"
  8. SUBSYSTEM=="misc", KERNEL=="log_events", SYMLINK+="alog/events"
  9. SUBSYSTEM=="misc", KERNEL=="log_radio", SYMLINK+="alog/radio"
  10. SUBSYSTEM=="misc", KERNEL=="log_system", SYMLINK+="alog/system"
  11. SUBSYSTEM=="misc", KERNEL=="log_main", SYMLINK+="alog/main"
  12.  
  13. # Partition symlinks, compatible with the android way of setting up the
  14. # symlinks.
  15.  
  16. # Pass collected (see below) information down to lower levels.
  17. SUBSYSTEM=="?*", ENV{PLATFORM_FOLDER}=="", IMPORT{parent}="PLATFORM_FOLDER"
  18. SUBSYSTEM=="?*", ENV{PLATFORM_DEVICE}=="", IMPORT{parent}="PLATFORM_DEVICE"
  19. # Collect information about the platform devices:
  20. # /sys/devices/platform/FOLDER
  21. SUBSYSTEM=="platform", KERNEL!="", DEVPATH=="/devices/platform/*", DEVPATH!="/devices/platform/*/*", DEVPATH=="/devices/platform/*", ENV{PLATFORM_FOLDER}="$kernel"
  22. # /sys/devices/platform/FOLDER/DEVICE
  23. SUBSYSTEM=="platform", KERNEL!="", DEVPATH=="/devices/platform/*", DEVPATH!="/devices/platform/*/*", DEVPATH=="/devices/platform/*/*", ENV{PLATFORM_DEVICE}="$kernel"
  24. # /sys/devices/FOLDER
  25. SUBSYSTEM=="platform", KERNEL!="", DEVPATH!="/devices/platform/*", DEVPATH!="/devices/*/*", DEVPATH=="/devices/*", ENV{PLATFORM_FOLDER}="$kernel"
  26. # /sys/devices/FOLDER/DEVICE
  27. SUBSYSTEM=="platform", KERNEL!="", DEVPATH!="/devices/platform/*", DEVPATH!="/devices/*/*/*", DEVPATH=="/devices/*/*", ENV{PLATFORM_DEVICE}="$kernel"
  28.  
  29. # This will set up the bootdevice symlink, given that androidboot.bootdevice
  30. # is set on the commandline. If it is not given on the cmdline, android-init
  31. # will create the bootdevice (if the paths are correct, which they now should
  32. # be). If android-init doesn't create the bootdevice symlink and there is no
  33. # androidboot.bootdevice on the cmdline, then the bootdevice symlink is not
  34. # required.
  35. IMPORT{cmdline}="bootdevice"
  36. # Unfortunately we cannot compare two variables, therefore use a workaround
  37. # with a file.
  38. ENV{bootdevice}!="", RUN+="/bin/touch /tmp/udev-$env{bootdevice}"
  39. SUBSYSTEM=="platform", KERNEL!="", DEVPATH=="/devices/platform/*", DEVPATH!="/devices/platform/*/*/*", DEVPATH=="/devices/platform/*/*", TEST=="/tmp/udev-$env{PLATFORM_DEVICE}", RUN+="/bin/mkdir -p /dev/block/platform/$env{PLATFORM_FOLDER}/$env{bootdevice}"
  40. SUBSYSTEM=="platform", KERNEL!="", DEVPATH=="/devices/platform/*", DEVPATH!="/devices/platform/*/*/*", DEVPATH=="/devices/platform/*/*", TEST=="/tmp/udev-$env{PLATFORM_DEVICE}", RUN+="/bin/ln -s /dev/block/platform/$env{PLATFORM_FOLDER}/$env{bootdevice} /dev/block/bootdevice"
  41. SUBSYSTEM=="platform", KERNEL!="", DEVPATH!="/devices/platform/*", DEVPATH!="/devices/*/*/*", DEVPATH=="/devices/*/*", TEST=="/tmp/udev-$env{PLATFORM_DEVICE}", RUN+="/bin/mkdir -p /dev/block/platform/$env{PLATFORM_FOLDER}/$env{bootdevice}"
  42. SUBSYSTEM=="platform", KERNEL!="", DEVPATH!="/devices/platform/*", DEVPATH!="/devices/*/*/*", DEVPATH=="/devices/*/*", TEST=="/tmp/udev-$env{PLATFORM_DEVICE}", RUN+="/bin/ln -s /dev/block/platform/$env{PLATFORM_FOLDER}/$env{bootdevice} /dev/block/bootdevice"
  43. # On certain devices the path is .../$PLATFORM_FOLDER/$PLATFORM_DEVICE/...,
  44. # but on others there is no $PLATFORM_DEVICE subdirectory, or in other words,
  45. # PLATFORM_FOLDER=platform device, PLATFORM_DEVICE=empty string. (1).
  46. SUBSYSTEM=="platform", KERNEL!="", DEVPATH=="/devices/platform/*", DEVPATH!="/devices/platform/*/*", DEVPATH=="/devices/platform/*", TEST=="/tmp/udev-$env{PLATFORM_FOLDER}", RUN+="/bin/mkdir -p /dev/block/platform/$env{bootdevice}"
  47. SUBSYSTEM=="platform", KERNEL!="", DEVPATH=="/devices/platform/*", DEVPATH!="/devices/platform/*/*", DEVPATH=="/devices/platform/*", TEST=="/tmp/udev-$env{PLATFORM_FOLDER}", RUN+="/bin/ln -s /dev/block/platform/$env{bootdevice} /dev/block/bootdevice"
  48. SUBSYSTEM=="platform", KERNEL!="", DEVPATH!="/devices/platform/*", DEVPATH!="/devices/*/*", DEVPATH=="/devices/*", TEST=="/tmp/udev-$env{PLATFORM_FOLDER}", RUN+="/bin/mkdir -p /dev/block/platform/$env{bootdevice}"
  49. SUBSYSTEM=="platform", KERNEL!="", DEVPATH!="/devices/platform/*", DEVPATH!="/devices/*/*", DEVPATH=="/devices/*", TEST=="/tmp/udev-$env{PLATFORM_FOLDER}", RUN+="/bin/ln -s /dev/block/platform/$env{bootdevice} /dev/block/bootdevice"
  50.  
  51. # Create the partition symlinks.
  52. ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="block/platform/$env{PLATFORM_DEVICE}/by-name/$env{ID_PART_ENTRY_NAME}"
  53. ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="block/platform/$env{PLATFORM_DEVICE}/by-num/p$env{ID_PART_ENTRY_NUMBER}"
  54. ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="block/platform/$env{PLATFORM_DEVICE}/$name"
  55.  
  56. # Backwards compatibility for old SailfishOS approach (might not be necessary)
  57. # NOTE: if the comment marked with (1) applies then this will not do anything.
  58. ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="block/platform/$env{PLATFORM_FOLDER}/by-name/$env{ID_PART_ENTRY_NAME}"
Add Comment
Please, Sign In to add comment