From c28a95caee052582c342110214db4808e919a864 Mon Sep 17 00:00:00 2001 From: Cosmin Tanislav Date: Fri, 3 Sep 2021 20:23:13 +0300 Subject: [PATCH] sm8350-common: update recovery configuration --- BoardConfigCommon.mk | 3 ++- common.mk | 3 +-- rootdir/bin/init.recovery.qcom.sh | 9 --------- rootdir/etc/init.recovery.qcom.rc | 17 ++++++----------- 4 files changed, 9 insertions(+), 23 deletions(-) delete mode 100644 rootdir/bin/init.recovery.qcom.sh diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index a8070c2..08d8228 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -183,7 +183,8 @@ BOARD_USES_QCOM_HARDWARE := true TARGET_FWK_SUPPORTS_FULL_VALUEADDS := true # Recovery -BOARD_INCLUDE_RECOVERY_DTBO := true +BOARD_INCLUDE_DTB_IN_BOOTIMG := true +BOARD_USES_RECOVERY_AS_BOOT := true TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" TARGET_USERIMAGES_USE_EXT4 := true diff --git a/common.mk b/common.mk index fc2958d..3b932cb 100644 --- a/common.mk +++ b/common.mk @@ -288,8 +288,7 @@ PRODUCT_PACKAGES += \ # Recovery PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/rootdir/etc/init.recovery.qcom.rc:recovery/root/init.recovery.qcom.rc \ - $(LOCAL_PATH)/rootdir/bin/init.recovery.qcom.sh:recovery/root/init.recovery.qcom.sh + $(LOCAL_PATH)/rootdir/etc/init.recovery.qcom.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.qcom.rc # RenderScript HAL PRODUCT_PACKAGES += \ diff --git a/rootdir/bin/init.recovery.qcom.sh b/rootdir/bin/init.recovery.qcom.sh deleted file mode 100644 index 56b9607..0000000 --- a/rootdir/bin/init.recovery.qcom.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/system/bin/sh - -while [ ! -d /dev/block/mapper ]; do - sleep 1 -done - -ln -s /dev/block/mapper/* /dev/block/bootdevice/by-name/ - -exit 0 diff --git a/rootdir/etc/init.recovery.qcom.rc b/rootdir/etc/init.recovery.qcom.rc index f3841f2..12f58ee 100644 --- a/rootdir/etc/init.recovery.qcom.rc +++ b/rootdir/etc/init.recovery.qcom.rc @@ -1,15 +1,10 @@ -on init - write /sys/class/backlight/panel0-backlight/brightness 200 - - setprop sys.usb.configfs 1 - on fs wait /dev/block/platform/soc/${ro.boot.bootdevice} symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice - start init-recovery-qcom-sh -service init-recovery-qcom-sh /init.recovery.qcom.sh - user root - group root - seclabel u:r:recovery:s0 - oneshot +on init + setprop sys.usb.configfs 1 + +on property:ro.boot.usbcontroller=* + setprop sys.usb.controller ${ro.boot.usbcontroller} + write /sys/class/udc/${ro.boot.usbcontroller}/device/../mode peripheral