diff options
| author | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-02-10 20:21:34 +0800 |
|---|---|---|
| committer | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-02-15 17:46:26 +0800 |
| commit | a60717c72b7764ac301be0a0301808e0a4b42ff7 (patch) | |
| tree | 0d39b7f0fc23e4652138cd59a812e8f959429d05 | |
| parent | d46525af19087724203a900661c156e8993b5ad4 (diff) | |
flo: Bring up CM
* Don't build bootloader
* Remove deprecated prebuilt kernel references and build our
own kernel from source
* Use project pathmaps for camera HAL source
* Add boot animation resolution
* Add proprietary file scripts
* Add widevine blobs and remove unnecessary blobs
* Configure hardware keys appropriately
* Move over to Trebuchet from Launcher3
* Don't restrict vendor files
Change-Id: Ia88f0ecc88c445b6bebe5d9f6668cf92c5e8b026
| -rw-r--r-- | AndroidBoard.mk | 19 | ||||
| -rwxr-xr-x | BoardConfigCommon.mk | 4 | ||||
| -rw-r--r-- | aosp_flo.mk | 1 | ||||
| -rw-r--r-- | camera/QCamera2/HAL/Android.mk | 9 | ||||
| -rw-r--r-- | camera/QCamera2/HAL3/Android.mk | 9 | ||||
| -rwxr-xr-x | camera/QCamera2/stack/mm-camera-interface/Android.mk | 2 | ||||
| -rw-r--r-- | cm.dependencies | 6 | ||||
| -rw-r--r-- | cm.mk | 34 | ||||
| -rw-r--r-- | device-common.mk | 13 | ||||
| -rw-r--r-- | device.mk | 1 | ||||
| -rw-r--r-- | extract-files.sh | 40 | ||||
| -rw-r--r-- | overlay/frameworks/base/core/res/res/values/config.xml | 28 | ||||
| -rw-r--r-- | overlay/packages/apps/Trebuchet/res/values/config.xml (renamed from overlay/packages/apps/Launcher2/res/values/config.xml) | 0 | ||||
| -rw-r--r-- | proprietary-blobs.txt | 14 | ||||
| -rw-r--r-- | setup-makefiles.sh | 75 |
15 files changed, 203 insertions, 52 deletions
diff --git a/AndroidBoard.mk b/AndroidBoard.mk deleted file mode 100644 index 117bd43..0000000 --- a/AndroidBoard.mk +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (C) 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. -# - -ifeq ($(TARGET_PREBUILT_KERNEL),) -TARGET_PREBUILT_KERNEL := device/asus/flo-kernel/kernel -endif diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index bfd9de3..e8edc83 100755 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -22,7 +22,7 @@ TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_CPU_VARIANT := krait -TARGET_NO_BOOTLOADER := false +TARGET_NO_BOOTLOADER := true BOARD_KERNEL_BASE := 0x80200000 BOARD_KERNEL_PAGESIZE := 2048 @@ -30,6 +30,8 @@ BOARD_KERNEL_PAGESIZE := 2048 BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=flo user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 BOARD_KERNEL_CMDLINE += vmalloc=340M BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 +TARGET_KERNEL_SOURCE := kernel/asus/flo +TARGET_KERNEL_CONFIG := cyanogenmod_flo_defconfig BOARD_USES_ALSA_AUDIO:= true BOARD_USES_LEGACY_ALSA_AUDIO:= false diff --git a/aosp_flo.mk b/aosp_flo.mk index 6f1ad0c..95ece20 100644 --- a/aosp_flo.mk +++ b/aosp_flo.mk @@ -26,7 +26,6 @@ PRODUCT_DEVICE := flo PRODUCT_BRAND := Android PRODUCT_MODEL := AOSP on Flo PRODUCT_MANUFACTURER := ASUS -PRODUCT_RESTRICT_VENDOR_FILES := true # Inherit from hardware-specific part of the product configuration $(call inherit-product, device/asus/flo/device.mk) diff --git a/camera/QCamera2/HAL/Android.mk b/camera/QCamera2/HAL/Android.mk index e269d37..b1b7efc 100644 --- a/camera/QCamera2/HAL/Android.mk +++ b/camera/QCamera2/HAL/Android.mk @@ -28,19 +28,14 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../stack/common \ frameworks/native/include/media/hardware \ frameworks/native/include/media/openmax \ - hardware/qcom/media/libstagefrighthw \ + $(call project-path-for,qcom-media)/libstagefrighthw \ system/media/camera/include \ $(LOCAL_PATH)/../../mm-image-codec/qexif \ $(LOCAL_PATH)/../../mm-image-codec/qomx_core \ $(LOCAL_PATH)/../util -ifneq ($(filter msm8974 msm8x74,$(TARGET_BOARD_PLATFORM)),) LOCAL_C_INCLUDES += \ - hardware/qcom/display/msm8974/libgralloc -else -LOCAL_C_INCLUDES += \ - hardware/qcom/display/msm8960/libgralloc -endif + $(call project-path-for,qcom-display)/libgralloc LOCAL_SHARED_LIBRARIES := libcamera_client liblog libhardware libutils libcutils libdl LOCAL_SHARED_LIBRARIES += libmmcamera_interface libmmjpeg_interface diff --git a/camera/QCamera2/HAL3/Android.mk b/camera/QCamera2/HAL3/Android.mk index 43a57d4..1402121 100644 --- a/camera/QCamera2/HAL3/Android.mk +++ b/camera/QCamera2/HAL3/Android.mk @@ -21,19 +21,14 @@ LOCAL_C_INCLUDES := \ frameworks/native/include/media/openmax \ frameworks/native/include \ frameworks/av/include \ - hardware/qcom/media/libstagefrighthw \ + $(call project-path-for,qcom-media)/libstagefrighthw \ system/media/camera/include \ $(LOCAL_PATH)/../../mm-image-codec/qexif \ $(LOCAL_PATH)/../../mm-image-codec/qomx_core \ $(LOCAL_PATH)/../util -ifneq ($(filter msm8974 msm8x74,$(TARGET_BOARD_PLATFORM)),) LOCAL_C_INCLUDES += \ - hardware/qcom/display/msm8974/libgralloc -else -LOCAL_C_INCLUDES += \ - hardware/qcom/display/msm8960/libgralloc -endif + $(call project-path-for,qcom-display)/libgralloc LOCAL_SHARED_LIBRARIES := libcamera_client liblog libhardware libutils libcutils libdl LOCAL_SHARED_LIBRARIES += libmmcamera_interface libmmjpeg_interface libui libcamera_metadata diff --git a/camera/QCamera2/stack/mm-camera-interface/Android.mk b/camera/QCamera2/stack/mm-camera-interface/Android.mk index f60cd10..8ac5b43 100755 --- a/camera/QCamera2/stack/mm-camera-interface/Android.mk +++ b/camera/QCamera2/stack/mm-camera-interface/Android.mk @@ -28,7 +28,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/inc \ $(LOCAL_PATH)/../common -LOCAL_C_INCLUDES += hardware/qcom/media/mm-core/inc +LOCAL_C_INCLUDES += $(call project-path-for,qcom-media)/mm-core/inc LOCAL_CFLAGS += -Wall -Werror diff --git a/cm.dependencies b/cm.dependencies new file mode 100644 index 0000000..eac38de --- /dev/null +++ b/cm.dependencies @@ -0,0 +1,6 @@ +[ + { + "repository": "android_kernel_asus_flo", + "target_path": "kernel/asus/flo" + } +] @@ -0,0 +1,34 @@ +# 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. +# 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. + +# Inherit some common CM stuff. +$(call inherit-product, vendor/cm/config/common_full_tablet_wifionly.mk) + +# Enhanced NFC +$(call inherit-product, vendor/cm/config/nfc_enhanced.mk) + +# Inherit device configuration +$(call inherit-product, device/asus/flo/full_flo.mk) + +## Device identifier. This must come after all inclusions +PRODUCT_DEVICE := flo +PRODUCT_NAME := cm_flo +PRODUCT_BRAND := google +PRODUCT_MODEL := Nexus 7 +PRODUCT_MANUFACTURER := asus + +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRODUCT_NAME=razor \ + BUILD_FINGERPRINT=google/razor/flo:6.0.1/MMB29Q/2480792:user/release-keys \ + PRIVATE_BUILD_DESC="razor-user 6.0.1 MMB29Q 2480792 release-keys" diff --git a/device-common.mk b/device-common.mk index 9fa2ca0..08698ab 100644 --- a/device-common.mk +++ b/device-common.mk @@ -19,15 +19,6 @@ # # Everything in this directory will become public -ifeq ($(TARGET_PREBUILT_KERNEL),) -LOCAL_KERNEL := device/asus/flo-kernel/kernel -else -LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) -endif - -PRODUCT_COPY_FILES := \ - $(LOCAL_KERNEL):kernel - # This device is xhdpi. However the platform doesn't # currently contain all of the bitmaps at xhdpi density so # we do this little trick to fall back to the hdpi version @@ -35,6 +26,10 @@ PRODUCT_COPY_FILES := \ PRODUCT_AAPT_CONFIG := normal hdpi xhdpi PRODUCT_AAPT_PREF_CONFIG := xhdpi +# Boot animation +TARGET_SCREEN_HEIGHT := 1920 +TARGET_SCREEN_WIDTH := 1200 + PRODUCT_PACKAGES := \ libwpa_client \ hostapd \ @@ -18,6 +18,7 @@ # are also specific to msm8960 devices # # Everything in this directory will become public +$(call inherit-product-if-exists, vendor/asus/flo/flo-vendor.mk) PRODUCT_PROPERTY_OVERRIDES := \ ro.carrier=wifi-only diff --git a/extract-files.sh b/extract-files.sh new file mode 100644 index 0000000..dcbf903 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +set -e + +VENDOR=asus +DEVICE=flo + +if [ $# -eq 0 ]; then + SRC=adb +else + if [ $# -eq 1 ]; then + SRC=$1 + else + echo "$0: bad number of arguments" + echo "" + echo "usage: $0 [PATH_TO_EXPANDED_ROM]" + echo "" + echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" + echo "the device using adb pull." + exit 1 + fi +fi + +BASE=../../../vendor/$VENDOR/$DEVICE/proprietary +rm -rf $BASE/* + +for FILE in `cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | sed -e 's#^/system/##g'`; do + DIR=`dirname $FILE` + if [ ! -d $BASE/$DIR ]; then + mkdir -p $BASE/$DIR + fi + if [ "$SRC" = "adb" ]; then + adb pull /system/$FILE $BASE/$FILE + else + cp $SRC/system/$FILE $BASE/$FILE + fi + +done + +./setup-makefiles.sh diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 5ce9f27..dcb8f2b 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -225,4 +225,32 @@ The default is false. --> <bool name="config_lidControlsSleep">true</bool> + <!-- Hardware keys present on the device, stored as a bit field. + This integer should equal the sum of the corresponding value for each + of the following keys present: + 1 - Home + 2 - Back + 4 - Menu + 8 - Assistant (search) + 16 - App switch + 32 - Camera + 64 - Volume rocker + For example, a device with Home, Back and Menu keys would set this + config to 7. --> + <integer name="config_deviceHardwareKeys">64</integer> + + <!-- Hardware keys present on the device with the ability to wake, stored as a bit field. + This integer should equal the sum of the corresponding value for each + of the following keys present: + 1 - Home + 2 - Back + 4 - Menu + 8 - Assistant (search) + 16 - App switch + 32 - Camera + 64 - Volume rocker + For example, a device with Home, Back and Menu keys would set this + config to 7. --> + <integer name="config_deviceHardwareWakeKeys">64</integer> + </resources> diff --git a/overlay/packages/apps/Launcher2/res/values/config.xml b/overlay/packages/apps/Trebuchet/res/values/config.xml index 3b82809..3b82809 100644 --- a/overlay/packages/apps/Launcher2/res/values/config.xml +++ b/overlay/packages/apps/Trebuchet/res/values/config.xml diff --git a/proprietary-blobs.txt b/proprietary-blobs.txt index 8fca5ab..017f362 100644 --- a/proprietary-blobs.txt +++ b/proprietary-blobs.txt @@ -42,11 +42,6 @@ /system/bin/usbhub /system/bin/usbhub_init /system/etc/DxHDCP.cfg -/system/etc/firmware/tzapps.b00 -/system/etc/firmware/tzapps.b01 -/system/etc/firmware/tzapps.b02 -/system/etc/firmware/tzapps.b03 -/system/etc/firmware/tzapps.mdt /system/etc/firmware/vidc.b00 /system/etc/firmware/vidc.b01 /system/etc/firmware/vidc.b02 @@ -54,8 +49,6 @@ /system/etc/firmware/vidc.mdt /system/etc/firmware/vidcfw.elf /system/etc/firmware/vidc_1080p.fw -/system/etc/firmware/wcd9310/wcd9310_anc.bin -/system/etc/firmware/wcd9310/wcd9310_mbhc.bin /system/etc/gps.conf /system/vendor/lib/egl/eglsubAndroid.so /system/vendor/lib/egl/libEGL_adreno.so @@ -91,6 +84,7 @@ /system/lib/libdss.so /system/lib/libdsucsd.so /system/lib/libdsutils.so +/system/lib/libDxHdcp.so /system/lib/libgps.utils.so /system/vendor/lib/libgsl.so /system/lib/libI420colorconvert.so @@ -127,6 +121,7 @@ /system/lib/libsensor_reg.so /system/lib/libsensor_user_cal.so /system/lib/libstagefright_hdcp.so +/system/vendor/lib/libWVphoneAPI.so /system/lib/libxml.so /system/vendor/firmware/a300_pfp.fw /system/vendor/firmware/a300_pm4.fw @@ -180,6 +175,7 @@ /system/vendor/firmware/wcnss.b04 /system/vendor/firmware/wcnss.b05 /system/vendor/firmware/wcnss.mdt +/system/vendor/lib/drm/libdrmwvmplugin.so /system/vendor/lib/libdrmdecrypt.so /system/vendor/lib/libgemini.so /system/vendor/lib/libgeofence.so @@ -206,3 +202,7 @@ /system/vendor/lib/libmmstillomx.so /system/vendor/lib/liboemcamera.so /system/vendor/lib/libqomx_jpegenc.so +/system/vendor/lib/libwvdrm_L1.so +/system/vendor/lib/libwvm.so +/system/vendor/lib/libWVStreamControlAPI_L1.so +/system/vendor/lib/mediadrm/libwvdrmengine.so diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100644 index 0000000..8fdeadf --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,75 @@ +#!/bin/sh + +VENDOR=asus +DEVICE=flo +OUTDIR=vendor/$VENDOR/$DEVICE +MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk + +(cat << EOF) > $MAKEFILE +# 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. +# 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 proprietary-blobs.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}` +for FILE in `cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | sed -e 's#^/system/##g'`; do + COUNT=`expr $COUNT - 1` + if [ $COUNT = "0" ]; then + LINEEND="" + fi + echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE +done + +(cat << EOF) > ../../../$OUTDIR/$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. +# 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 + +\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) +EOF + +(cat << EOF) > ../../../$OUTDIR/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. +# 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 + +EOF |
