diff options
author | John Stultz <john.stultz@linaro.org> | 2021-01-12 06:21:30 +0000 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2021-01-26 03:01:06 +0000 |
commit | 6d0db311726049ef67f5f21354b87a081ca6b74a (patch) | |
tree | e3a405bcb559f847e94761bf7aa36f51d33b573a | |
parent | 537992a84e39d132ff487ee1ad165a8b16393ec2 (diff) | |
download | hikey-6d0db311726049ef67f5f21354b87a081ca6b74a.tar.gz |
hikey960: Enabling dynamic partitions for HiKey960
This is basically a port of work Amit had done against HiKey
board awhile back:
https://android-review.linaro.org/c/device/linaro/hikey/+/20550
Moving system vendor product and system_ext to the super
partition.
For now, instead of reworking the ptable, we simply flash the
super partition to the system partition. This will need to change
so that we change the ptable as well, but that needs some time
as the ptable flashing can be disruptive for testing.
Feedback would be appreciated.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ie53fed6392116b16063f497978e369490a1fccd2
-rw-r--r-- | fstab.ramdisk960 | 4 | ||||
-rw-r--r-- | hikey960.mk | 7 | ||||
-rw-r--r-- | hikey960/BoardConfig.mk | 24 | ||||
-rw-r--r-- | hikey960/device-hikey960.mk | 6 | ||||
-rwxr-xr-x | installer/hikey960/flash-all.sh | 3 | ||||
-rwxr-xr-x | installer/hikey960/uefi-flash-all.sh | 4 |
6 files changed, 30 insertions, 18 deletions
diff --git a/fstab.ramdisk960 b/fstab.ramdisk960 new file mode 100644 index 00000000..61928815 --- /dev/null +++ b/fstab.ramdisk960 @@ -0,0 +1,4 @@ +system /system ext4 noatime,ro,errors=panic wait,logical,first_stage_mount +vendor /vendor ext4 noatime,ro,errors=panic wait,logical,first_stage_mount +system_ext /system_ext ext4 noatime,ro,errors=panic wait,logical,first_stage_mount +product /product ext4 noatime,ro,errors=panic wait,logical,first_stage_mount diff --git a/hikey960.mk b/hikey960.mk index 09c5a7f1..03d0b962 100644 --- a/hikey960.mk +++ b/hikey960.mk @@ -29,13 +29,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, device/linaro/hikey/hikey960/device-hikey960.mk) $(call inherit-product, device/linaro/hikey/device-common.mk) -#setup dm-verity configs -PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/soc/ff3b0000.ufs/by-name/system -PRODUCT_VENDOR_VERITY_PARTITION := /dev/block/platform/soc/ff3b0000.ufs/by-name/vendor -$(call inherit-product, build/target/product/verity.mk) -PRODUCT_SUPPORTS_BOOT_SIGNER := false -PRODUCT_SUPPORTS_VERITY_FEC := false - PRODUCT_PROPERTY_OVERRIDES += ro.opengles.version=196608 # diff --git a/hikey960/BoardConfig.mk b/hikey960/BoardConfig.mk index 3cd7a632..789b18f4 100644 --- a/hikey960/BoardConfig.mk +++ b/hikey960/BoardConfig.mk @@ -41,15 +41,29 @@ endif BOARD_MKBOOTIMG_ARGS := --base 0x0 --tags_offset 0x07a00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000 BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4915724288 # 4688MB BOARD_USERDATAIMAGE_PARTITION_SIZE := 25845301248 # 24648MB BOARD_FLASH_BLOCK_SIZE := 512 -# Vendor partition definitions +# Vendor/system_ext/product partition definitions TARGET_COPY_OUT_VENDOR := vendor -BOARD_VENDORIMAGE_PARTITION_SIZE := 822083584 # 784MB BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 -BOARD_VENDORIMAGE_JOURNAL_SIZE := 0 -BOARD_VENDORIMAGE_EXTFS_INODE_COUNT := 2048 +TARGET_COPY_OUT_SYSTEM_EXT := system_ext +BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 +TARGET_COPY_OUT_PRODUCT := product +BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 + +#Dynamic Partition details +TARGET_USE_DYNAMIC_PARTITIONS := true +BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true +BOARD_SUPER_PARTITION_SIZE := 4915724288 +BOARD_SUPER_PARTITION_GROUPS := hikey960_dynamic_partitions +BOARD_HIKEY960_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product +BOARD_HIKEY960_DYNAMIC_PARTITIONS_SIZE := 4915724288 + +# !!! This HACK needs to be removed !!! +# Until the ptable is updated, we flash super.img to system +# but this is deprecated. We need to update the ptable and +# roll that out. Then this can be removed. +BOARD_SUPER_PARTITION_METADATA_DEVICE := system TARGET_RECOVERY_FSTAB := device/linaro/hikey/hikey960/fstab.hikey960 diff --git a/hikey960/device-hikey960.mk b/hikey960/device-hikey960.mk index 301a16bc..f1946eef 100644 --- a/hikey960/device-hikey960.mk +++ b/hikey960/device-hikey960.mk @@ -18,7 +18,7 @@ PRODUCT_COPY_FILES += $(TARGET_PREBUILT_KERNEL):kernel \ $(TARGET_PREBUILT_DTB):hi3660-hikey960.dtb PRODUCT_COPY_FILES += $(LOCAL_PATH)/fstab.hikey960:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.hikey960 \ - device/linaro/hikey/fstab.ramdisk:$(TARGET_COPY_OUT_RAMDISK)/fstab.hikey960 \ + device/linaro/hikey/fstab.ramdisk960:$(TARGET_COPY_OUT_RAMDISK)/fstab.hikey960 \ device/linaro/hikey/hikey960/init.hikey960.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.hikey960.rc \ device/linaro/hikey/init.hikey960.power.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.hikey960.power.rc \ device/linaro/hikey/hikey960/init.hikey960.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.hikey960.usb.rc \ @@ -28,6 +28,10 @@ PRODUCT_COPY_FILES += $(LOCAL_PATH)/fstab.hikey960:$(TARGET_COPY_OUT_VENDOR)/etc frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \ frameworks/native/data/etc/android.software.vulkan.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml +PRODUCT_BUILD_SUPER_PARTITION := true +PRODUCT_USE_DYNAMIC_PARTITIONS := true +PRODUCT_USE_DYNAMIC_PARTITION_SIZE :=true + # Copy BT firmware PRODUCT_COPY_FILES += \ device/linaro/hikey/bt-wifi-firmware-util/TIInit_11.8.32-pcm-960.bts:$(TARGET_COPY_OUT_VENDOR)/firmware/ti-connectivity/TIInit_11.8.32.bts diff --git a/installer/hikey960/flash-all.sh b/installer/hikey960/flash-all.sh index 2888020b..dda34d31 100755 --- a/installer/hikey960/flash-all.sh +++ b/installer/hikey960/flash-all.sh @@ -24,7 +24,6 @@ fastboot flash fw_lpm3 "${INSTALLER_DIR}"/hisi-lpm3.img fastboot flash trustfirmware "${INSTALLER_DIR}"/hisi-bl31.bin fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img fastboot flash dts "${ANDROID_PRODUCT_OUT}"/dt.img -fastboot flash system "${ANDROID_PRODUCT_OUT}"/system.img -fastboot flash vendor "${ANDROID_PRODUCT_OUT}"/vendor.img +fastboot flash system "${ANDROID_PRODUCT_OUT}"/super.img fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img fastboot reboot diff --git a/installer/hikey960/uefi-flash-all.sh b/installer/hikey960/uefi-flash-all.sh index fe42486c..ce402032 100755 --- a/installer/hikey960/uefi-flash-all.sh +++ b/installer/hikey960/uefi-flash-all.sh @@ -44,9 +44,7 @@ function flashing_atf_uefi () { fastboot flash fip "${INSTALLER_DIR}"/fip.bin fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img - fastboot flash system "${ANDROID_PRODUCT_OUT}"/system.img - fastboot flash vendor "${ANDROID_PRODUCT_OUT}"/vendor.img - fastboot flash cache "${ANDROID_PRODUCT_OUT}"/cache.img + fastboot flash system "${ANDROID_PRODUCT_OUT}"/super.img fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img } |