From 92f25590ee6e027b38ea59a1aa5b1025489a40fb Mon Sep 17 00:00:00 2001 From: Ziyan Date: Sun, 21 Feb 2016 17:03:37 +0100 Subject: Common device tree for 3G variants Change-Id: I957fac5b5d41b4afac158fb59feb4e45e2bcd0cf --- Android.mk | 2 +- AndroidProducts.mk | 2 +- BoardConfig.mk | 8 ++--- aosp_espresso3g.mk | 30 +++++++++++++++++ aosp_p5100.mk | 34 ------------------- board-info.txt | 3 -- cm.mk | 19 +++-------- device.mk | 10 +++--- extract-files.sh | 21 +++--------- proprietary-files.txt | 3 ++ proprietary-p5100-files.txt | 3 -- setup-makefiles.sh | 79 ++++++--------------------------------------- system.prop | 2 +- vendorsetup.sh | 1 + 14 files changed, 64 insertions(+), 153 deletions(-) create mode 100644 aosp_espresso3g.mk delete mode 100644 aosp_p5100.mk delete mode 100644 board-info.txt create mode 100644 proprietary-files.txt delete mode 100644 proprietary-p5100-files.txt create mode 100644 vendorsetup.sh diff --git a/Android.mk b/Android.mk index 25d56d1..85c3c71 100644 --- a/Android.mk +++ b/Android.mk @@ -22,7 +22,7 @@ LOCAL_PATH := $(call my-dir) -ifeq ($(TARGET_DEVICE),p5100) +ifeq ($(TARGET_DEVICE),espresso3g) include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/AndroidProducts.mk b/AndroidProducts.mk index fbfc0e5..e3d5b2d 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -15,5 +15,5 @@ # PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/aosp_p5100.mk \ + $(LOCAL_DIR)/aosp_espresso3g.mk \ $(LOCAL_DIR)/cm.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index e914136..c32fa72 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -15,12 +15,10 @@ # # Include common espresso BoardConfig --include device/samsung/espresso-common/BoardConfigCommon.mk - -TARGET_BOARD_INFO_FILE := device/samsung/p5100/board-info.txt +include device/samsung/espresso/BoardConfigCommon.mk # assert -TARGET_OTA_ASSERT_DEVICE := espresso,p5100,GT-P5100,espresso10rf,espresso10rfxx +TARGET_OTA_ASSERT_DEVICE := espresso,p3100,GT-P3100,espressorf,espressorfxx,p5100,GT-P5100,espresso10rf,espresso10rfxx # Use the non-open-source parts, if they're present --include vendor/samsung/p51xx/BoardConfigVendor.mk +-include vendor/samsung/espresso3g/BoardConfigVendor.mk diff --git a/aosp_espresso3g.mk b/aosp_espresso3g.mk new file mode 100644 index 0000000..a228f77 --- /dev/null +++ b/aosp_espresso3g.mk @@ -0,0 +1,30 @@ +# +# Copyright 2013 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 44.1 kHz UI sounds +$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage13.mk) + +# Inherit from the common Open Source product configuration +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) + +# Inherit device specific configuration +$(call inherit-product, device/samsung/espresso3g/device.mk) + +PRODUCT_DEVICE := espresso3g +PRODUCT_NAME := aosp_espresso3g +PRODUCT_BRAND := Android +PRODUCT_MODEL := Galaxy Tab 2 3G +PRODUCT_MANUFACTURER := Samsung diff --git a/aosp_p5100.mk b/aosp_p5100.mk deleted file mode 100644 index fcbdb64..0000000 --- a/aosp_p5100.mk +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2013 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 44.1 kHz UI sounds -$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage13.mk) - -# Inherit from the common Open Source product configuration -$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) - -# Inherit device specific configuration -$(call inherit-product, device/samsung/p5100/device.mk) - -PRODUCT_DEVICE := p5100 -PRODUCT_NAME := aosp_p5100 -PRODUCT_BRAND := Android -PRODUCT_MODEL := GT-P5100 -PRODUCT_MANUFACTURER := Samsung - -PRODUCT_BUILD_PROP_OVERRIDES += \ - PRODUCT_NAME=espresso10rfxx \ - TARGET_DEVICE=espresso10rf diff --git a/board-info.txt b/board-info.txt deleted file mode 100644 index 28842c6..0000000 --- a/board-info.txt +++ /dev/null @@ -1,3 +0,0 @@ -require board=espresso10 -require version-bootloader=P5100XWALE2 -require version-baseband=P5100XWALE2 diff --git a/cm.mk b/cm.mk index cd9e966..c0bc46c 100644 --- a/cm.mk +++ b/cm.mk @@ -14,28 +14,19 @@ # limitations under the License. # -# Release name -PRODUCT_RELEASE_NAME := p5100 - # Boot animation -# TARGET_SCREEN_HEIGHT := 800 TARGET_SCREEN_HEIGHT := 480 -TARGET_SCREEN_WIDTH := 1280 +TARGET_SCREEN_WIDTH := 600 # Inherit common CM configuration $(call inherit-product, vendor/cm/config/common_full_phone.mk) # CyanogenMod specific overlay -DEVICE_PACKAGE_OVERLAYS += device/samsung/p5100/overlay/cm -DEVICE_PACKAGE_OVERLAYS += device/samsung/espresso-common/overlay/cm-common +DEVICE_PACKAGE_OVERLAYS += device/samsung/espresso3g/overlay/cm +DEVICE_PACKAGE_OVERLAYS += device/samsung/espresso/overlay/cm-common # Inherit device specific configuration -$(call inherit-product, device/samsung/p5100/aosp_p5100.mk) +$(call inherit-product, device/samsung/espresso3g/aosp_espresso3g.mk) # Device identifier. This must come after all inclusions -PRODUCT_NAME := cm_p5100 - -# Set build fingerprint / ID / Product Name etc. -PRODUCT_BUILD_PROP_OVERRIDES += \ - BUILD_FINGERPRINT="samsung/espresso10rfxx/espresso10rf:4.2.2/JDQ39/P5100XXDNA1:user/release-keys" \ - PRIVATE_BUILD_DESC="espresso10rfxx-user 4.2.2 JDQ39 P5100XXDNA1 release-keys" +PRODUCT_NAME := cm_espresso3g diff --git a/device.mk b/device.mk index 6942792..493e4de 100644 --- a/device.mk +++ b/device.mk @@ -15,15 +15,14 @@ # # Include espresso-common makefile -$(call inherit-product, device/samsung/espresso-common/espresso-common.mk) - -LOCAL_PATH := device/samsung/p5100 +$(call inherit-product, device/samsung/espresso/espresso-common.mk) +# Include 3g overlays DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay/aosp # Audio PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf + device/samsung/espresso3g/configs/audio_policy.conf:system/etc/audio_policy.conf # Packages PRODUCT_PACKAGES += \ @@ -40,5 +39,4 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml # Use the non-open-source parts, if they're present -$(call inherit-product-if-exists, vendor/samsung/p51xx/p5100-vendor.mk) -$(call inherit-product-if-exists, vendor/samsung/p51xx/p51xx-vendor.mk) +$(call inherit-product-if-exists, vendor/samsung/espresso3g/espresso3g-vendor.mk) diff --git a/extract-files.sh b/extract-files.sh index a11eaf3..6956be2 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2012 The CyanogenMod Project +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,22 +17,11 @@ # This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT VENDOR=samsung -COMMON=p51xx -DEVICE=p5100 -COMMONBASE=../../../vendor/$VENDOR/$COMMON/common -DEVICEBASE=../../../vendor/$VENDOR/$COMMON/$DEVICE - -echo "Pulling common files..." -for FILE in `cat ../espresso-common/proprietary-p51xx-files.txt | grep -v ^# | grep -v ^$`; do - DIR=`dirname $FILE` - if [ ! -d $COMMONBASE/$DIR ]; then - mkdir -p $COMMONBASE/$DIR - fi - adb pull /$FILE $COMMONBASE/$FILE -done +DEVICE=espresso3g +DEVICEBASE=../../../vendor/$VENDOR/$DEVICE echo "Pulling device specific files..." -for FILE in `cat proprietary-$DEVICE-files.txt | grep -v ^# | grep -v ^$`; do +for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do DIR=`dirname $FILE` if [ ! -d $DEVICEBASE/$DIR ]; then mkdir -p $DEVICEBASE/$DIR @@ -42,4 +31,4 @@ done ./setup-makefiles.sh -./../../../device/samsung/omap4-common/extract-files.sh +./../../../device/samsung/espresso-common/extract-files.sh diff --git a/proprietary-files.txt b/proprietary-files.txt new file mode 100644 index 0000000..c9d5509 --- /dev/null +++ b/proprietary-files.txt @@ -0,0 +1,3 @@ +sbin/cbd +system/lib/libsec-ril.so +system/lib/libsecril-client.so diff --git a/proprietary-p5100-files.txt b/proprietary-p5100-files.txt deleted file mode 100644 index c9d5509..0000000 --- a/proprietary-p5100-files.txt +++ /dev/null @@ -1,3 +0,0 @@ -sbin/cbd -system/lib/libsec-ril.so -system/lib/libsecril-client.so diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 2bebe60..7b4e7ca 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -15,46 +15,14 @@ # limitations under the License. VENDOR=samsung -COMMON=p51xx -DEVICE=p5100 -OUTDIR=vendor/$VENDOR/$COMMON -COMMONMAKEFILE=../../../$OUTDIR/$COMMON-vendor-blobs.mk +DEVICE=espresso3g +OUTDIR=vendor/$VENDOR DEVICEMAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk mkdir -p ../../../vendor/$VENDOR/$DEVICE -(cat << EOF) > $COMMONMAKEFILE -# Copyright (C) 2012 The CyanogenMod 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 file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh - -PRODUCT_COPY_FILES += \\ -EOF - -LINEEND=" \\" -COUNT=`cat ../espresso-common/proprietary-p51xx-files.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}` -for FILE in `cat ../espresso-common/proprietary-p51xx-files.txt | grep -v ^# | grep -v ^$`; do - COUNT=`expr $COUNT - 1` - if [ $COUNT = "0" ]; then - LINEEND="" - fi - echo " $OUTDIR/common/$FILE:$FILE$LINEEND" >> $COMMONMAKEFILE -done - (cat << EOF) > $DEVICEMAKEFILE -# Copyright (C) 2012 The CyanogenMod Project +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -77,8 +45,8 @@ PRODUCT_COPY_FILES += \\ EOF LINEEND=" \\" -COUNT=`cat proprietary-$DEVICE-files.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}` -for FILE in `cat proprietary-$DEVICE-files.txt | grep -v ^# | grep -v ^$`; do +COUNT=`cat proprietary-files.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}` +for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do COUNT=`expr $COUNT - 1` if [ $COUNT = "0" ]; then LINEEND="" @@ -86,29 +54,8 @@ for FILE in `cat proprietary-$DEVICE-files.txt | grep -v ^# | grep -v ^$`; do echo " $OUTDIR/$DEVICE/$FILE:$FILE$LINEEND" >> $DEVICEMAKEFILE done -(cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$COMMON/$DEVICE-vendor.mk -# Copyright (C) 2012 The CyanogenMod 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. - -# Pick up overlay for features that depend on non-open-source files -DEVICE_PACKAGE_OVERLAYS := vendor/samsung/__COMMON__/overlay - -\$(call inherit-product, vendor/samsung/__COMMON__/__DEVICE__-vendor-blobs.mk) -EOF - -(cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$COMMON/$COMMON-vendor.mk -# Copyright (C) 2012 The CyanogenMod Project +(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/$DEVICE-vendor.mk +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -122,14 +69,11 @@ EOF # See the License for the specific language governing permissions and # limitations under the License. -# Pick up overlay for features that depend on non-open-source files -DEVICE_PACKAGE_OVERLAYS := vendor/__VENDOR__/__COMMON__/overlay - -\$(call inherit-product, vendor/__VENDOR__/__COMMON__/__COMMON__-vendor-blobs.mk) +\$(call inherit-product, vendor/samsung/__DEVICE__-vendor-blobs.mk) EOF -(cat << EOF) | sed s/__COMMON__/$COMMON/g | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$COMMON/BoardConfigVendor.mk -# Copyright (C) 2012 The CyanogenMod Project +(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__VENDOR__/$VENDOR/g > ../../../vendor/$VENDOR/$DEVICE/BoardConfigVendor.mk +# Copyright (C) 2016 The CyanogenMod Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -145,7 +89,4 @@ EOF # This file is generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh -USE_CAMERA_STUB := false -BOARD_USES_GENERIC_AUDIO := false - EOF diff --git a/system.prop b/system.prop index 809dfe4..452fcb1 100644 --- a/system.prop +++ b/system.prop @@ -1,5 +1,5 @@ # -# system.prop for espresso10 +# system.prop for espresso3g # rild.libpath=/system/lib/libsec-ril.so rild.libargs=-d /dev/ttyGS0 -- diff --git a/vendorsetup.sh b/vendorsetup.sh new file mode 100644 index 0000000..868ec8f --- /dev/null +++ b/vendorsetup.sh @@ -0,0 +1 @@ +add_lunch_combo cm_espresso3g-userdebug -- cgit v1.1