app: aboot: Verify boot image signature

Verify boot image signature as part of fastboot boot
command and fix buffer over read issues by sanitize
the kernel, ramdisk, page size read from boot image
header.

CRs-Fixed: 681957 682002
Change-Id: I546502c7a9479c8a41453e32c6cb14bc850709fe
Merge "app: aboot: Verify boot image signature"
Update to AU_LINUX_ANDROID_LNX.LA.3.5.2.1.04.04.02.060.112

Change-Id: I076c9bda4a9c598a22208420709667d22c7f7a5f
Merge "Update to AU_LINUX_ANDROID_LNX.LA.3.5.2.1.04.04.02.060.112"
platform: msm_shared: check for atags address

verifying the tags address with aboot addresses in case of
dtb is appended with the kernel.

CRs-Fixed: 681965
Change-Id: Iba14976d07d7f287c1e8f13762f20c4283eef4d2
platform: msm_shared: check for atags address

verifying the tags address with aboot addresses in case of
dtb is appended with the kernel.

CRs-Fixed: 681965
Change-Id: Iba14976d07d7f287c1e8f13762f20c4283eef4d2
Merge "platform: msm_shared: check for atags address"
Merge "platform: msm_shared: check for atags address"
Update to AU_LINUX_ANDROID_LNX.LA.3.5.2.1.04.04.02.060.117

Change-Id: I4bcbf98c3c0741bdfebfa6f05576655ceb788019
Merge "Update to AU_LINUX_ANDROID_LNX.LA.3.5.2.1.04.04.02.060.117"
app: aboot: Fix size check for boot image

If the boot image is signed include signature size while validating
the size of boot image.

CRs-Fixed: 682002
Change-Id: I8a87fd9723e87af4f17bad7635486d415a9b5a7e
platform: msm_shared: Added checks for integer wrap.

It will check for the integer wrap around incase of dev_tree_appended
and verifies the dev tree addresses with in the range

CRs-Fixed: 684764
Change-Id: Idd1c74003cc8d4799e8a2855fe405f3ce79b3ea3
Merge "platform: msm_shared: Added checks for integer wrap."
app: aboot: Modify the integer overflow check

If the code is compiled on an architecture which supports 64-bit integer
primitive, then the start and size will be promoted to 64-bit integers
and hence overflow will not be detected. So modify the boundary check to
detect integer overflow.

CRs-Fixed: 590434
Change-Id: I1f93972c12d155f8d06dd6aeedd3e8f2ea09c2f1
Merge "app: aboot: Modify the integer overflow check"
ensure enter into recovery mode again when the battery was lost

Change-Id: Ifcf5125e36462b4ffcacdf5e55ea948aa70249f9
Merge "app: aboot: Fix size check for boot image"
Merge branch 'foxfone-one-v1.4' into MSM.FIREFOX.1.4
Modify Logo as TS for cust requirment

Change-Id: I340d8a85b9b9d320558804f94cf238b1041fcc20
###%%%comment:PR754786 Fix 'can't power off when insert adapter'
###%%%bug number:754786
###%%%product name:foxfone-one-v1.4
###%%%root cause:Coding
###%%%Bug category:T2M bug
###%%%Module_Impact:power
###%%%Test_Suggestion:NULL
###%%%Solution:get cmdline
###%%%Test_Report:NULL
###%%%VAL Can Test:Yes

Change-Id: I3ca1b8096d7e02355cad45543e9688af41fa4b44