Making ready for xenon build ...
diff --git a/core/Makefile b/core/Makefile
index 0e0bb15..169ff9b 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1,14 +1,13 @@
# Put some miscellaneous rules here
# Build system colors
+#
+# PFX: Prefix "target C++:" in yellow
+# INS: Module "Install:" output color (cyan for ics)
ifneq ($(BUILD_WITH_COLORS),0)
- CL_RED="\033[31m"
- CL_GRN="\033[32m"
- CL_YLW="\033[33m"
- CL_BLU="\033[34m"
- CL_MAG="\033[35m"
- CL_CYN="\033[36m"
+ CL_PFX="\033[33m"
+ CL_INS="\033[36m"
CL_RST="\033[0m"
endif
@@ -16,9 +15,9 @@
ifneq "" "$(filter eng.%,$(BUILD_NUMBER))"
# BUILD_NUMBER has a timestamp in it, which means that
# it will change every time. Pick a stable value.
- FILE_NAME_TAG := $(SUPERNEXUS_BUILD_VERSION)
+ FILE_NAME_TAG := eng.$(USER)
else
- FILE_NAME_TAG := $(SUPERNEXUS_BUILD_VERSION)
+ FILE_NAME_TAG := $(BUILD_NUMBER)
endif
is_tests_build := $(filter tests,$(MAKECMDGOALS))
@@ -1287,7 +1286,7 @@
ifeq ($(TARGET_BUILD_TYPE),debug)
name := $(name)_debug
endif
-name := SuperNexus-$(SUPERNEXUS_VERSION_MAJOR).$(SUPERNEXUS_VERSION_MINOR)-$(name)-$(FILE_NAME_TAG)
+name := $(name)-ota-$(FILE_NAME_TAG)
INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip
@@ -1305,17 +1304,30 @@
$(INTERNAL_OTA_PACKAGE_TARGET): override_device := $(TARGET_OTA_ASSERT_DEVICE)
endif
+ifeq ($(TARGET_OTA_ASSERT_SKIP),true)
+ $(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := true
+else
+ $(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := false
+endif
+
$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
- @echo -e ${CL_YLW}"Package OTA:"${CL_RST}" $@"
+ @echo "Package OTA: $@"
$(OTA_FROM_TARGET_SCRIPT) -v \
-p $(HOST_OUT) \
-k $(KEY_CERT_PAIR) \
+ --no_assert=$(skip_assert) \
--override_device=$(override_device) \
$(BUILT_TARGET_FILES_PACKAGE) $@
-.PHONY: otapackage
+.PHONY: otapackage bacon
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
-
+bacon: otapackage
+ifneq ($(TARGET_CUSTOM_RELEASETOOL),)
+ @echo "Running releasetool"
+ $(hide) OTAPACKAGE=$(INTERNAL_OTA_PACKAGE_TARGET) $(TARGET_CUSTOM_RELEASETOOL)
+else
+ $(hide) ./vendor/xenonhd/tools/squisher
+endif
# -----------------------------------------------------------------
# The update package
@@ -1339,9 +1351,8 @@
else
IMG_FROM_TARGET_SCRIPT := $(TARGET_RELEASETOOL_IMG_FROM_TARGET_SCRIPT)
endif
-
$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
- @echo -e ${CL_YLW}"Package:"${CL_RST}" $@"
+ @echo "Package: $@"
$(IMG_FROM_TARGET_SCRIPT) -v \
-s $(extensions) \
-p $(HOST_OUT) \
diff --git a/envsetup.sh b/envsetup.sh
index b57a272..b585cee 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -11,6 +11,10 @@
- jgrep: Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir: Go to the directory containing a file.
+- mka: Builds using SCHED_BATCH on all processors
+- mbot: Builds for all devices using the psuedo buildbot
+- mkapush: Same as mka with the addition of adb pushing to the device.
+- reposync: Parallel repo sync using ionice and SCHED_BATCH
Look at the source to view more functions. The complete list is:
EOF
@@ -431,7 +435,11 @@
echo
echo "You're building on" $uname
echo
- echo "Lunch menu... pick a combo:"
+ if [ "z${XENONHD_DEVICES_ONLY}" != "z" ]; then
+ echo "Breakfast menu... pick a combo:"
+ else
+ echo "Lunch menu... pick a combo:"
+ fi
local i=1
local choice
@@ -441,9 +449,56 @@
i=$(($i+1))
done
+ if [ "z${XENONHD_DEVICES_ONLY}" != "z" ]; then
+ echo "... and don't forget the bacon!"
+ fi
+
echo
}
+function brunch()
+{
+ breakfast $*
+ if [ $? -eq 0 ]; then
+ mka bacon
+ else
+ echo "No such item in brunch menu. Try 'breakfast'"
+ return 1
+ fi
+ return $?
+}
+
+function breakfast()
+{
+ target=$1
+ XENONHD_DEVICES_ONLY="true"
+ unset LUNCH_MENU_CHOICES
+ add_lunch_combo full-eng
+ for f in `/bin/ls vendor/xenonhd/vendorsetup.sh 2> /dev/null`
+ do
+ echo "including $f"
+ . $f
+ done
+ unset f
+
+ if [ $# -eq 0 ]; then
+ # No arguments, so let's have the full menu
+ lunch
+ else
+ echo "z$target" | grep -q "-"
+ if [ $? -eq 0 ]; then
+ # A buildtype was specified, assume a full device name
+ lunch $target
+ else
+ # This is probably just the XenonHD model name
+ lunch xenonhd_$target-userdebug
+ fi
+ fi
+ return $?
+}
+
+alias bib=breakfast
+
function lunch()
{
local answer
@@ -1126,6 +1181,86 @@
cd $T/$pathname
}
+function mka() {
+ case `uname -s` in
+ Darwin)
+ make -j `sysctl hw.ncpu|cut -d" " -f2` "$@"
+ ;;
+ *)
+ schedtool -B -n 1 -e ionice -n 1 make -j$(cat /proc/cpuinfo | grep "^processor" | wc -l) "$@"
+ ;;
+ esac
+}
+
+function mbot() {
+ unset LUNCH_MENU_CHOICES
+ croot
+ ./vendor/xenonhd/bot/deploy.sh
+}
+
+function mkapush() {
+ # There's got to be a better way to do this stupid shit.
+ case `uname -s` in
+ Darwin)
+ if [ ! -f $ANDROID_PRODUCT_OUT/installed-files.txt ]; then
+ make -j `sysctl hw.ncpu|cut -d" " -f2` installed-file-list
+ fi
+ make -j `sysctl hw.ncpu|cut -d" " -f2` "$@"
+ ;;
+ *)
+ if [ ! -f $ANDROID_PRODUCT_OUT/installed-files.txt ]; then
+ schedtool -B -n 1 -e ionice -n 1 make -j$(cat /proc/cpuinfo | grep "^processor" | wc -l) installed-file-list
+ fi
+ schedtool -B -n 1 -e ionice -n 1 make -j$(cat /proc/cpuinfo | grep "^processor" | wc -l) "$@"
+ ;;
+ esac
+ case $@ in
+ *\ * )
+ echo $@ | awk 'gsub(/ /,"\n") {print}' | while read line; do
+ blackmagic=`sed -n "/$line/{p;q;}" $ANDROID_PRODUCT_OUT/installed-files.txt | awk {'print $2'}`
+ if [ `echo $blackmagic | cut -f3 -d "/" = framework ];
+ elif [ `echo $blackmagic | cut -f4 -d "/" = SystemUI.apk ]; then
+ adb_stop=true
+ fi
+ adb remount
+ if [ $adb_stop = true ]; then
+ adb shell stop
+ fi
+ adb push $ANDROID_PRODUCT_OUT$blackmagic $blackmagic
+ if [ $adb_stop = true ]; then
+ adb shell start
+ fi
+ done
+ ;;
+ *)
+ blackmagic=`sed -n "/$@/{p;q;}" $ANDROID_PRODUCT_OUT/installed-files.txt | awk {'print $2'}`
+ if [ `echo $blackmagic | cut -f3 -d "/" = framework ];
+ elif [ `echo $blackmagic | cut -f4 -d "/" = SystemUI.apk ]; then
+ adb_stop=true
+ fi
+ adb remount
+ if [ $adb_stop = true ]; then
+ adb shell stop
+ fi
+ adb push $ANDROID_PRODUCT_OUT$blackmagic $blackmagic
+ if [ $adb_stop = true ]; then
+ adb shell start
+ fi
+ ;;
+ esac
+}
+
+function reposync() {
+ case `uname -s` in
+ Darwin)
+ repo sync -j 4 "$@"
+ ;;
+ *)
+ schedtool -B -n 1 -e ionice -n 1 repo sync -j 4 "$@"
+ ;;
+ esac
+}
+
# Force JAVA_HOME to point to java 1.6 if it isn't already set
function set_java_home() {
if [ ! "$JAVA_HOME" ]; then
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index f4d557b..ea92ea6 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -400,7 +400,16 @@
device_specific.FullOTA_Assertions()
device_specific.FullOTA_InstallBegin()
- script.ShowProgress(0.5, 0)
+ script.ShowProgress(0.2, 0)
+ script.Print("")
+ script.Print("************************************************")
+ script.Print("* *")
+ script.Print("* Team Horizon Presents *")
+ script.Print("* XenonHD *")
+ script.Print("************************************************")
+ script.Print("")
+ script.Print("Prepare to broaden your horizon!")
+ script.Print("Welcome to Xenon HD")
if OPTIONS.wipe_user_data:
script.FormatPartition("/data")
diff --git a/tools/releasetools/ota_from_target_filesc b/tools/releasetools/ota_from_target_filesc
new file mode 100644
index 0000000..59c79ac
--- /dev/null
+++ b/tools/releasetools/ota_from_target_filesc
Binary files differ