From f102f96f20e575794aa3fd913b443a39468113aa Mon Sep 17 00:00:00 2001 From: buildslave Date: Fri, 24 Sep 2021 05:11:16 +0000 Subject: [PATCH] mixin updates [DONT MERGE] Disable trusty Enable mac80211 for BM Android Changes will revert iwl7000 driver and enable mac80211 for BM [DO NOT MERGE] For CiV Tracked-On: OAM-99522 Mixin-Reviewed-On: https://github.com/projectceladon/device-androidia-mixins/pull/1229 Mixin-Reviewed-On: https://github.com/projectceladon/device-androidia/pull/1233 Signed-off-by: Bharat B Panda Signed-off-by: Jeevaka Prabu Badrappan --- caas/AndroidBoard.mk | 25 ---------- caas/BoardConfig.mk | 44 +--------------- caas/device.mk | 33 +----------- caas/extra_files/firststage-mount/config.asl | 2 +- .../extra_files/trusty/load_trusty_modules.in | 18 ------- .../trusty/trusty_project-celadon.mk | 50 ------------------- caas/flashfiles.ini | 5 -- caas/fstab | 1 - caas/fstab.recovery | 1 - caas/gpt.ini | 7 +-- caas/init.rc | 27 +--------- caas/ueventd.rc | 5 -- caas_cfc/init.rc | 2 +- celadon_ivi/init.rc | 2 +- celadon_tablet/init.rc | 2 +- 15 files changed, 10 insertions(+), 214 deletions(-) delete mode 100644 caas/extra_files/trusty/load_trusty_modules.in delete mode 100644 caas/extra_files/trusty/trusty_project-celadon.mk diff --git a/caas/AndroidBoard.mk b/caas/AndroidBoard.mk index 7b1bc4d0a..1e913e93f 100644 --- a/caas/AndroidBoard.mk +++ b/caas/AndroidBoard.mk @@ -538,31 +538,6 @@ em-host-utilities: .PHONY: host-pkg host-pkg: em-host-utilities vinput-manager ############################################################## -# Source: device/intel/mixins/groups/trusty/true/AndroidBoard.mk -############################################################## -.PHONY: tosimage multiboot - -EVMM_PKG := $(TOP)/$(PRODUCT_OUT)/obj/trusty/evmm_pkg.bin -EVMM_LK_PKG := $(TOP)/$(PRODUCT_OUT)/obj/trusty/evmm_lk_pkg.bin - -LOCAL_CLANG_PATH = $(CLANG_PREBUILTS_PATH)/host/$(HOST_OS)-x86/$(KERNEL_CLANG_VERSION)/bin - -LOCAL_MAKE := \ - PATH="$(LOCAL_CLANG_PATH):$(PWD)/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/x86_64-linux/bin:$$PATH" \ - $(PWD)/prebuilts/build-tools/linux-x86/bin/make -$(EVMM_PKG): - @echo "making evmm.." - $(hide) (cd $(TOPDIR)$(INTEL_PATH_VENDOR)/fw/evmm && $(TRUSTY_ENV_VAR) $(LOCAL_MAKE)) - -$(EVMM_LK_PKG): - @echo "making evmm(packing with lk.bin).." - $(hide) (cd $(TOPDIR)$(INTEL_PATH_VENDOR)/fw/evmm && $(TRUSTY_ENV_VAR) $(LOCAL_MAKE)) - -# include sub-makefile according to boot_arch -include $(TARGET_DEVICE_DIR)/extra_files/trusty/trusty_project-celadon.mk - -LOAD_MODULES_H_IN += $(TARGET_DEVICE_DIR)/extra_files/trusty/load_trusty_modules.in -############################################################## # Source: device/intel/mixins/groups/firststage-mount/true/AndroidBoard.mk ############################################################## FIRST_STAGE_MOUNT_CFG_FILE := $(TARGET_DEVICE_DIR)/extra_files/firststage-mount/config.asl diff --git a/caas/BoardConfig.mk b/caas/BoardConfig.mk index f540534f1..3a46475f4 100644 --- a/caas/BoardConfig.mk +++ b/caas/BoardConfig.mk @@ -144,7 +144,6 @@ BOARD_VBMETAIMAGE_PARTITION_SIZE := 2097152 BOARD_FLASHFILES += $(PRODUCT_OUT)/vbmeta.img AB_OTA_PARTITIONS += vbmeta -AB_OTA_PARTITIONS += tos KERNELFLINGER_SUPPORT_USB_STORAGE ?= true @@ -300,48 +299,9 @@ BUILD_BROKEN_USES_BUILD_HOST_SHARED_LIBRARY := true BUILD_BROKEN_USES_BUILD_HOST_EXECUTABLE := true BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true ############################################################## -# Source: device/intel/mixins/groups/trusty/true/BoardConfig.mk +# Source: device/intel/mixins/groups/trusty/false/BoardConfig.mk ############################################################## -TARGET_USE_TRUSTY := true - -ifneq (, $(filter abl sbl, project-celadon)) -TARGET_USE_MULTIBOOT := true -endif - -BOARD_USES_TRUSTY := true -BOARD_USES_KEYMASTER1 := true -BOARD_SEPOLICY_DIRS += $(INTEL_PATH_SEPOLICY)/trusty/enabled -BOARD_SEPOLICY_M4DEFS += module_trusty=true - -TRUSTY_BUILDROOT = $(PWD)/$(PRODUCT_OUT)/obj/trusty/ - -TRUSTY_ENV_VAR += TRUSTY_REF_TARGET=celadon_64 - -#for trusty vmm -# use same toolchain as android kernel -TRUSTY_ENV_VAR += CLANG_BINDIR=$(PWD)/$(LLVM_PREBUILTS_PATH) -TRUSTY_ENV_VAR += COMPILE_TOOLCHAIN=$(YOCTO_CROSSCOMPILE) -TRUSTY_ENV_VAR += TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT) -TRUSTY_ENV_VAR += BOOT_ARCH=project-celadon - -# output build dir to android out folder -TRUSTY_ENV_VAR += BUILD_DIR=$(TRUSTY_BUILDROOT) -ifeq ($(LKDEBUG),2) -TRUSTY_ENV_VAR += LKBIN_DIR=$(PWD)/vendor/intel/fw/trusty-release-binaries/debug/ -else -TRUSTY_ENV_VAR += LKBIN_DIR=$(PWD)/vendor/intel/fw/trusty-release-binaries/ -endif - -#Fix the cpu hotplug fail due to the trusty. -#Trusty will introduce some delay for cpu_up(). -#Experiment show need wait at least 60us after -#apic_icr_write(APIC_DM_STARTUP | (start_eip >> 12), phys_apicid); -#So here override the cpu_init_udelay to have the cpu wait for 300us -#to guarantee the cpu_up success. -BOARD_KERNEL_CMDLINE += cpu_init_udelay=10 - -#TOS_PREBUILT := $(PWD)/$(INTEL_PATH_VENDOR)/fw/evmm/tos.img -#EVMM_PREBUILT := $(PWD)/$(INTEL_PATH_VENDOR)/fw/evmm/multiboot.img +BOARD_SEPOLICY_DIRS += $(INTEL_PATH_SEPOLICY)/trusty/disabled ############################################################## # Source: device/intel/mixins/groups/firststage-mount/true/BoardConfig.mk ############################################################## diff --git a/caas/device.mk b/caas/device.mk index 0d6d1f4fc..aaf707c9f 100644 --- a/caas/device.mk +++ b/caas/device.mk @@ -300,39 +300,10 @@ PRODUCT_COPY_FILES += device/intel/civ/host/vm-manager/scripts/start_flash_usb.s PRODUCT_COPY_FILES += vendor/intel/fw/trusty-release-binaries/rpmb_dev:$(PRODUCT_OUT)/scripts/rpmb_dev PRODUCT_COPY_FILES += $(LOCAL_PATH)/wakeup.py:$(PRODUCT_OUT)/scripts/wakeup.py ############################################################## -# Source: device/intel/mixins/groups/trusty/true/product.mk +# Source: device/intel/mixins/groups/trusty/false/product.mk ############################################################## - -KM_VERSION := 2 - -ifeq ($(KM_VERSION),2) PRODUCT_PACKAGES += \ - keystore.trusty -PRODUCT_PROPERTY_OVERRIDES += \ - ro.hardware.keystore=trusty -endif - -ifeq ($(KM_VERSION),1) -PRODUCT_PACKAGES += \ - keystore.${TARGET_BOARD_PLATFORM} -endif - -PRODUCT_PACKAGES += \ - libtrusty \ - storageproxyd \ - libinteltrustystorage \ - libinteltrustystorageinterface \ - android.hardware.gatekeeper@1.0-service.trusty \ - keybox_provisioning \ - -PRODUCT_PACKAGES_DEBUG += \ - intel-secure-storage-unit-test \ - gatekeeper-unit-tests \ - libscrypt_static \ - scrypt_test \ - -PRODUCT_PROPERTY_OVERRIDES += \ - ro.hardware.gatekeeper=trusty \ + android.hardware.gatekeeper@1.0-service.software ############################################################## # Source: device/intel/mixins/groups/vendor-partition/true/product.mk ############################################################## diff --git a/caas/extra_files/firststage-mount/config.asl b/caas/extra_files/firststage-mount/config.asl index 0427707ab..b4552a73c 100644 --- a/caas/extra_files/firststage-mount/config.asl +++ b/caas/extra_files/firststage-mount/config.asl @@ -16,7 +16,7 @@ Scope(_SB) Package () { Package () {"android.compatible", "android,firmware"}, Package () {"android.vbmeta.compatible","android,vbmeta"}, - Package () {"android.vbmeta.parts","vbmeta,boot,system,vendor,tos,product"}, + Package () {"android.vbmeta.parts","vbmeta,boot,system,vendor,product"}, Package () {"android.fstab.compatible", "android,fstab"}, Package () {"android.fstab.vendor.compatible", "android,vendor"}, Package () {"android.fstab.vendor.dev", "/dev/block/pci/pci0000:00/0000:00:ff.ff/by-name/vendor"}, // Varies with platform diff --git a/caas/extra_files/trusty/load_trusty_modules.in b/caas/extra_files/trusty/load_trusty_modules.in deleted file mode 100644 index 8d19c1ee5..000000000 --- a/caas/extra_files/trusty/load_trusty_modules.in +++ /dev/null @@ -1,18 +0,0 @@ -load_trusty_modules() { - # Intall virtio drivers Trusty depends on - insmod $modules/virtio.ko - insmod $modules/virtio_ring.ko - - # Install Trusty drivers - insmod $modules/trusty.ko - #insmod $modules/trusty-irq.ko - insmod $modules/trusty-mem.ko - insmod $modules/trusty-ipc.ko - insmod $modules/trusty-virtio.ko - insmod $modules/trusty-log.ko - insmod $modules/trusty-wall.ko - insmod $modules/trusty-timer.ko - setprop vendor.modules.trusty.ready true -} - -load_trusty_modules& diff --git a/caas/extra_files/trusty/trusty_project-celadon.mk b/caas/extra_files/trusty/trusty_project-celadon.mk deleted file mode 100644 index 1d0a3b3cc..000000000 --- a/caas/extra_files/trusty/trusty_project-celadon.mk +++ /dev/null @@ -1,50 +0,0 @@ -INSTALLED_TOS_IMAGE_TARGET := $(PRODUCT_OUT)/tos.img -INSTALLED_MULTIBOOT_IMAGE_TARGET := none -TOS_SIGNING_KEY := $(PRODUCT_VERITY_SIGNING_KEY).pk8 -TOS_SIGNING_CERT := $(PRODUCT_VERITY_SIGNING_KEY).x509.pem - -tosimage: $(INSTALLED_TOS_IMAGE_TARGET) - -ifeq ($(INTEL_PREBUILT), true) -$(INSTALLED_TOS_IMAGE_TARGET): - $(hide) (cp $(INTEL_PATH_PREBUILTS)/tos.img $(INSTALLED_TOS_IMAGE_TARGET)) -else -ifeq ($(wildcard $(TOS_PREBUILT)), ) -ifeq (true,$(BOARD_AVB_ENABLE)) -$(INSTALLED_TOS_IMAGE_TARGET): $(LK_ELF) $(EVMM_LK_PKG) $(MKBOOTIMG) $(AVBTOOL) - @echo "mkbootimg to create boot image for TOS file: $@" - $(hide) $(MKBOOTIMG) --kernel $(EVMM_LK_PKG) --output $@ - @echo "$(AVBTOOL): add hashfooter to TOS file: $@" - $(hide) $(AVBTOOL) add_hash_footer \ - --image $@ \ - --partition_size $(BOARD_TOSIMAGE_PARTITION_SIZE) \ - --partition_name tos \ - --algorithm $(BOARD_AVB_ALGORITHM) --key $(BOARD_AVB_KEY_PATH) - $(hide) mkdir -p $(INTEL_PATH_PREBUILTS_OUT) - $(hide) (cp $@ $(INTEL_PATH_PREBUILTS_OUT)) -else # BOARD_AVB_ENABLE == false -$(INSTALLED_TOS_IMAGE_TARGET): $(LK_ELF) $(EVMM_LK_PKG) $(MKBOOTIMG) $(BOOT_SIGNER) - @echo "mkbootimg to create boot image for TOS file: $@" - $(hide) $(MKBOOTIMG) --kernel $(EVMM_LK_PKG) --output $@ - $(if $(filter true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_BOOT_SIGNER)),\ - @echo "$(BOOT_SIGNER): sign prebuilt TOS file: $@" &&\ - $(BOOT_SIGNER) /tos $@ $(TOS_SIGNING_KEY) $(TOS_SIGNING_CERT) $@) - $(hide) mkdir -p $(INTEL_PATH_PREBUILTS_OUT) - $(hide) (cp $@ $(INTEL_PATH_PREBUILTS_OUT)) -endif # BOARD_AVB_ENABLE -else # TOS_PREBUILT == true -$(INSTALLED_TOS_IMAGE_TARGET): - @echo "Use prebuilt tos image $(TOS_PREBUILT)" - $(hide) (cp $(TOS_PREBUILT) $(INSTALLED_TOS_IMAGE_TARGET)) - $(hide) mkdir -p $(INTEL_PATH_PREBUILTS_OUT) - $(hide) (cp $@ $(INTEL_PATH_PREBUILTS_OUT)) -endif # TOS_PREBUILT -endif # INTEL_PREBUILT - -ifeq (true,$(BOARD_AVB_ENABLE)) -INSTALLED_VBMETAIMAGE_TARGET ?= $(PRODUCT_OUT)/vbmeta.img -BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --include_descriptors_from_image $(INSTALLED_TOS_IMAGE_TARGET) -$(INSTALLED_VBMETAIMAGE_TARGET): $(INSTALLED_TOS_IMAGE_TARGET) -endif - -INSTALLED_RADIOIMAGE_TARGET += $(INSTALLED_TOS_IMAGE_TARGET) diff --git a/caas/flashfiles.ini b/caas/flashfiles.ini index 9262e714a..2a0205e67 100644 --- a/caas/flashfiles.ini +++ b/caas/flashfiles.ini @@ -47,11 +47,6 @@ tool = fastboot args = erase teedata description = Erase teedata partition -[command.flash.tos] -tool = fastboot -args = flash tos_a $file -file = radio:tos.img -description = Flash tos partition ############################################################## diff --git a/caas/fstab b/caas/fstab index 7830d986e..f2f0a41bc 100644 --- a/caas/fstab +++ b/caas/fstab @@ -12,7 +12,6 @@ system /system ext4 ro,barrier=1 wait,slotselect,avb_keys=/avb/q-gsi.avbpubke /dev/block/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,errors=panic wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts,quota,reservedsize=50m,fsverity,latemount,keydirectory=/metadata/vold/metadata_encryption,checkpoint=block /dev/block/by-name/boot /boot emmc defaults defaults,slotselect,avb /dev/block/by-name/misc /misc emmc defaults defaults -/dev/block/by-name/tos /tos emmc defaults defaults,slotselect,avb /dev/block/by-name/bootloader /bootloader emmc defaults recoveryonly /dev/block/by-name/bootloader2 /bootloader2 emmc defaults recoveryonly /dev/block/by-name/persistent /persistent emmc defaults defaults diff --git a/caas/fstab.recovery b/caas/fstab.recovery index 37221475b..b67c70188 100644 --- a/caas/fstab.recovery +++ b/caas/fstab.recovery @@ -12,7 +12,6 @@ system /system ext4 ro,barrier=1 wait,slotselect,avb_keys=/avb/q-gsi.avbpubke /dev/block/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,errors=panic wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts /dev/block/by-name/boot /boot emmc defaults defaults /dev/block/by-name/misc /misc emmc defaults defaults -/dev/block/by-name/tos /tos emmc defaults defaults,slotselect /dev/block/by-name/bootloader /bootloader emmc defaults recoveryonly /dev/block/by-name/bootloader2 /bootloader2 emmc defaults recoveryonly /dev/block/by-name/persistent /persistent emmc defaults defaults diff --git a/caas/gpt.ini b/caas/gpt.ini index 82a2f740b..7372f8faa 100644 --- a/caas/gpt.ini +++ b/caas/gpt.ini @@ -22,7 +22,7 @@ has_slot = true # Source: device/intel/mixins/groups/boot-arch/project-celadon/gpt.ini ############################################################## [base] -partitions = bootloader bootloader2 boot tos misc metadata acpio super data persistent teedata +partitions = bootloader bootloader2 boot misc metadata acpio super data persistent teedata device = auto nb_slot = 2 @@ -45,11 +45,6 @@ len = 30 type = boot has_slot = true -[partition.tos] -label = tos -len = 10 -type = boot -has_slot = true [partition.misc] label = misc diff --git a/caas/init.rc b/caas/init.rc index d10efc007..1ffe4077e 100644 --- a/caas/init.rc +++ b/caas/init.rc @@ -41,7 +41,7 @@ on post-fs-data on early-boot insmod /vendor/lib/modules/cfg80211.ko - insmod /vendor/lib/modules/iwl7000_mac80211.ko + insmod /vendor/lib/modules/mac80211.ko insmod /vendor/lib/modules/iwlwifi.ko insmod /vendor/lib/modules/iwlmvm.ko power_scheme=1 @@ -187,31 +187,6 @@ on post-fs insmod /vendor/lib/modules/r8152.ko insmod /vendor/lib/modules/r8169.ko ############################################################## -# Source: device/intel/mixins/groups/trusty/true/init.rc -############################################################## -on post-fs-data - mkdir /data/vendor/securestorage 0700 system system - chmod 666 /dev/rpmb0 - -on early-boot - start storageproxyd - -service storageproxyd /vendor/bin/storageproxyd -d /dev/trusty-ipc-dev0 -p /data/vendor/securestorage -r /dev/vport0p1 -t virt - user system - group system - -on boot - start keyboxd - -service keyboxd /vendor/bin/keybox_provisioning -d /dev/trusty-ipc-dev0 -p /dev/block/by-name/teedata - user system - group system - oneshot - -on post-fs - wait_for_prop vendor.modules.trusty.ready true - chmod 666 /dev/vport0p1 -############################################################## # Source: device/intel/mixins/groups/config-partition/true/init.rc ############################################################## # Enable SELinux labeling diff --git a/caas/ueventd.rc b/caas/ueventd.rc index 5d7064032..f3a30e4e9 100644 --- a/caas/ueventd.rc +++ b/caas/ueventd.rc @@ -28,11 +28,6 @@ # Used by WideVine /dev/meimm 0660 system drmrpc ############################################################## -# Source: device/intel/mixins/groups/trusty/true/ueventd.rc -############################################################## -/dev/block/p*/*/*/by-name/teedata 0660 system system -/dev/trusty-ipc-dev0 0666 root root -############################################################## # Source: device/intel/mixins/groups/graphics/auto/ueventd.rc ############################################################## /dev/sw_sync 0666 system mediadrm diff --git a/caas_cfc/init.rc b/caas_cfc/init.rc index 761241027..bcba53531 100644 --- a/caas_cfc/init.rc +++ b/caas_cfc/init.rc @@ -41,7 +41,7 @@ on post-fs-data on early-boot insmod /vendor/lib/modules/cfg80211.ko - insmod /vendor/lib/modules/iwl7000_mac80211.ko + insmod /vendor/lib/modules/mac80211.ko insmod /vendor/lib/modules/iwlwifi.ko insmod /vendor/lib/modules/iwlmvm.ko power_scheme=1 diff --git a/celadon_ivi/init.rc b/celadon_ivi/init.rc index 3c50cd7e6..cab2c5f5c 100644 --- a/celadon_ivi/init.rc +++ b/celadon_ivi/init.rc @@ -31,7 +31,7 @@ on post-fs-data on early-boot insmod /vendor/lib/modules/cfg80211.ko - insmod /vendor/lib/modules/iwl7000_mac80211.ko + insmod /vendor/lib/modules/mac80211.ko insmod /vendor/lib/modules/iwlwifi.ko insmod /vendor/lib/modules/iwlmvm.ko power_scheme=1 diff --git a/celadon_tablet/init.rc b/celadon_tablet/init.rc index 2e7e3668e..545ee0885 100644 --- a/celadon_tablet/init.rc +++ b/celadon_tablet/init.rc @@ -31,7 +31,7 @@ on post-fs-data on early-boot insmod /vendor/lib/modules/cfg80211.ko - insmod /vendor/lib/modules/iwl7000_mac80211.ko + insmod /vendor/lib/modules/mac80211.ko insmod /vendor/lib/modules/iwlwifi.ko insmod /vendor/lib/modules/iwlmvm.ko power_scheme=1