device/generic/common
修訂 | 54eace8a43caa8e1eb93f5a7b1be7a05ffef668f (tree) |
---|---|
時間 | 2015-01-10 02:35:57 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Add fstab to fix annoying 'RLIMIT_NICE not set' errors
Originally android relies mount_all to trigger some actions.
But android-x86 doesn't use fstab before. So we trigger these
actions on fs stage directly. This works before lollipop.
However, lollipop changed the built-in class main to be
triggerred via init*.rc. So I triggerred it on fs as well.
But this is incorrect. It makes the actions in class main
run before on boot stage. That causes rlimit not being
set for services started in class main.
Fix the issue by adding a fstab and do mount_all on fs stage
like normal android system. It should correct other possible
timing issues.
@@ -30,6 +30,7 @@ PRODUCT_COPY_FILES := \ | ||
30 | 30 | $(if $(wildcard $(PRODUCT_DIR)init.rc),$(PRODUCT_DIR)init.rc:root/init.rc) \ |
31 | 31 | $(if $(wildcard $(PRODUCT_DIR)init.sh),$(PRODUCT_DIR),$(LOCAL_PATH)/)init.sh:system/etc/init.sh \ |
32 | 32 | $(if $(wildcard $(PRODUCT_DIR)modules.blacklist),$(PRODUCT_DIR),$(LOCAL_PATH)/)modules.blacklist:system/etc/modules.blacklist \ |
33 | + $(if $(wildcard $(PRODUCT_DIR)fstab.$(TARGET_PRODUCT)),$(PRODUCT_DIR)fstab.$(TARGET_PRODUCT),$(LOCAL_PATH)/fstab.x86):root/fstab.$(TARGET_PRODUCT) \ | |
33 | 34 | $(if $(wildcard $(PRODUCT_DIR)wpa_supplicant.conf),$(PRODUCT_DIR),$(LOCAL_PATH)/)wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \ |
34 | 35 | $(if $(wildcard $(PRODUCT_DIR)excluded-input-devices.xml),$(PRODUCT_DIR),$(LOCAL_PATH)/)excluded-input-devices.xml:system/etc/excluded-input-devices.xml \ |
35 | 36 | $(if $(wildcard $(PRODUCT_DIR)init.$(TARGET_PRODUCT).rc),$(PRODUCT_DIR)init.$(TARGET_PRODUCT).rc,$(LOCAL_PATH)/init.x86.rc):root/init.$(TARGET_PRODUCT).rc \ |
@@ -0,0 +1,6 @@ | ||
1 | +none /cache tmpfs nosuid,nodev,noatime defaults | |
2 | + | |
3 | +auto /storage/usb0 vfat none wait,noemulatedsd,voldmanaged=usb0:auto | |
4 | +auto /storage/usb1 vfat none wait,noemulatedsd,voldmanaged=usb1:auto | |
5 | +auto /storage/usb2 vfat none wait,noemulatedsd,voldmanaged=usb2:auto | |
6 | +auto /storage/usb3 vfat none wait,noemulatedsd,voldmanaged=usb3:auto |
@@ -45,6 +45,10 @@ on init | ||
45 | 45 | |
46 | 46 | exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh |
47 | 47 | |
48 | +on fs | |
49 | + mount_all /fstab.${ro.hardware} | |
50 | + setprop ro.crypto.fuse_sdcard true | |
51 | + | |
48 | 52 | on post-fs-data |
49 | 53 | sysclktz 1 |
50 | 54 |
@@ -81,12 +85,6 @@ on boot | ||
81 | 85 | # workaround for h.265 slowness |
82 | 86 | setprop sys.media.vdec.drop 0 |
83 | 87 | |
84 | -on fs | |
85 | - setprop ro.crypto.fuse_sdcard true | |
86 | - # manually start class late_start since we don't use mount_all | |
87 | - class_start main | |
88 | - class_start late_start | |
89 | - | |
90 | 88 | service wpa_supplicant /system/bin/wpa_supplicant -c/data/misc/wifi/wpa_supplicant.conf \ |
91 | 89 | -ddddd \ |
92 | 90 | -iwlan0 -Dnl80211 \ |