• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

device/generic/common


Commit MetaInfo

修訂54eace8a43caa8e1eb93f5a7b1be7a05ffef668f (tree)
時間2015-01-10 02:35:57
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

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.

Change Summary

差異

--- a/device.mk
+++ b/device.mk
@@ -30,6 +30,7 @@ PRODUCT_COPY_FILES := \
3030 $(if $(wildcard $(PRODUCT_DIR)init.rc),$(PRODUCT_DIR)init.rc:root/init.rc) \
3131 $(if $(wildcard $(PRODUCT_DIR)init.sh),$(PRODUCT_DIR),$(LOCAL_PATH)/)init.sh:system/etc/init.sh \
3232 $(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) \
3334 $(if $(wildcard $(PRODUCT_DIR)wpa_supplicant.conf),$(PRODUCT_DIR),$(LOCAL_PATH)/)wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \
3435 $(if $(wildcard $(PRODUCT_DIR)excluded-input-devices.xml),$(PRODUCT_DIR),$(LOCAL_PATH)/)excluded-input-devices.xml:system/etc/excluded-input-devices.xml \
3536 $(if $(wildcard $(PRODUCT_DIR)init.$(TARGET_PRODUCT).rc),$(PRODUCT_DIR)init.$(TARGET_PRODUCT).rc,$(LOCAL_PATH)/init.x86.rc):root/init.$(TARGET_PRODUCT).rc \
--- /dev/null
+++ b/fstab.x86
@@ -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
--- a/init.x86.rc
+++ b/init.x86.rc
@@ -45,6 +45,10 @@ on init
4545
4646 exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
4747
48+on fs
49+ mount_all /fstab.${ro.hardware}
50+ setprop ro.crypto.fuse_sdcard true
51+
4852 on post-fs-data
4953 sysclktz 1
5054
@@ -81,12 +85,6 @@ on boot
8185 # workaround for h.265 slowness
8286 setprop sys.media.vdec.drop 0
8387
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-
9088 service wpa_supplicant /system/bin/wpa_supplicant -c/data/misc/wifi/wpa_supplicant.conf \
9189 -ddddd \
9290 -iwlan0 -Dnl80211 \