diff options
-rwxr-xr-x | AndroidBoard.mk | 6 | ||||
-rwxr-xr-x | BoardConfig.mk | 26 | ||||
-rwxr-xr-x | fstab_AB_variant.qcom (renamed from fstab.qcom) | 1 | ||||
-rwxr-xr-x | fstab_non_AB_variant.qcom | 18 | ||||
-rwxr-xr-x | init.target.rc | 3 | ||||
-rwxr-xr-x | recovery_AB_non-split_variant.fstab (renamed from recovery.fstab) | 5 | ||||
-rwxr-xr-x | recovery_AB_split_variant.fstab (renamed from recovery_vendor_variant.fstab) | 3 | ||||
-rwxr-xr-x | recovery_non-AB_non-split_variant.fstab | 38 | ||||
-rwxr-xr-x | recovery_non-AB_split_variant.fstab | 39 | ||||
-rw-r--r-- | sdm660_64.mk | 5 |
10 files changed, 133 insertions, 11 deletions
diff --git a/AndroidBoard.mk b/AndroidBoard.mk index 62aecc4..baf23b9 100755 --- a/AndroidBoard.mk +++ b/AndroidBoard.mk @@ -65,7 +65,11 @@ include $(CLEAR_VARS) LOCAL_MODULE := fstab.qcom LOCAL_MODULE_TAGS := optional eng LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := $(LOCAL_MODULE) +ifeq ($(ENABLE_AB), true) +LOCAL_SRC_FILES := fstab_AB_variant.qcom +else +LOCAL_SRC_FILES := fstab_non_AB_variant.qcom +endif LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) include $(BUILD_PREBUILT) diff --git a/BoardConfig.mk b/BoardConfig.mk index e7309ed..073b2a8 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -36,6 +36,7 @@ BOARD_USE_LEGACY_UI := true TARGET_USERIMAGES_USE_EXT4 := true BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000 +ifeq ($(ENABLE_AB), true) #A/B related defines AB_OTA_UPDATER := true # Full A/B partiton update set @@ -45,14 +46,25 @@ AB_OTA_PARTITIONS ?= boot system BOARD_BUILD_SYSTEM_ROOT_IMAGE := true TARGET_NO_RECOVERY := true BOARD_USES_RECOVERY_AS_BOOT := true -ifeq ($(ENABLE_VENDOR_IMAGE), true) -TARGET_RECOVERY_FSTAB := device/qcom/sdm660_64/recovery_vendor_variant.fstab else -TARGET_RECOVERY_FSTAB := device/qcom/sdm660_64/recovery.fstab +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x04000000 +BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456 +BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 +#TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_msm endif -ifneq ($(AB_OTA_UPDATER),true) - TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_msm +ifeq ($(ENABLE_AB), true) + ifeq ($(ENABLE_VENDOR_IMAGE), true) + TARGET_RECOVERY_FSTAB := device/qcom/sdm660_64/recovery_AB_split_variant.fstab + else + TARGET_RECOVERY_FSTAB := device/qcom/sdm660_64/recovery_AB_non-split_variant.fstab + endif +else + ifeq ($(ENABLE_VENDOR_IMAGE), true) + TARGET_RECOVERY_FSTAB := device/qcom/sdm660_64/recovery_non-AB_split_variant.fstab + else + TARGET_RECOVERY_FSTAB := device/qcom/sdm660_64/recovery_non-AB_non-split_variant.fstab + endif endif BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472 @@ -159,4 +171,6 @@ TARGET_USES_IMS := true ADD_RADIO_FILES := true TARGET_RECOVERY_UI_LIB := librecovery_ui_msm - +ifneq ($(AB_OTA_UPDATER),true) + TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_msm +endif diff --git a/fstab.qcom b/fstab_AB_variant.qcom index 6a6b106..aa1a9b0 100755 --- a/fstab.qcom +++ b/fstab_AB_variant.qcom @@ -5,6 +5,7 @@ #TODO: Add 'check' as fs_mgr_flags with data partition. # Currently we dont have e2fsck compiled. So fs check would failed. +# A/B fstab.qcom variant #<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> /dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,slotselect,verify /dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard,lazytime wait,check,forceencrypt=footer,crashcheck diff --git a/fstab_non_AB_variant.qcom b/fstab_non_AB_variant.qcom new file mode 100755 index 0000000..303d32d --- /dev/null +++ b/fstab_non_AB_variant.qcom @@ -0,0 +1,18 @@ +# Android fstab file. +# The filesystem that contains the filesystem checker binary (typically /system) cannot +# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK + +#TODO: Add 'check' as fs_mgr_flags with data partition. +# Currently we dont have e2fsck compiled. So fs check would failed. + +# Non-A/B fstab.qcom variant +#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> +/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1,discard wait,verify +/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard,lazytime wait,check,forceencrypt=footer,crashcheck +/devices/soc/c084000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer +/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults +/dev/block/bootdevice/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait +/dev/block/bootdevice/by-name/bluetooth /bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait +/devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto +/dev/block/bootdevice/by-name/dsp /dsp ext4 ro,nosuid,nodev,barrier=1 wait +/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,barrier=1 wait diff --git a/init.target.rc b/init.target.rc index 3c8ee71..1d33e86 100755 --- a/init.target.rc +++ b/init.target.rc @@ -28,6 +28,9 @@ # on early-init + mkdir /firmware 0771 system system + mkdir /bt_firmware 0771 system system + mkdir /dsp 0771 media media on init write /dev/stune/foreground/schedtune.sched_boost_no_override 1 diff --git a/recovery.fstab b/recovery_AB_non-split_variant.fstab index 26af1bb..874a81a 100755 --- a/recovery.fstab +++ b/recovery_AB_non-split_variant.fstab @@ -1,4 +1,4 @@ -# Copyright (c) 2013, The Linux Foundation. All rights reserved. +# Copyright (c) 2017, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are @@ -25,11 +25,12 @@ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# A/B, non-split(no vendor.img) recovery.fstab variant. + #device mount point fstype [device2] [length=] /dev/block/bootdevice/by-name/system / ext4 ro,barrier=1 wait,slotselect,verify /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check,encryptable=footer /dev/block/mmcblk1p1 /sdcard vfat nosuid,nodev wait /dev/block/bootdevice/by-name/boot /boot emmc defaults defaults -/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults diff --git a/recovery_vendor_variant.fstab b/recovery_AB_split_variant.fstab index 2e9d39d..7998fa7 100755 --- a/recovery_vendor_variant.fstab +++ b/recovery_AB_split_variant.fstab @@ -25,7 +25,7 @@ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Vendor variant of recovery.fstab. Same as recovery.fstab, with additional vendor entry. +# A/B, split(with vendor.img) recovery.fstab variant. #device mount point fstype [device2] [length=] @@ -34,5 +34,4 @@ /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check,encryptable=footer /dev/block/mmcblk1p1 /sdcard vfat nosuid,nodev wait /dev/block/bootdevice/by-name/boot /boot emmc defaults defaults -/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults diff --git a/recovery_non-AB_non-split_variant.fstab b/recovery_non-AB_non-split_variant.fstab new file mode 100755 index 0000000..ece3846 --- /dev/null +++ b/recovery_non-AB_non-split_variant.fstab @@ -0,0 +1,38 @@ +# Copyright (c) 2017, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Non A/B, non-split(no vendor.img) recovery.fstab variant. + +#device mount point fstype [device2] [length=] + +/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check,encryptable=footer +/dev/block/mmcblk1p1 /sdcard vfat nosuid,nodev wait +/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults +/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults +/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults diff --git a/recovery_non-AB_split_variant.fstab b/recovery_non-AB_split_variant.fstab new file mode 100755 index 0000000..39faee8 --- /dev/null +++ b/recovery_non-AB_split_variant.fstab @@ -0,0 +1,39 @@ +# Copyright (c) 2017, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Non A/B, split(with vendor.img) recovery.fstab variant. + +#device mount point fstype [device2] [length=] + +/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,verify +/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check,encryptable=footer +/dev/block/mmcblk1p1 /sdcard vfat nosuid,nodev wait +/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults +/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults +/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults diff --git a/sdm660_64.mk b/sdm660_64.mk index f650924..f8c7a34 100644 --- a/sdm660_64.mk +++ b/sdm660_64.mk @@ -9,6 +9,9 @@ ifeq ($(ENABLE_VENDOR_IMAGE),) ENABLE_VENDOR_IMAGE := true endif +# Default A/B configuration. +ENABLE_AB ?= true + # Disable QTIC until it's brought up in split system/vendor # configuration to avoid compilation breakage. ifeq ($(ENABLE_VENDOR_IMAGE), true) @@ -231,6 +234,7 @@ PRODUCT_PACKAGES += \ wificond \ wifilogd +ifeq ($(ENABLE_AB), true) #A/B related packages PRODUCT_PACKAGES += update_engine \ update_engine_client \ @@ -242,6 +246,7 @@ PRODUCT_PACKAGES += update_engine \ #Boot control HAL test app PRODUCT_PACKAGES_DEBUG += bootctl +endif #Healthd packages PRODUCT_PACKAGES += android.hardware.health@1.0-impl \ |