GfA-buildroot_SetRightDisplayResolution_OnUpdate.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in
  2. index d80c399..8832933 100644
  3. --- a/UpdateRootfs.sh.in
  4. +++ b/UpdateRootfs.sh.in
  5. @@ -123,6 +123,40 @@ fi
  6. chown -Rv mysql:nogroup /var/mysql
  7. chown -Rv postgres:postgres /var/lib/pgsql
  8. #==============================================================================
  9. +# Get Graphics resolution and set dtb to the right resolution
  10. +
  11. +DONE=0
  12. +YRES="$(fbset | awk '/geom/ {print $3}')"
  13. +XRES="$(fbset | awk '/geom/ {print $2}')"
  14. +
  15. +echo "XRES $XRES, YRES $YRES"
  16. +
  17. +if [ "$XRES" == "480" -a "$YRES" == "272" ]; then
  18. + echo "4.3 Inch"
  19. + sh /root/DisplayTo_4_3inch.sh
  20. + DONE=1
  21. +fi
  22. +
  23. +if [ "$XRES" == "800" -a "$YRES" == "480" ]; then
  24. + echo "7 Inch"
  25. + sh /root/DisplayTo_7inch.sh
  26. + DONE=1
  27. +fi
  28. +
  29. +if [ "$XRES" == "1280" -a "$YRES" == "800" ]; then
  30. + echo "10 Inch"
  31. + sh /root/DisplayTo_10inch.sh
  32. + DONE=1
  33. +fi
  34. +
  35. +if [ "$DONE" == "0" ]; then
  36. + echo "Unknown Display Resolution"
  37. +fi
  38. +
  39. +
  40. +
  41. +
  42. +#=================
  43. echo "Update Done, pls. reboot System"
  44. umount /mnt
  45. echo "."