From 9c902b351fa1aa8cd91c0bb374aa4ecbbdcf2a44 Mon Sep 17 00:00:00 2001 From: Yueyao Zhu Date: Thu, 18 May 2017 14:08:43 -0700 Subject: [PATCH] Ensure usb related .rc is parsed in a defined order Loading process: - rootdir/init.rc |- /vendor/etc/init/hw/init.${ro.hardware}.rc |- /vendor/etc/init/hw/init.${ro.hardware}.usb.rc |- /vendor/etc/init/hw/init.wahoo.usb.rc This CL moves init.hardware.rc, init.wahoo.usb.rc to /vendor/ etc/init/hw/, and import /vendor/etc/init/hw/init.${ro.hardware} .usb.rc from init.hardware.rc. Test: Build with related CLs and USB File Transfer works Bug: 38301110 Change-Id: I4808a117994374bceac324c60cc47225a8df5970 Signed-off-by: Yueyao Zhu --- device.mk | 4 ++-- init.hardware.rc | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/device.mk b/device.mk index 8f3f823a..549ec822 100755 --- a/device.mk +++ b/device.mk @@ -54,8 +54,8 @@ DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay PRODUCT_COPY_FILES += \ $(LOCAL_KERNEL):kernel \ $(LOCAL_PATH)/init.recovery.hardware.rc:root/init.recovery.$(PRODUCT_HARDWARE).rc \ - $(LOCAL_PATH)/init.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_HARDWARE).rc \ - $(LOCAL_PATH)/init.hardware.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wahoo.usb.rc \ + $(LOCAL_PATH)/init.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_HARDWARE).rc \ + $(LOCAL_PATH)/init.hardware.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.wahoo.usb.rc \ $(LOCAL_PATH)/ueventd.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ $(LOCAL_PATH)/init.power.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.power.sh \ $(LOCAL_PATH)/init.radio.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.radio.sh \ diff --git a/init.hardware.rc b/init.hardware.rc index e8787011..6caa1cbd 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -14,14 +14,7 @@ # limitations under the License. # -# -# Following imports have been moved to /vendor/etc/init and will be -# loaded by /init automatically, so are commented out to reduce the -# noise in the log. -# -#import init.${ro.hardware}.usb.rc -#import init.${ro.hardware}.diag.rc -#import init.${ro.hardware}.logging.rc +import /vendor/etc/init/hw/init.${ro.hardware}.usb.rc on charger write /sys/devices/system/cpu/cpu2/online 0