Skip to content

Commit

Permalink
Merge branch 'cm-10.2' of https://github.com/CyanogenMod/android_build
Browse files Browse the repository at this point in the history
…into cm-10.2
  • Loading branch information
MowMdown committed Oct 7, 2013
2 parents 6a7c15e + 0044496 commit 52d7821
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 29 deletions.
12 changes: 6 additions & 6 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,19 @@ $(INSTALLED_BUILD_PROP_TARGET): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE) $(
PRODUCT_MANUFACTURER="$(PRODUCT_MANUFACTURER)" \
PRIVATE_BUILD_DESC="$(PRIVATE_BUILD_DESC)" \
BUILD_ID="$(BUILD_ID)" \
BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
BUILD_NUMBER="$(BUILD_NUMBER)" \
PLATFORM_VERSION="$(PLATFORM_VERSION)" \
PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
BUILD_FINGERPRINT="$(BUILD_FINGERPRINT)" \
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \
$(PRODUCT_BUILD_PROP_OVERRIDES) \
BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
BUILD_NUMBER="$(BUILD_NUMBER)" \
PLATFORM_VERSION="$(PLATFORM_VERSION)" \
PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
bash $(BUILDINFO_SH) > $@
$(hide) if [ -f "$(system_prop_file)" ]; then \
cat $(system_prop_file) >> $@; \
Expand Down
1 change: 1 addition & 0 deletions core/qcom_utils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
QCOM_BOARD_PLATFORMS := msm7x27
QCOM_BOARD_PLATFORMS += msm7x27a
QCOM_BOARD_PLATFORMS += msm7x30
QCOM_BOARD_PLATFORMS += qsd8k
QCOM_BOARD_PLATFORMS += msm8660
QCOM_BOARD_PLATFORMS += msm8960
QCOM_BOARD_PLATFORMS += msm8974
Expand Down
35 changes: 35 additions & 0 deletions core/tasks/kernel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,40 @@ else
endif
endif

USE_SOMC_BOARD ?= $(shell perl -e '$$somc = "n"; while (<>) { if (/CONFIG_MACH_SONY_.+=y/) { $$somc = "y"; break } } print $$somc;' $(KERNEL_SRC)/arch/arm/configs/$(KERNEL_DEFCONFIG))

ifeq "$(USE_SOMC_BOARD)" "y"
DTS_NAMES ?= msm8974 apq8074
SOMC_BOARD = $(shell echo $(KERNEL_DEFCONFIG) | sed -e "s/cm_//" | sed -e "s/_defconfig//")
endif
DTS_NAMES ?= $(shell perl -e 'while (<>) {$$a = $$1 if /CONFIG_ARCH_((?:MSM|QSD|MPQ)[a-zA-Z0-9]+)=y/; $$r = $$1 if /CONFIG_MSM_SOC_REV_(?!NONE)(\w+)=y/; $$arch = $$arch.lc("$$a$$r ") if /CONFIG_ARCH_((?:MSM|QSD|MPQ)[a-zA-Z0-9]+)=y/} print $$arch;' $(KERNEL_CONFIG))
KERNEL_USE_OF ?= $(shell perl -e '$$of = "n"; while (<>) { if (/CONFIG_USE_OF=y/) { $$of = "y"; break; } } print $$of;' $(KERNEL_SRC)/arch/arm/configs/$(KERNEL_DEFCONFIG))

ifeq "$(KERNEL_USE_OF)" "y"
ifeq "$(USE_SOMC_BOARD)" "y"
DTS_FILES = $(wildcard $(TOP)/$(KERNEL_SRC)/arch/arm/boot/dts/$(DTS_NAME)*$(SOMC_BOARD).dts)
else
DTS_FILES = $(wildcard $(TOP)/$(KERNEL_SRC)/arch/arm/boot/dts/$(DTS_NAME)*.dts)
endif
DTS_FILE = $(lastword $(subst /, ,$(1)))
DTB_FILE = $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%.dtb,$(call DTS_FILE,$(1))))
ZIMG_FILE = $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%-zImage,$(call DTS_FILE,$(1))))
KERNEL_ZIMG = $(KERNEL_OUT)/arch/arm/boot/zImage
DTC = $(KERNEL_OUT)/scripts/dtc/dtc

define append-dtb
mkdir -p $(KERNEL_OUT)/arch/arm/boot;\
$(foreach DTS_NAME, $(DTS_NAMES), \
$(foreach d, $(DTS_FILES), \
$(DTC) -p 1024 -O dtb -o $(call DTB_FILE,$(d)) $(d); \
cat $(KERNEL_ZIMG) $(call DTB_FILE,$(d)) > $(call ZIMG_FILE,$(d));))
endef
else

define append-dtb
endef
endif

ifeq ($(FULL_KERNEL_BUILD),true)

KERNEL_HEADERS_INSTALL := $(KERNEL_OUT)/usr
Expand Down Expand Up @@ -176,6 +210,7 @@ $(TARGET_KERNEL_MODULES): TARGET_KERNEL_BINARIES
$(TARGET_PREBUILT_INT_KERNEL): $(TARGET_KERNEL_MODULES)
$(mv-modules)
$(clean-module-folder)
$(append-dtb)

$(KERNEL_HEADERS_INSTALL): $(KERNEL_OUT) $(KERNEL_CONFIG)
$(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) headers_install
Expand Down
10 changes: 9 additions & 1 deletion envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function check_product()

if (echo -n $1 | grep -q -e "^cm_") ; then
CM_BUILD=$(echo -n $1 | sed -e 's/^cm_//g')
export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10)
else
CM_BUILD=
fi
Expand Down Expand Up @@ -694,13 +695,20 @@ function eat()
adb root
sleep 1
adb wait-for-device
# CWM command
cat << EOF > /tmp/command
--sideload
EOF
if adb push /tmp/command /cache/recovery/ ; then
# TWRP command
cat << EOF > /tmp/openrecoveryscript
sideload
EOF
if adb push /tmp/command /cache/recovery/ && adb push /tmp/openrecoveryscript /cache/recovery/; then
echo "Rebooting into recovery for sideload installation"
adb reboot recovery
adb kill-server
adb wait-for-sideload
echo "Device back online, trying to sideload"
adb sideload $ZIPPATH
fi
rm /tmp/command
Expand Down
20 changes: 0 additions & 20 deletions target/product/full_base.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,8 @@

PRODUCT_PACKAGES := \
libfwdlockengine \
VideoEditor \
WAPPushManager


PRODUCT_PACKAGES += \
libvideoeditor_jni \
libvideoeditor_core \
libvideoeditor_osal \
libvideoeditor_videofilters \
libvideoeditorplayer

PRODUCT_PACKAGES += \
Galaxy4 \
HoloSpiralWallpaper \
LiveWallpapers \
LiveWallpapersPicker \
MagicSmokeWallpapers \
NoiseField \
PhaseBeam \
VisualizationWallpapers \
PhotoTable

include $(SRC_TARGET_DIR)/product/emulator.mk

# Additional settings used in all AOSP builds
Expand Down
2 changes: 1 addition & 1 deletion target/product/languages_full.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

# These are all the locales that have translations and are displayable
# by TextView in this branch.
PRODUCT_LOCALES := en_US fr_FR it_IT es_ES de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG ca_ES en_GB fi_FI hi_IN hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA vi_VN tl_PH ar_EG fa_IR th_TH sw_TZ ms_MY af_ZA zu_ZA am_ET hi_IN ug_CN en_XA ar_XB fr_CA
PRODUCT_LOCALES := en_US fr_FR it_IT es_ES de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG ca_ES en_GB fi_FI hi_IN hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA vi_VN tl_PH ar_EG fa_IR th_TH sw_TZ ms_MY af_ZA zu_ZA am_ET hi_IN ug_CN en_XA ar_XB fr_CA et_EE ml_IN ku_IQ pa_IN
2 changes: 1 addition & 1 deletion target/product/locales_full.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG eo_EU es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW am_ET hi_IN ug_CN
PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG eo_EU es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW am_ET hi_IN ug_CN et_EE ml_IN ku_IQ pa_IN

$(call inherit-product, build/target/product/languages_full.mk)
10 changes: 10 additions & 0 deletions tools/repopick.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
parser.add_argument('-b', '--auto-branch', action='store_true', help='shortcut to "--start-branch auto --abandon-first --ignore-missing"')
parser.add_argument('-q', '--quiet', action='store_true', help='print as little as possible')
parser.add_argument('-v', '--verbose', action='store_true', help='print extra information to aid in debug')
parser.add_argument('-f', '--force', action='store_true', help='force cherry pick even if commit has been merged')
args = parser.parse_args()
if args.start_branch == None and args.abandon_first:
parser.error('if --abandon-first is set, you must also give the branch name with --start-branch')
Expand Down Expand Up @@ -217,6 +218,7 @@ def is_pathA_subdir_of_pathB(pathA, pathB):
date_fluff = '.000000000'
project_name = data['project']
change_number = data['_number']
status = data['status']
current_revision = data['revisions'][data['current_revision']]
patch_number = current_revision['_number']
fetch_url = current_revision['fetch']['http']['url']
Expand All @@ -229,6 +231,14 @@ def is_pathA_subdir_of_pathB(pathA, pathB):
committer_date = current_revision['commit']['committer']['date'].replace(date_fluff, '')
subject = current_revision['commit']['subject']

# Check if commit has already been merged and exit if it has, unless -f is specified
if status == "MERGED":
if args.force:
print("!! Force-picking a merged commit !!\n")
else:
print("Commit already merged. Skipping the cherry pick.\nUse -f to force this pick.")
sys.exit(1)

# Convert the project name to a project path
# - check that the project path exists
if project_name in project_name_to_path:
Expand Down

0 comments on commit 52d7821

Please sign in to comment.