land: Update firmware on install-time

This ensures that every user has the same firwmare.

Change-Id: I000f004e797f5f7b87b278491070631a54547021
This commit is contained in:
Zhao Wei Liew 2016-11-11 08:21:38 +08:00
parent ae19300740
commit 4796eb37b3
5 changed files with 79 additions and 1 deletions

4
board/recovery.mk Normal file
View file

@ -0,0 +1,4 @@
# Recovery
TARGET_RECOVERY_UI_LIB := librecovery_ui_msm
TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_msm
TARGET_RELEASETOOLS_EXTENSIONS := device/qcom/common

View file

@ -38,10 +38,13 @@ if [ $# -eq 0 ]; then
else
if [ $# -eq 1 ]; then
SRC=$1
elif [ $# -eq 2 ]; then
SRC=$1
RADIO_SRC=$2
else
echo "$0: bad number of arguments"
echo ""
echo "usage: $0 [PATH_TO_EXPANDED_ROM]"
echo "usage: $0 [PATH_TO_EXPANDED_ROM] [PATH_TO_RADIO_FOLDER]"
echo ""
echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from"
echo "the device using adb pull."
@ -53,5 +56,8 @@ fi
setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
extract "$MY_DIR"/proprietary-files.txt "$SRC"
if [ -n "$RADIO_SRC" ]; then
extract_firmware "$MY_DIR"/proprietary-firmware.txt "$RADIO_SRC"
fi
"$MY_DIR"/setup-makefiles.sh

12
proprietary-firmware.txt Normal file
View file

@ -0,0 +1,12 @@
# Firmware images
NON-HLOS.bin
adspso.bin
cmnlib64.mbn
cmnlib.mbn
devcfg.mbn
emmc_appsboot.mbn
keymaster.mbn
lksecapp.mbn
rpm.mbn
sbl1.mbn
tz.mbn

53
radio/filesmap Normal file
View file

@ -0,0 +1,53 @@
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# filename partition
NON-HLOS.bin /dev/block/bootdevice/by-name/modem
sbl1.mbn /dev/block/bootdevice/by-name/sbl1
tz.mbn /dev/block/bootdevice/by-name/tz
rpm.mbn /dev/block/bootdevice/by-name/rpm
emmc_appsboot.mbn /dev/block/bootdevice/by-name/aboot
adspso.bin /dev/block/bootdevice/by-name/dsp
devcfg.mbn /dev/block/bootdevice/by-name/devcfg
lksecapp.mbn /dev/block/bootdevice/by-name/lksecapp
cmnlib.mbn /dev/block/bootdevice/by-name/cmnlib
cmnlib64.mbn /dev/block/bootdevice/by-name/cmnlib64
keymaster.mbn /dev/block/bootdevice/by-name/keymaster
# filename + .bak backup partition
sbl1.mbn.bak /dev/block/bootdevice/by-name/sbl1bak
tz.mbn.bak /dev/block/bootdevice/by-name/tzbak
rpm.mbn.bak /dev/block/bootdevice/by-name/rpmbak
emmc_appsboot.mbn.bak /dev/block/bootdevice/by-name/abootbak
devcfg.mbn.bak /dev/block/bootdevice/by-name/devcfgbak
lksecapp.mbn.bak /dev/block/bootdevice/by-name/lksecappbak
cmnlib.mbn.bak /dev/block/bootdevice/by-name/cmnlibbak
cmnlib64.mbn.bak /dev/block/bootdevice/by-name/cmnlib64bak
keymaster.mbn.bak /dev/block/bootdevice/by-name/keymasterbak

View file

@ -50,5 +50,8 @@ cat << EOF >> "$ANDROIDMK"
EOF
# Append the calls to firmware images
append_firmware_calls_to_makefiles
# We are done!
write_footers