diff --git a/core/combo/arch/arm/armv7-a-neon.mk b/core/combo/arch/arm/armv7-a-neon.mk index a7185f013e..4c25e22e54 100644 --- a/core/combo/arch/arm/armv7-a-neon.mk +++ b/core/combo/arch/arm/armv7-a-neon.mk @@ -9,7 +9,10 @@ ARCH_ARM_HAVE_NEON := true ifneq (,$(filter cortex-a15 denver,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT))) arch_variant_cflags := -mcpu=cortex-a15 else -ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a8) +ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a9) + arch_variant_cflags := -mcpu=cortex-a9 +else +ifneq (,$(filter cortex-a8 scorpion,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT))) arch_variant_cflags := -mcpu=cortex-a8 else ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),cortex-a7) @@ -19,6 +22,7 @@ else endif endif endif +endif arch_variant_cflags += \ -mfloat-abi=softfp \ diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh index 342d9cf313..e370bf31ad 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh @@ -42,10 +42,9 @@ fi echo "ro.wifi.channels=$PRODUCT_DEFAULT_WIFI_CHANNELS" echo "ro.board.platform=$TARGET_BOARD_PLATFORM" -echo "# ro.build.product is obsolete; use ro.product.device" -echo "ro.build.product=$TARGET_DEVICE" - if [ "$TARGET_UNIFIED_DEVICE" == "" ] ; then + echo "# ro.build.product is obsolete; use ro.product.device" + echo "ro.build.product=$TARGET_DEVICE" echo "ro.product.model=$PRODUCT_MODEL" echo "ro.product.device=$TARGET_DEVICE" echo "# Do not try to parse description, fingerprint, or thumbprint" diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 184d73c753..cc98efa63f 100755 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -869,6 +869,11 @@ def FullOTA_InstallEnd(self): used to install the image for the device's baseband processor.""" return self._DoCall("FullOTA_InstallEnd") + def FullOTA_PostValidate(self): + """Called after installing and validating /system; typically this is + used to resize the system partition after a block based installation.""" + return self._DoCall("FullOTA_PostValidate") + def IncrementalOTA_Assertions(self): """Called after emitting the block of assertions at the top of an incremental OTA package. Implementations can add whatever @@ -1120,7 +1125,10 @@ def _CheckFirstBlock(self, script): # map recovery.fstab's fs_types to mount/format "partition types" PARTITION_TYPES = { "yaffs2": "MTD", "mtd": "MTD", "ext4": "EMMC", "emmc": "EMMC", - "f2fs": "EMMC" } + "f2fs": "EMMC", + "ext2": "EMMC", + "ext3": "EMMC", + "vfat": "EMMC" } def GetTypeAndDevice(mount_point, info): fstab = info["fstab"] diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py index 2931410d4a..2bfc30968a 100644 --- a/tools/releasetools/edify_generator.py +++ b/tools/releasetools/edify_generator.py @@ -167,7 +167,9 @@ def ValidateSignatures(self, command): self.script.append('package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");') self.script.append('package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");') self.script.append('set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);') - self.script.append('run_program("/tmp/otasigcheck.sh") == "0" || abort("Can\'t install this package on top of incompatible data. Please try another package or run a factory reset");') + self.script.append('run_program("/tmp/otasigcheck.sh");') + ## The script changes the key value when it fails, check for "INVALID" + self.script.append('sha1_check(read_file("/tmp/releasekey"),"7241e92725436afc79389d4fc2333a2aa8c20230") && abort("Can\'t install this package on top of incompatible data. Please try another package or run a factory reset");') def ShowProgress(self, frac, dur): """Update the progress bar, advancing it over 'frac' over the next diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files index fdab8f5ac4..0438f04713 100755 --- a/tools/releasetools/ota_from_target_files +++ b/tools/releasetools/ota_from_target_files @@ -567,6 +567,7 @@ reboot_now("%(bcb_dev)s", "recovery"); else if get_stage("%(bcb_dev)s") == "3/3" then """ % bcb_dev) + script.AppendExtra("ifelse(is_mounted(\"/system\"), unmount(\"/system\"));") device_specific.FullOTA_InstallBegin() if OPTIONS.backuptool: @@ -695,6 +696,8 @@ else if get_stage("%(bcb_dev)s") == "3/3" then if block_based: script.Unmount("/system") + device_specific.FullOTA_PostValidate() + if OPTIONS.backuptool: script.ShowProgress(0.02, 10) if block_based: diff --git a/tools/repopick.py b/tools/repopick.py index 2600bde49a..13be69095f 100755 --- a/tools/repopick.py +++ b/tools/repopick.py @@ -264,6 +264,7 @@ def is_pathA_subdir_of_pathB(pathA, pathB): # Extract information from the JSON response date_fluff = '.000000000' project_name = data['project'] + project_branch = data['branch'] change_number = data['_number'] status = data['status'] current_revision = data['revisions'][data['current_revision']] @@ -290,6 +291,27 @@ def is_pathA_subdir_of_pathB(pathA, pathB): # - check that the project path exists if project_name in project_name_to_path: project_path = project_name_to_path[project_name]; + + if project_path.startswith('hardware/qcom/'): + split_path = project_path.split('/') + # split_path[2] might be display or it might be display-caf, trim the -caf + split_path[2] = split_path[2].split('-')[0] + + # Need to treat hardware/qcom/{audio,display,media} specially + if split_path[2] == 'audio' or split_path[2] == 'display' or split_path[2] == 'media': + split_branch = project_branch.split('-') + + # display is extra special + if split_path[2] == 'display' and len(split_path) == 3: + project_path = '/'.join(split_path) + else: + project_path = '/'.join(split_path[:-1]) + + if len(split_branch) == 4 and split_branch[0] == 'cm' and split_branch[2] == 'caf': + project_path += '-caf/msm' + split_branch[3] + # audio and media are different from display + elif split_path[2] == 'audio' or split_path[2] == 'media': + project_path += '/default' elif args.ignore_missing: print('WARNING: Skipping %d since there is no project directory for: %s\n' % (change_number, project_name)) continue;