Advertisement
Guest User

fix f*cked up fex

a guest
Jan 31st, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. MyFexFile="${1}"
  4. MyFixedFile="${MyFexFile}_fixed"
  5.  
  6. grep -v "^LV" <"${MyFexFile}" \
  7. | grep -v "^max_freq" | grep -v "^min_freq" | grep -v "^extremity_freq" \
  8. | grep -v "^ths_" | grep -v "^cooler" | grep -v "^boot_clock" >"${MyFixedFile}"
  9.  
  10. sed -i '/\[dvfs_table\]/a \
  11. ;extremity_freq = 1296000000\
  12. max_freq = 1296000000\
  13. min_freq = 648000000\
  14. LV_count = 8\
  15. LV1_freq = 1296000000\
  16. LV1_volt = 1340\
  17. LV2_freq = 1200000000\
  18. LV2_volt = 1320\
  19. LV3_freq = 1008000000\
  20. LV3_volt = 1200\
  21. LV4_freq = 816000000\
  22. LV4_volt = 1100\
  23. LV5_freq = 648000000\
  24. LV5_volt = 1040\
  25. LV6_freq = 0\
  26. LV6_volt = 1040\
  27. LV7_freq = 0\
  28. LV7_volt = 1040\
  29. LV8_freq = 0\
  30. LV8_volt = 1040' "${MyFixedFile}"
  31.  
  32. sed -i '/\[ths_para\]/a \
  33. ths_used = 1\
  34. ths_trip1_count = 6\
  35. ths_trip1_0 = 75\
  36. ths_trip1_1 = 80\
  37. ths_trip1_2 = 85\
  38. ths_trip1_3 = 90\
  39. ths_trip1_4 = 95\
  40. ths_trip1_5 = 100\
  41. ths_trip1_6 = 0\
  42. ths_trip1_7 = 0\
  43. ths_trip1_0_min = 0\
  44. ths_trip1_0_max = 1\
  45. ths_trip1_1_min = 1\
  46. ths_trip1_1_max = 2\
  47. ths_trip1_2_min = 2\
  48. ths_trip1_2_max = 3\
  49. ths_trip1_3_min = 3\
  50. ths_trip1_3_max = 4\
  51. ths_trip1_4_min = 4\
  52. ths_trip1_4_max = 5\
  53. ths_trip1_5_min = 5\
  54. ths_trip1_5_max = 5\
  55. ths_trip1_6_min = 0\
  56. ths_trip1_6_max = 0\
  57. ths_trip2_count = 1\
  58. ths_trip2_0 = 105' "${MyFixedFile}"
  59.  
  60. sed -i '/\[cooler_table\]/a \
  61. cooler_count = 6\
  62. cooler0 = "1296000 4 4294967295 0"\
  63. cooler1 = "1200000 4 4294967295 0"\
  64. cooler2 = "1008000 4 4294967295 0"\
  65. cooler3 = "816000 4 4294967295 0"\
  66. cooler4 = "648000 4 4294967295 0"\
  67. cooler5 = "480000 1 4294967295 0"' "${MyFixedFile}"
  68.  
  69. sed -i '/\[target\]/a \
  70. boot_clock = 1008' "${MyFixedFile}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement