OSDN Git Service

initrd: delay the stage of setup_dpi
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 8 Feb 2012 09:53:46 +0000 (17:53 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 8 Feb 2012 09:53:46 +0000 (17:53 +0800)
Move setup_dpi after detect_hardware so that a target can customize dpi
based on the detection result.

initrd/init
initrd/scripts/4-dpi

index 2f291dc..2ca87a1 100755 (executable)
@@ -165,6 +165,7 @@ load_modules
 mount_data
 mount_sdcard
 setup_tslib
+setup_dpi
 post_detect
 
 if [ -n "$DEBUG" ]; then
index 86c54d5..9d182f7 100644 (file)
@@ -1,10 +1,17 @@
 #
 # By Chih-Wei Huang <cwhuang@linux.org.tw>
-# Last updated 2010/10/14
+# Last updated 2012/02/08
 #
 # License: GNU Public License
 # We explicitely grant the right to use the scripts
 # with Android-x86 project.
 #
 
-[ -n "$DPI" ] && echo ro.sf.lcd_density=$DPI >> default.prop
+setup_dpi()
+{
+       if [ -n "$DPI" ]; then
+               grep -v ro.sf.lcd_density default.prop > tmp.prop
+               echo ro.sf.lcd_density=$DPI >> tmp.prop
+               mv tmp.prop default.prop
+       fi
+}