upload android base code part6
This commit is contained in:
parent
421e214c7d
commit
4e516ec6ed
35396 changed files with 9188716 additions and 0 deletions
49
android/device/common/CleanSpec.mk
Normal file
49
android/device/common/CleanSpec.mk
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Copyright (C) 2007 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# If you don't need to do a full clean build but would like to touch
|
||||
# a file or delete some intermediate files, add a clean step to the end
|
||||
# of the list. These steps will only be run once, if they haven't been
|
||||
# run before.
|
||||
#
|
||||
# E.g.:
|
||||
# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
|
||||
# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
|
||||
#
|
||||
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
|
||||
# files that are missing or have been moved.
|
||||
#
|
||||
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
|
||||
# Use $(OUT_DIR) to refer to the "out" directory.
|
||||
#
|
||||
# If you need to re-do something that's already mentioned, just copy
|
||||
# the command and add it to the bottom of the list. E.g., if a change
|
||||
# that you made last week required touching a file and a change you
|
||||
# made today requires touching the same file, just copy the old
|
||||
# touch step and add it to the end of the list.
|
||||
#
|
||||
# ************************************************
|
||||
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
|
||||
# ************************************************
|
||||
|
||||
# For example:
|
||||
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
|
||||
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
|
||||
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
|
||||
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
|
||||
|
||||
# ************************************************
|
||||
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
|
||||
# ************************************************
|
34
android/device/common/clear-factory-images-variables.sh
Normal file
34
android/device/common/clear-factory-images-variables.sh
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2012 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
unset BOOTLOADER
|
||||
unset BOOTLOADERFILE
|
||||
unset BOOTLOADERSRC
|
||||
unset BUILD
|
||||
unset CDMARADIO
|
||||
unset CDMARADIOFILE
|
||||
unset DEVICE
|
||||
unset ERASE
|
||||
unset PRODUCT
|
||||
unset RADIO
|
||||
unset RADIOFILE
|
||||
unset RADIOSRC
|
||||
unset RADIOFILE
|
||||
unset SLEEPDURATION
|
||||
unset SRCPREFIX
|
||||
unset UNLOCKBOOTLOADER
|
||||
unset VERSION
|
||||
unset TWINBOOTLOADERS
|
||||
unset XLOADER
|
||||
unset XLOADERSRC
|
144
android/device/common/generate-blob-lists.sh
Executable file
144
android/device/common/generate-blob-lists.sh
Executable file
|
@ -0,0 +1,144 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (C) 2010 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This script auto-generates the lists of proprietary blobs necessary to build
|
||||
# the Android Open-Source Project code for a variety of hardware targets.
|
||||
|
||||
# It needs to be run from the root of a source tree that can repo sync,
|
||||
# runs builds with and without the vendor tree, and uses the difference
|
||||
# to generate the lists.
|
||||
|
||||
# It can optionally upload the results to a Gerrit server for review.
|
||||
|
||||
# WARNING: It destroys the source tree. Don't leave anything precious there.
|
||||
|
||||
# Caveat: this script does many full builds (2 per device). It takes a while
|
||||
# to run. It's best # suited for overnight runs on multi-CPU machines
|
||||
# with a lot of RAM.
|
||||
|
||||
# Syntax: device/common/generate-blob-lists.sh -f|--force [<server> <branch>]
|
||||
#
|
||||
# If the server and branch paramters are both present, the script will upload
|
||||
# new files (if there's been any change) to the mentioned Gerrit server,
|
||||
# in the specified branch.
|
||||
|
||||
if test "$1" != "-f" -a "$1" != "--force"
|
||||
then
|
||||
echo This script must be run with the --force option
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
|
||||
repo sync -j32 -n
|
||||
repo sync -j32 -n
|
||||
repo sync -j2 -l
|
||||
|
||||
DEVICES=$(for i in device/*/*/proprietary-blobs.txt ; do basename $(dirname $i) ; done)
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
ARCHIVEDIR=archive-$(date +%s)
|
||||
if test -d archive-ref
|
||||
then
|
||||
cp -R archive-ref $ARCHIVEDIR
|
||||
else
|
||||
mkdir $ARCHIVEDIR
|
||||
|
||||
. build/envsetup.sh
|
||||
for DEVICENAME in $DEVICES
|
||||
do
|
||||
rm -rf out
|
||||
lunch aosp_$DEVICENAME-user
|
||||
make -j64
|
||||
cat out/target/product/$DEVICENAME/installed-files.txt |
|
||||
cut -b 15- |
|
||||
sort -f > $ARCHIVEDIR/$DEVICENAME-with.txt
|
||||
done
|
||||
rm -rf vendor
|
||||
rm -rf hardware/qcom/gps
|
||||
for DEVICENAME in $DEVICES
|
||||
do
|
||||
rm -rf out
|
||||
lunch aosp_$DEVICENAME-user
|
||||
make -j64
|
||||
cat out/target/product/$DEVICENAME/installed-files.txt |
|
||||
cut -b 15- |
|
||||
sort -f > $ARCHIVEDIR/$DEVICENAME-without.txt
|
||||
done
|
||||
fi
|
||||
|
||||
for DEVICENAME in $DEVICES
|
||||
do
|
||||
MANUFACTURERNAME=$( find device -type d | grep ^[^/]\*/[^/]\*/$DEVICENAME\$ | cut -f 2 -d / )
|
||||
if test $(wc -l < $ARCHIVEDIR/$DEVICENAME-without.txt) != 0 -a $(wc -l < $ARCHIVEDIR/$DEVICENAME-with.txt) != 0
|
||||
then
|
||||
(
|
||||
date +"# Copyright (C) %Y The Android Open Source Project"
|
||||
echo '#'
|
||||
echo '# Licensed under the Apache License, Version 2.0 (the "License");'
|
||||
echo '# you may not use this file except in compliance with the License.'
|
||||
echo '# You may obtain a copy of the License at'
|
||||
echo '#'
|
||||
echo '# http://www.apache.org/licenses/LICENSE-2.0'
|
||||
echo '#'
|
||||
echo '# Unless required by applicable law or agreed to in writing, software'
|
||||
echo '# distributed under the License is distributed on an "AS IS" BASIS,'
|
||||
echo '# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.'
|
||||
echo '# See the License for the specific language governing permissions and'
|
||||
echo '# limitations under the License.'
|
||||
echo
|
||||
echo '# This file is generated by device/common/generate-blob-lists.sh - DO NOT EDIT'
|
||||
echo
|
||||
comm -13 $ARCHIVEDIR/$DEVICENAME-without.txt $ARCHIVEDIR/$DEVICENAME-with.txt |
|
||||
grep -v '\.odex$'
|
||||
) > $ARCHIVEDIR/$DEVICENAME-proprietary-blobs.txt
|
||||
cp $ARCHIVEDIR/$DEVICENAME-proprietary-blobs.txt device/$MANUFACTURERNAME/$DEVICENAME/proprietary-blobs.txt
|
||||
|
||||
(
|
||||
cd device/$MANUFACTURERNAME/$DEVICENAME
|
||||
git add .
|
||||
git commit -m "$(echo -e 'auto-generated blob list for '$DEVICENAME'\n\nBug: 4295425')"
|
||||
if test "$1" != "" -a "$2" != ""
|
||||
then
|
||||
echo uploading to server $1 branch $2
|
||||
git push $1/device/$MANUFACTURERNAME/$DEVICENAME.git HEAD:refs/for/$2/autoblobs
|
||||
fi
|
||||
)
|
||||
else
|
||||
(
|
||||
cd device/$MANUFACTURERNAME/$DEVICENAME
|
||||
git commit --allow-empty -m "$(echo -e 'DO NOT SUBMIT - BROKEN BUILD\n\nBug: 4295425')"
|
||||
if test "$1" != "" -a "$2" != ""
|
||||
then
|
||||
echo uploading to server $1 branch $2
|
||||
git push $1/device/$MANUFACTURERNAME/$DEVICENAME.git HEAD:refs/for/$2/autoblobs
|
||||
fi
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
||||
if true
|
||||
then
|
||||
rm -rf out/
|
||||
elif ! test -d archive-ref
|
||||
then
|
||||
echo * device/* |
|
||||
tr \ \\n |
|
||||
grep -v ^archive- |
|
||||
grep -v ^device$ |
|
||||
grep -v ^device/common$ |
|
||||
xargs rm -rf
|
||||
fi
|
300
android/device/common/generate-factory-images-common.sh
Normal file
300
android/device/common/generate-factory-images-common.sh
Normal file
|
@ -0,0 +1,300 @@
|
|||
# Copyright 2011 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Use the default values if they weren't explicitly set
|
||||
if test "$XLOADERSRC" = ""
|
||||
then
|
||||
XLOADERSRC=xloader.img
|
||||
fi
|
||||
if test "$BOOTLOADERSRC" = ""
|
||||
then
|
||||
BOOTLOADERSRC=bootloader.img
|
||||
fi
|
||||
if test "$RADIOSRC" = ""
|
||||
then
|
||||
RADIOSRC=radio.img
|
||||
fi
|
||||
if test "$SLEEPDURATION" = ""
|
||||
then
|
||||
SLEEPDURATION=5
|
||||
fi
|
||||
|
||||
# Prepare the staging directory
|
||||
rm -rf tmp
|
||||
mkdir -p tmp/$PRODUCT-$VERSION
|
||||
|
||||
# Extract the bootloader(s) and radio(s) as necessary
|
||||
if test "$XLOADER" != ""
|
||||
then
|
||||
unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$XLOADERSRC
|
||||
fi
|
||||
if test "$BOOTLOADERFILE" = ""
|
||||
then
|
||||
unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$BOOTLOADERSRC
|
||||
fi
|
||||
if test "$RADIO" != "" -a "$RADIOFILE" = ""
|
||||
then
|
||||
unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$RADIOSRC
|
||||
fi
|
||||
if test "$CDMARADIO" != "" -a "$CDMARADIOFILE" = ""
|
||||
then
|
||||
unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/radio-cdma.img
|
||||
fi
|
||||
|
||||
# Copy the various images in their staging location
|
||||
cp ${SRCPREFIX}$PRODUCT-img-$BUILD.zip tmp/$PRODUCT-$VERSION/image-$PRODUCT-$VERSION.zip
|
||||
if test "$XLOADER" != ""
|
||||
then
|
||||
cp tmp/RADIO/$XLOADERSRC tmp/$PRODUCT-$VERSION/xloader-$DEVICE-$XLOADER.img
|
||||
fi
|
||||
if test "$BOOTLOADERFILE" = ""
|
||||
then
|
||||
cp tmp/RADIO/$BOOTLOADERSRC tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img
|
||||
else
|
||||
cp $BOOTLOADERFILE tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img
|
||||
fi
|
||||
if test "$RADIO" != ""
|
||||
then
|
||||
if test "$RADIOFILE" = ""
|
||||
then
|
||||
cp tmp/RADIO/$RADIOSRC tmp/$PRODUCT-$VERSION/radio-$DEVICE-$RADIO.img
|
||||
else
|
||||
cp $RADIOFILE tmp/$PRODUCT-$VERSION/radio-$DEVICE-$RADIO.img
|
||||
fi
|
||||
fi
|
||||
if test "$CDMARADIO" != ""
|
||||
then
|
||||
if test "$CDMARADIOFILE" = ""
|
||||
then
|
||||
cp tmp/RADIO/radio-cdma.img tmp/$PRODUCT-$VERSION/radio-cdma-$DEVICE-$CDMARADIO.img
|
||||
else
|
||||
cp $CDMARADIOFILE tmp/$PRODUCT-$VERSION/radio-cdma-$DEVICE-$CDMARADIO.img
|
||||
fi
|
||||
fi
|
||||
|
||||
# Write flash-all.sh
|
||||
cat > tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright 2012 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
EOF
|
||||
if test "$UNLOCKBOOTLOADER" = "true"
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot oem unlock
|
||||
EOF
|
||||
fi
|
||||
if test "$ERASEALL" = "true"
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot erase boot
|
||||
fastboot erase cache
|
||||
fastboot erase recovery
|
||||
fastboot erase system
|
||||
fastboot erase userdata
|
||||
EOF
|
||||
fi
|
||||
if test "$XLOADER" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot flash xloader xloader-$DEVICE-$XLOADER.img
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
|
||||
EOF
|
||||
if test "$TWINBOOTLOADERS" = "true"
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot reboot-bootloader
|
||||
sleep $SLEEPDURATION
|
||||
EOF
|
||||
if test "$RADIO" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot flash radio radio-$DEVICE-$RADIO.img
|
||||
fastboot reboot-bootloader
|
||||
sleep $SLEEPDURATION
|
||||
EOF
|
||||
fi
|
||||
if test "$CDMARADIO" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot flash radio-cdma radio-cdma-$DEVICE-$CDMARADIO.img
|
||||
fastboot reboot-bootloader
|
||||
sleep $SLEEPDURATION
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
|
||||
fastboot -w update image-$PRODUCT-$VERSION.zip
|
||||
EOF
|
||||
chmod a+x tmp/$PRODUCT-$VERSION/flash-all.sh
|
||||
|
||||
# Write flash-all.bat
|
||||
cat > tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
@ECHO OFF
|
||||
:: Copyright 2012 The Android Open Source Project
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
|
||||
PATH=%PATH%;"%SYSTEMROOT%\System32"
|
||||
EOF
|
||||
if test "$UNLOCKBOOTLOADER" = "true"
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot oem unlock
|
||||
EOF
|
||||
fi
|
||||
if test "$ERASEALL" = "true"
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot erase boot
|
||||
fastboot erase cache
|
||||
fastboot erase recovery
|
||||
fastboot erase system
|
||||
fastboot erase userdata
|
||||
EOF
|
||||
fi
|
||||
if test "$XLOADER" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot flash xloader xloader-$DEVICE-$XLOADER.img
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
|
||||
EOF
|
||||
if test "$TWINBOOTLOADERS" = "true"
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot reboot-bootloader
|
||||
ping -n $SLEEPDURATION 127.0.0.1 >nul
|
||||
EOF
|
||||
if test "$RADIO" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot flash radio radio-$DEVICE-$RADIO.img
|
||||
fastboot reboot-bootloader
|
||||
ping -n $SLEEPDURATION 127.0.0.1 >nul
|
||||
EOF
|
||||
fi
|
||||
if test "$CDMARADIO" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot flash radio-cdma radio-cdma-$DEVICE-$CDMARADIO.img
|
||||
fastboot reboot-bootloader
|
||||
ping -n $SLEEPDURATION 127.0.0.1 >nul
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
|
||||
fastboot -w update image-$PRODUCT-$VERSION.zip
|
||||
|
||||
echo Press any key to exit...
|
||||
pause >nul
|
||||
exit
|
||||
EOF
|
||||
|
||||
# Write flash-base.sh
|
||||
cat > tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright 2012 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
EOF
|
||||
if test "$XLOADER" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
|
||||
fastboot flash xloader xloader-$DEVICE-$XLOADER.img
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
|
||||
fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
|
||||
EOF
|
||||
if test "$TWINBOOTLOADERS" = "true"
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
|
||||
fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img
|
||||
EOF
|
||||
fi
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
|
||||
fastboot reboot-bootloader
|
||||
sleep $SLEEPDURATION
|
||||
EOF
|
||||
if test "$RADIO" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
|
||||
fastboot flash radio radio-$DEVICE-$RADIO.img
|
||||
fastboot reboot-bootloader
|
||||
sleep $SLEEPDURATION
|
||||
EOF
|
||||
fi
|
||||
if test "$CDMARADIO" != ""
|
||||
then
|
||||
cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF
|
||||
fastboot flash radio-cdma radio-cdma-$DEVICE-$CDMARADIO.img
|
||||
fastboot reboot-bootloader
|
||||
sleep $SLEEPDURATION
|
||||
EOF
|
||||
fi
|
||||
chmod a+x tmp/$PRODUCT-$VERSION/flash-base.sh
|
||||
|
||||
# Create the distributable package
|
||||
(cd tmp ; zip -r ../$PRODUCT-$VERSION-factory.zip $PRODUCT-$VERSION)
|
||||
mv $PRODUCT-$VERSION-factory.zip $PRODUCT-$VERSION-factory-$(sha256sum < $PRODUCT-$VERSION-factory.zip | cut -b -8).zip
|
||||
|
||||
# Clean up
|
||||
rm -rf tmp
|
177
android/device/common/generate-packages.sh
Executable file
177
android/device/common/generate-packages.sh
Executable file
|
@ -0,0 +1,177 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2012 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if [ $# != 6 ]
|
||||
then
|
||||
echo Usage: $0 BUILD_ID BUILD ROOTDEVICE DEVICE MANUFACTURER PRODUCT
|
||||
echo Example: $0 1075408 KOT49Y mako mako lge occam
|
||||
fi
|
||||
|
||||
ZIP_TYPE=target_files # ota | target_files
|
||||
|
||||
ZIP=$6-$ZIP_TYPE-$1.zip
|
||||
BUILD=$2
|
||||
|
||||
ROOTDEVICE=$3
|
||||
DEVICE=$4
|
||||
MANUFACTURER=$5
|
||||
|
||||
cd ../$MANUFACTURER/$ROOTDEVICE/self-extractors || echo Error change dir
|
||||
|
||||
EXTRACT_LIST_FILENAME=extract-lists.txt
|
||||
|
||||
for COMPANY in `grep "[a-z|A-Z])" $EXTRACT_LIST_FILENAME | cut -f1 -d')'`
|
||||
do
|
||||
echo Processing files from $COMPANY
|
||||
rm -rf tmp
|
||||
FILEDIR=tmp/vendor/$COMPANY/$DEVICE/proprietary
|
||||
MAKEFILEDIR=tmp/vendor/$COMPANY/$DEVICE/
|
||||
FILEDIR_ROOT=tmp/vendor/$MANUFACTURER/$ROOTDEVICE
|
||||
|
||||
case ${ROOTDEVICE} in
|
||||
dragon|marlin|sailfish|taimen|walleye)
|
||||
FILEDIR_ROOT=tmp/vendor/${MANUFACTURER}_devices/$ROOTDEVICE ;;
|
||||
hikey960)
|
||||
FILEDIR=tmp/vendor/linaro/$DEVICE/$COMPANY/proprietary
|
||||
MAKEFILEDIR=tmp/vendor/linaro/$DEVICE/$COMPANY ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
mkdir -p ${FILEDIR}
|
||||
mkdir -p ${FILEDIR_ROOT}
|
||||
|
||||
TO_EXTRACT=`sed -n -e '/'" $COMPANY"'/,/;;/ p' $EXTRACT_LIST_FILENAME | tail -n+3 | head -n-2 | sed -e 's/\\\//g'`
|
||||
|
||||
# Check if TO_EXTRACT list has any APK files
|
||||
if [[ ${TO_EXTRACT} == *.apk* ]]
|
||||
then
|
||||
APK_MAKEFILE=${FILEDIR}/Android.mk
|
||||
echo "LOCAL_PATH := \$(call my-dir)" > ${APK_MAKEFILE}
|
||||
echo "" >> ${APK_MAKEFILE}
|
||||
fi
|
||||
|
||||
echo \ \ Extracting files from OTA package
|
||||
for ONE_FILE in $TO_EXTRACT
|
||||
do
|
||||
if test ${ZIP_TYPE} = target_files
|
||||
then
|
||||
ONE_FILE=`echo $ONE_FILE | sed 's/system\//SYSTEM\//g'`
|
||||
fi
|
||||
|
||||
if [[ $ONE_FILE == */lib64/* ]]
|
||||
then
|
||||
FILEDIR_NEW=$FILEDIR/lib64
|
||||
elif [[ $ONE_FILE == */arm/nb/* ]]
|
||||
then
|
||||
FILEDIR_NEW=$FILEDIR/armnb
|
||||
else
|
||||
FILEDIR_NEW=$FILEDIR
|
||||
fi
|
||||
|
||||
# apk makefile
|
||||
if [[ ${ONE_FILE} == *.apk ]]
|
||||
then
|
||||
TMP_ONE_FILE_NAME=$(basename ${ONE_FILE} | sed 's/.apk//g')
|
||||
|
||||
echo "include \$(CLEAR_VARS)" >> ${APK_MAKEFILE}
|
||||
|
||||
echo "LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)" >> ${APK_MAKEFILE}
|
||||
echo "LOCAL_MODULE := ${TMP_ONE_FILE_NAME}" >> ${APK_MAKEFILE}
|
||||
echo "LOCAL_MODULE_TAGS := optional" >> ${APK_MAKEFILE}
|
||||
echo "LOCAL_BUILT_MODULE_STEM := package.apk" >> ${APK_MAKEFILE}
|
||||
echo "LOCAL_MODULE_OWNER := ${COMPANY}" >> ${APK_MAKEFILE}
|
||||
echo "LOCAL_MODULE_CLASS := APPS" >> ${APK_MAKEFILE}
|
||||
echo "LOCAL_SRC_FILES := \$(LOCAL_MODULE).apk" >> ${APK_MAKEFILE}
|
||||
echo "LOCAL_CERTIFICATE := PRESIGNED" >> ${APK_MAKEFILE}
|
||||
|
||||
if [[ ${ONE_FILE} == *priv-app/* ]]
|
||||
then
|
||||
echo "LOCAL_PRIVILEGED_MODULE := true" >> ${APK_MAKEFILE}
|
||||
fi
|
||||
|
||||
if [[ ${TMP_ONE_FILE_NAME} == "LeanbackLauncher" ]]
|
||||
then
|
||||
echo "LOCAL_OVERRIDES_PACKAGES := Launcher2" >> ${APK_MAKEFILE}
|
||||
fi
|
||||
|
||||
echo "include \$(BUILD_PREBUILT)" >> ${APK_MAKEFILE}
|
||||
echo "" >> ${APK_MAKEFILE}
|
||||
fi
|
||||
|
||||
echo \ \ \ \ Extracting $ONE_FILE
|
||||
unzip -j -o $ZIP $ONE_FILE -d $FILEDIR_NEW> /dev/null || echo \ \ \ \ Error extracting $ONE_FILE
|
||||
if test ${ONE_FILE,,} = system/vendor/bin/gpsd -o ${ONE_FILE,,} = system/vendor/bin/pvrsrvinit -o ${ONE_FILE,,} = system/bin/fRom
|
||||
then
|
||||
chmod a+x $FILEDIR_NEW/$(basename $ONE_FILE) || echo \ \ \ \ Error chmoding $ONE_FILE
|
||||
fi
|
||||
|
||||
ONE_FILE_BASE=$(basename $ONE_FILE)
|
||||
if [[ $ONE_FILE_BASE == *atmel-a432-*-shamu-p1.tdat ]]
|
||||
then
|
||||
ATMEL_FILE=$(ls $FILEDIR_NEW/$ONE_FILE_BASE | cut -f6 -d'/')
|
||||
sed -i "s/$ONE_FILE_BASE/$ATMEL_FILE/" moto/staging/device-partial.mk
|
||||
elif [[ $ONE_FILE_BASE == *atmel-a432-*-shamu.tdat ]]
|
||||
then
|
||||
ATMEL_FILE=$(ls $FILEDIR_NEW/$ONE_FILE_BASE | cut -f6 -d'/')
|
||||
sed -i "s/$ONE_FILE_BASE/$ATMEL_FILE/" moto/staging/device-partial.mk
|
||||
fi
|
||||
|
||||
done
|
||||
echo \ \ Setting up $COMPANY-specific makefiles
|
||||
cp -R $COMPANY/staging/* $MAKEFILEDIR || echo \ \ \ \ Error copying makefiles
|
||||
echo \ \ Setting up shared makefiles
|
||||
unzip -j -o $ZIP OTA/android-info.txt -d root > /dev/null || echo \ \ \ \ Error extracting OTA/android-info.txt
|
||||
cp -R root/* ${FILEDIR_ROOT} || echo \ \ \ \ Error copying makefiles
|
||||
|
||||
if [[ ${ROOTDEVICE} == sailfish ]]
|
||||
then
|
||||
FILEDIR_ROOT_SHARE=tmp/vendor/${MANUFACTURER}_devices/marlin
|
||||
mkdir -p ${FILEDIR_ROOT_SHARE}
|
||||
|
||||
# sailfish shares BoardConfigVendor.mk with its bro' marlin
|
||||
mv ${FILEDIR_ROOT}/BoardConfigVendor.mk ${FILEDIR_ROOT_SHARE}
|
||||
# Move device-vendor-sailfish.mk under marlin directory so that it can be
|
||||
# inherited by device/google/marlin/aosp_sailfish.mk
|
||||
mv ${FILEDIR_ROOT}/device-vendor-sailfish.mk ${FILEDIR_ROOT_SHARE}
|
||||
elif [[ ${ROOTDEVICE} == walleye ]]
|
||||
then
|
||||
FILEDIR_ROOT_SHARE=tmp/vendor/${MANUFACTURER}_devices/muskie/proprietary
|
||||
mkdir -p ${FILEDIR_ROOT_SHARE}
|
||||
|
||||
# walleye shares BoardConfigVendor.mk with its sis' muskie
|
||||
mv ${FILEDIR_ROOT}/proprietary/BoardConfigVendor.mk ${FILEDIR_ROOT_SHARE}
|
||||
# Move device-vendor-walleye.mk under muskie directory so that it can be
|
||||
# inherited by device/google/muskie/aosp_walleye.mk
|
||||
mv ${FILEDIR_ROOT}/proprietary/device-vendor-walleye.mk ${FILEDIR_ROOT_SHARE}
|
||||
fi
|
||||
|
||||
echo \ \ Generating self-extracting script
|
||||
SCRIPT=extract-$COMPANY-$DEVICE.sh
|
||||
cat PROLOGUE > tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
cat $COMPANY/COPYRIGHT >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
cat PART1 >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
cat $COMPANY/LICENSE >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
cat PART2 >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
echo tail -n +$(expr 2 + $(cat PROLOGUE $COMPANY/COPYRIGHT PART1 $COMPANY/LICENSE PART2 PART3 | wc -l)) \$0 \| tar zxv >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
cat PART3 >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
(cd tmp ; tar zc --owner=root --group=root vendor/ >> $SCRIPT || echo \ \ \ \ Error generating embedded tgz)
|
||||
chmod a+x tmp/$SCRIPT || echo \ \ \ \ Error generating script
|
||||
ARCHIVE=$COMPANY-$DEVICE-$BUILD-$(sha256sum < tmp/$SCRIPT | cut -b -8 | tr -d \\n).tgz
|
||||
rm -f $ARCHIVE
|
||||
echo \ \ Generating final archive
|
||||
(cd tmp ; tar --owner=root --group=root -z -c -f ../$ARCHIVE $SCRIPT || echo \ \ \ \ Error archiving script)
|
||||
rm -rf tmp
|
||||
done
|
3
android/device/common/gps/gps.conf_AS
Normal file
3
android/device/common/gps/gps.conf_AS
Normal file
|
@ -0,0 +1,3 @@
|
|||
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
|
5
android/device/common/gps/gps.conf_AS_SUPL
Normal file
5
android/device/common/gps/gps.conf_AS_SUPL
Normal file
|
@ -0,0 +1,5 @@
|
|||
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
|
||||
SUPL_HOST=supl.google.com
|
||||
SUPL_PORT=7276
|
3
android/device/common/gps/gps.conf_EU
Normal file
3
android/device/common/gps/gps.conf_EU
Normal file
|
@ -0,0 +1,3 @@
|
|||
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
|
5
android/device/common/gps/gps.conf_EU_SUPL
Normal file
5
android/device/common/gps/gps.conf_EU_SUPL
Normal file
|
@ -0,0 +1,5 @@
|
|||
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
|
||||
SUPL_HOST=supl.google.com
|
||||
SUPL_PORT=7276
|
3
android/device/common/gps/gps.conf_US
Normal file
3
android/device/common/gps/gps.conf_US
Normal file
|
@ -0,0 +1,3 @@
|
|||
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
|
5
android/device/common/gps/gps.conf_US_SUPL
Normal file
5
android/device/common/gps/gps.conf_US_SUPL
Normal file
|
@ -0,0 +1,5 @@
|
|||
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
|
||||
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
|
||||
SUPL_HOST=supl.google.com
|
||||
SUPL_PORT=7276
|
18
android/device/common/gps/gps_as.mk
Normal file
18
android/device/common/gps/gps_as.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2008 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_COPY_FILES := \
|
||||
device/common/gps/gps.conf_AS:system/etc/gps.conf
|
18
android/device/common/gps/gps_as_supl.mk
Normal file
18
android/device/common/gps/gps_as_supl.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2008 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_COPY_FILES := \
|
||||
device/common/gps/gps.conf_AS_SUPL:system/etc/gps.conf
|
18
android/device/common/gps/gps_eu.mk
Normal file
18
android/device/common/gps/gps_eu.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2008 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_COPY_FILES := \
|
||||
device/common/gps/gps.conf_EU:system/etc/gps.conf
|
18
android/device/common/gps/gps_eu_supl.mk
Normal file
18
android/device/common/gps/gps_eu_supl.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2008 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_COPY_FILES := \
|
||||
device/common/gps/gps.conf_EU_SUPL:system/etc/gps.conf
|
18
android/device/common/gps/gps_us.mk
Normal file
18
android/device/common/gps/gps_us.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2008 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_COPY_FILES := \
|
||||
device/common/gps/gps.conf_US:system/etc/gps.conf
|
18
android/device/common/gps/gps_us_supl.mk
Normal file
18
android/device/common/gps/gps_us_supl.mk
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Copyright (C) 2008 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_COPY_FILES := \
|
||||
device/common/gps/gps.conf_US_SUPL:system/etc/gps.conf
|
186
android/device/common/populate-new-device.sh
Executable file
186
android/device/common/populate-new-device.sh
Executable file
|
@ -0,0 +1,186 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright 2014 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if test "$1" = "" -o "$2" = ""
|
||||
then
|
||||
echo "Need a manufacturer name and a device name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p device/$1/$2
|
||||
mkdir -p device/$1/$2-kernel
|
||||
mkdir -p vendor/$1/$2
|
||||
|
||||
cat > device/$1/$2/vendorsetup.sh << EOF
|
||||
#
|
||||
# Copyright 2014 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
add_lunch_combo full_$2-userdebug
|
||||
EOF
|
||||
|
||||
cat > device/$1/$2/AndroidProducts.mk << EOF
|
||||
#
|
||||
# Copyright 2014 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_MAKEFILES := \$(LOCAL_DIR)/full_$2.mk
|
||||
EOF
|
||||
|
||||
cat > device/$1/$2/full_$2.mk << EOF
|
||||
#
|
||||
# Copyright 2014 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
\$(call inherit-product, \$(SRC_TARGET_DIR)/product/full_base.mk)
|
||||
\$(call inherit-product, device/$1/$2/device.mk)
|
||||
|
||||
PRODUCT_NAME := full_$2
|
||||
PRODUCT_DEVICE := $2
|
||||
PRODUCT_BRAND := Android
|
||||
PRODUCT_MODEL := $2
|
||||
PRODUCT_MANUFACTURER := $1
|
||||
EOF
|
||||
|
||||
cat > device/$1/$2/device.mk << EOF
|
||||
#
|
||||
# Copyright 2014 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
ifeq (\$(TARGET_PREBUILT_KERNEL),)
|
||||
LOCAL_KERNEL := device/$1/$2-kernel/kernel
|
||||
else
|
||||
LOCAL_KERNEL := \$(TARGET_PREBUILT_KERNEL)
|
||||
endif
|
||||
|
||||
PRODUCT_COPY_FILES := \\
|
||||
\$(LOCAL_KERNEL):kernel
|
||||
|
||||
\$(call inherit-product-if-exists, vendor/$1/$2/device-vendor.mk)
|
||||
EOF
|
||||
|
||||
cat > device/$1/$2/BoardConfig.mk << EOF
|
||||
#
|
||||
# Copyright 2014 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Use the non-open-source parts, if they're present
|
||||
-include vendor/$1/$2/BoardConfigVendor.mk
|
||||
|
||||
TARGET_ARCH := arm
|
||||
TARGET_ARCH_VARIANT := armv7-a-neon
|
||||
TARGET_CPU_ABI := armeabi-v7a
|
||||
TARGET_CPU_ABI2 := armeabi
|
||||
EOF
|
||||
|
||||
touch device/$1/$2-kernel/kernel
|
||||
touch device/$1/$2-kernel/MODULE_LICENSE_GPL
|
||||
|
||||
cat > vendor/$1/$2/device-vendor.mk << EOF
|
||||
#
|
||||
# Copyright 2014 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
EOF
|
||||
|
||||
cat > vendor/$1/$2/BoardConfigVendor.mk << EOF
|
||||
#
|
||||
# Copyright 2014 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
EOF
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue