Skip to content

Commit

Permalink
recovery:updater: Changes to support 32->64 bit upgrades
Browse files Browse the repository at this point in the history
We now support upgrading from 32 to 64 bit builds. The check for device to
package compatibility now takes into account if the product name on the
device vs the product name on the upgrade build differs only by the _32
or _64 trailing chars. In addition we also force compile the updater binary
as 32 bit executable so that it can run on the 32 bit build we are upgrading
from.

Change-Id: I51bdf948650b9c3b61cfac7142422b7325270940
Signed-off-by: AudioGod <[email protected]>
  • Loading branch information
boedhack authored and AudioGod committed May 18, 2016
1 parent 838768c commit 10d1820
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions updater/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
# any subsidiary static libraries required for your registered
# extension libs.

ifeq ($(TARGET_ARCH),arm64)
inc := $(call intermediates-dir-for,PACKAGING,updater_extensions,,,32)/register.inc
else
inc := $(call intermediates-dir-for,PACKAGING,updater_extensions)/register.inc

endif
# Encode the value of TARGET_RECOVERY_UPDATER_LIBS into the filename of the dependency.
# So if TARGET_RECOVERY_UPDATER_LIBS is changed, a new dependency file will be generated.
# Note that we have to remove any existing depency files before creating new one,
Expand All @@ -79,13 +82,18 @@ $(inc) : $(inc_dep_file)
$(hide) $(foreach lib,$(libs),echo " Register_$(lib)();" >> $@;)
$(hide) echo "}" >> $@

$(call intermediates-dir-for,EXECUTABLES,updater,,,$(TARGET_PREFER_32_BIT))/updater.o : $(inc)
ifeq ($(TARGET_ARCH),arm64)
$(call intermediates-dir-for,EXECUTABLES,updater,,,32)/updater.o : $(inc)
else
$(call intermediates-dir-for,EXECUTABLES,updater)/updater.o : $(inc)
endif
LOCAL_C_INCLUDES += $(dir $(inc))

inc :=
inc_dep_file :=

LOCAL_MODULE := updater
LOCAL_32_BIT_ONLY := true

LOCAL_FORCE_STATIC_EXECUTABLE := true

Expand Down

0 comments on commit 10d1820

Please sign in to comment.