diff options
Diffstat (limited to 'hikey960')
-rw-r--r-- | hikey960/BoardConfig.mk | 12 | ||||
-rw-r--r-- | hikey960/device-hikey960.mk | 15 | ||||
-rw-r--r-- | hikey960/fstab.hikey960 | 6 |
3 files changed, 32 insertions, 1 deletions
diff --git a/hikey960/BoardConfig.mk b/hikey960/BoardConfig.mk index f7deb4c1..71a6273f 100644 --- a/hikey960/BoardConfig.mk +++ b/hikey960/BoardConfig.mk @@ -12,6 +12,18 @@ BOARD_KERNEL_CMDLINE := androidboot.hardware=hikey960 firmware_class.path=/vendo BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/ff3b0000.ufs BOARD_KERNEL_CMDLINE += loglevel=15 androidboot.slot_suffix=_a +ifeq ($(HIKEY960_ENABLE_AVF), true) +# The GKI kernel set protected mode by default via gki_defconfig, +# but hikey960 does not support the protected kvm mode, here overwriting +# to make it possible to play with AVF in the non-protected mode. +BOARD_KERNEL_CMDLINE += kvm-arm.mode=nvhe +# hypervisor.version would be better to be the same as CROSVM_PLATFORM_VERSION in +# packages/modules/Virtualization/virtualizationmanager/src/crosvm.rs +BOARD_KERNEL_CMDLINE += androidboot.hypervisor.version=1.0.0 +BOARD_KERNEL_CMDLINE += androidboot.hypervisor.vm.supported=1 +BOARD_KERNEL_CMDLINE += androidboot.hypervisor.protected_vm.supported=0 +endif + ifeq ($(TARGET_BUILTIN_EDID), true) BOARD_KERNEL_CMDLINE += drm_kms_helper.edid_firmware=edid/1920x1080.bin endif diff --git a/hikey960/device-hikey960.mk b/hikey960/device-hikey960.mk index fba39a48..7d178801 100644 --- a/hikey960/device-hikey960.mk +++ b/hikey960/device-hikey960.mk @@ -14,6 +14,13 @@ # limitations under the License. # +ifeq ($(HIKEY960_ENABLE_AVF), true) +# Based on the instructions in the following link: +# https://android.googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/master/microdroid/README.md +# Tested with the android13-5.10 and android-mainline kernels. +$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk) +endif + # Enable Virtual A/B AB_OTA_UPDATER := true AB_OTA_PARTITIONS += \ @@ -24,6 +31,12 @@ AB_OTA_PARTITIONS += \ $(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk) +# BootControl HAL +PRODUCT_PACKAGES += \ + android.hardware.boot@1.2-impl \ + android.hardware.boot@1.2-impl.recovery \ + android.hardware.boot@1.2-service + PRODUCT_COPY_FILES += $(TARGET_PREBUILT_KERNEL):kernel \ $(TARGET_PREBUILT_DTB):hi3660-hikey960.dtb @@ -33,7 +46,7 @@ PRODUCT_COPY_FILES += $(LOCAL_PATH)/fstab.hikey960:$(TARGET_COPY_OUT_VENDOR)/etc 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 \ device/linaro/hikey/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ - device/linaro/hikey/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/hikey960.kl \ + frameworks/base/data/keyboards/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/hikey960.kl \ frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \ 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 diff --git a/hikey960/fstab.hikey960 b/hikey960/fstab.hikey960 index ae250da1..96f9703d 100644 --- a/hikey960/fstab.hikey960 +++ b/hikey960/fstab.hikey960 @@ -7,7 +7,13 @@ #/dev/block/platform/soc/ff3b0000.ufs/by-name/cache /cache ext4 discard,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait #/dev/block/platform/soc/ff3b0000.ufs/by-name/userdata /data ext4 discard,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait /dev/block/by-name/userdata /data ext4 discard,noatime,nosuid,nodev,noauto_da_alloc,data=ordered,user_xattr,barrier=1 latemount,wait,formattable,fileencryption=aes-256-xts,keydirectory=/metadata/vold/metadata_encryption,quota +# Use the old cache partition for /metadata in order to support metadata encryption /dev/block/by-name/cache /metadata ext4 noatime,nosuid,nodev,discard wait,formattable,first_stage_mount,check +# since there is no misc partition created by the current prm_ptable file, +# and the vendor partition is not used after the dynamic partition support +# here use the vendor partition for the misc mountpoint as a temporary +# workaround for the bootcontrol hal enablement +/dev/block/by-name/vendor /misc emmc defaults defaults /devices/platform/soc/ff37f000.dwmmc1/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata /devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.*.auto/usb* auto auto defaults voldmanaged=usbdisk:auto,encryptable=userdata /devices/platform/soc/f4000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/nvme/nvme* auto auto defaults voldmanaged=nvmedisk:auto,encryptable=userdata |