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 <yueyao@google.com>
This commit is contained in:
Yueyao Zhu
2017-05-18 14:08:43 -07:00
committed by Thierry Strudel
parent 31f2043b4f
commit 9c902b351f
2 changed files with 3 additions and 10 deletions

View File

@@ -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 \

View File

@@ -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