Skip to content

Commit

Permalink
A more or less working version (pre-alpha)
Browse files Browse the repository at this point in the history
  • Loading branch information
de-wolff committed Oct 30, 2013
1 parent 27a6302 commit 8d36a61
Show file tree
Hide file tree
Showing 60 changed files with 8,224 additions and 31 deletions.
19 changes: 19 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# 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.
#
LOCAL_PATH := $(call my-dir)

include $(call all-named-subdir-makefiles, libcamera liblights )

5 changes: 1 addition & 4 deletions AndroidBoard.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)

# include the non-open-source counterpart to this file
-include vendor/motorola/xt320/AndroidBoardVendor.mk

4 changes: 4 additions & 0 deletions AndroidProducts.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
PRODUCT_BRAND := motorola
LOCAL_PATH := $(call my-dir)

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/device_xt320.mk

70 changes: 65 additions & 5 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,63 @@ USE_CAMERA_STUB := true
# inherit from the proprietary version
-include vendor/motorola/xt320/BoardConfigVendor.mk

COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DTARGET7x27A

TARGET_ARCH := arm
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_BOARD_PLATFORM := msm7627a
TARGET_BOOTLOADER_BOARD_NAME := 7x27
# Try to use ASHMEM if possible (when non-MDP composition is used)
TARGET_GRALLOC_USES_ASHMEM := true
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := unknown
TARGET_CPU_ABI := armeabi

TARGET_NO_KERNEL := false
TARGET_NO_RADIOIMAGE := true
# Signed boot image support
TARGET_CPU_SMP := true
BOARD_KERNEL_BASE := 0x00200000
BOARD_KERNEL_PAGESIZE := 4096
#Spare size is (BOARD_KERNEL_PAGESIZE>>9)*16
BOARD_KERNEL_SPARESIZE := 128
#Spare size for 8 bit BCH ECC NAND
BOARD_KERNEL_2KPAGESIZE := 2048
BOARD_KERNEL_2KSPARESIZE := 64
TARGET_KERNEL_SOURCE := kernel/motorola/xt320
# TARGET_PREBUILT_KERNEL = device/motorola/xt320/kernel
TARGET_KERNEL_CONFIG := moto_xt320_defconfig


TARGET_BOOTIMG_SIGNED := true
BOARD_NO_SPEAKER := true # msm7627a doesn't have speaker
BOARD_NO_TOUCHSCREEN := false
TARGET_BOOTLOADER_BOARD_NAME := xt320
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_QCOM_FM := true
TARGET_HAVE_TSLIB := true

TARGET_AVOID_DRAW_TEXTURE_EXTENSION := true
TARGET_USES_16BPPSURFACE_FOR_OPAQUE := true

TARGET_CORTEX_CACHE_LINE_32 := true
TARGET_USE_SPARROW_BIONIC_OPTIMIZATION := true

BOARD_HAS_8BIT_BCHECC_SUPPORT := true
BOARD_KERNEL_BCHECC_SPARESIZE := 160

# Support to build images for 2K NAND page
BOARD_SUPPORTS_2KNAND_PAGE := true

BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom loglevel=1
TARGET_USES_UNCOMPRESSED_KERNEL := false

ARCH_ARM_HAVE_TLS_REGISTER := true
BOARD_EGL_CFG := device/qcom/$(TARGET_PRODUCT)/egl.cfg


BOARD_HAVE_MXT224_CFG := true

BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom loglevel=1 kgsl.mmutype=nommu vmalloc=48M
BOARD_KERNEL_BASE := 0x00200000
BOARD_KERNEL_PAGESIZE := 2048

Expand All @@ -19,7 +69,17 @@ BOARD_RECOVERYIMAGE_PARTITION_SIZE := 7340032 # 0x00700000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 149946368 # 0x08f00000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 173015040 # 0x0a500000
BOARD_FLASH_BLOCK_SIZE := 131072 # 0x00020000
BOARD_PERSISTIMAGE_PARTITION_SIZE := 10485760
BOARD_CACHEIMAGE_PARTITION_SIZE := 41943040

TARGET_PREBUILT_KERNEL := device/motorola/xt320/kernel

# TARGET_USERIMAGES_USE_EXT4 := true
BOARD_HAS_NO_SELECT_BUTTON := true
BOARD_USE_CUSTOM_RECOVERY_FONT := '"font_7x16.h"'
BOARD_EGL_CFG := device/motorola/xt320/egl.cfg
TARGET_SPECIFIC_HEADER_PATH += device/motorola/xt320/include
TARGET_USES_ION := false

# Use CAF media driver variant for 7627a
TARGET_QCOM_MEDIA_VARIANT := caf

BOARD_USES_QCOM_HARDWARE := true
41 changes: 41 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
CyanogenMod 7.2 for Motorola XT320 (Android 2.3.7 AOSP)

Download RomManager (DELETED IN BUILD)
======================================

mkdir vendor/cyanogen/proprietary
cd vendor/cyanogen && ./get-rommanager


Build:
======

optional :
export PLATFORM_DIR=$(pwd)
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export TARGET_OUT_INTERMEDIATES=out
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PLATFORM_DIR/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$JAVA_HOME/bin:$PATH
cd $PLATFORM_DIR

export CYANOGEN_NIGHTLY=true

rm -rf out/target

. build/envsetup.sh

brunch kobe

or...

lunch cyanogen_kobe-eng
mka bacon

Use the signed zip to update the defy with Second Init recovery, or CM7 bootmenu recovery, not the ota package

Links:
======
FAQ :

Original Thread :
6 changes: 6 additions & 0 deletions cm.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"repository": "android_kernel_motorola_xt320",
"target_path": "kernel/motorola/xt320"
}
]
1 change: 1 addition & 0 deletions cm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ PRODUCT_NAME := cm_xt320
PRODUCT_BRAND := motorola
PRODUCT_MODEL := xt320
PRODUCT_MANUFACTURER := motorola

23 changes: 23 additions & 0 deletions cm_xt320.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)

# The gps config appropriate for this device
$(call inherit-product, device/common/gps/gps_us_supl.mk)

$(call inherit-product-if-exists, vendor/motorola/xt320/xt320-vendor.mk)

DEVICE_PACKAGE_OVERLAYS += device/motorola/xt320/overlay

LOCAL_PATH := device/motorola/xt320
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := $(LOCAL_PATH)/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif

# PRODUCT_COPY_FILES += $(LOCAL_KERNEL):kernel

$(call inherit-product, build/target/product/full.mk)

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
PRODUCT_NAME := full_xt320
PRODUCT_DEVICE := xt320
52 changes: 39 additions & 13 deletions device_xt320.mk
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
LOCAL_PATH := $(call my-dir)
VENDOR := motorola
DEVICE := xt320

# The gps config appropriate for this device
$(call inherit-product, device/common/gps/gps_us_supl.mk)
$(call inherit-product, vendor/cm/config/common.mk)

$(call inherit-productt-if-exists, device/ldpi-common/ldpi.mk)
$(call inherit-product-if-exists, vendor/$(VENDOR)/$(DEVICE)/xt320-vendor.mk)
$(call inherit-product-if-exists, vendor/qcom/proprietary/qcom-vendor.mk)

$(call inherit-product, frameworks/base/data/fonts/fonts.mk)
$(call inherit-product, frameworks/base/data/keyboards/keyboards.mk)
$(call inherit-product, frameworks/base/data/sounds/NewAudio.mk)

PRODUCT_PACKAGES += \


DEVICE_PACKAGE_OVERLAYS += device/$(VENDOR)/$(DEVICE)/overlay

LOCAL_PATH := $(call my-dir)

$(call inherit-product-if-exists, vendor/motorola/xt320/xt320-vendor.mk)
# $(call inherit-product, build/target/product/full.mk)

DEVICE_PACKAGE_OVERLAYS += device/motorola/xt320/overlay
$(call inherit-product-if-exists, vendor/$(VENDOR)/$(DEVICE)/xt320-vendor.mk)

$(call inherit-product, build/target/product/core.mk)

# The gps config appropriate for this device
$(call inherit-product, device/common/gps/gps_eu_supl.mk)

LOCAL_PATH := device/motorola/xt320
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := $(LOCAL_PATH)/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif

PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
device/$(VENDOR)/$(DEVICE)/root/ueventd.qcom.rc:root/ueventd.qcom.rc \
device/$(VENDOR)/$(DEVICE)/root/init.qcom.rc:root/init.qcom.rc \
device/$(VENDOR)/$(DEVICE)/root/init.qcom.sh:root/init.qcom.sh \
device/$(VENDOR)/$(DEVICE)/fstab:system/etc/fstab \

PRODUCT_COPY_FILES += \
device/$(VENDOR)/$(DEVICE)/prebuilt/etc/firmware/bt/brcm/broadcom_bt_fw.hcd:system/etc/firmware/bt/brcm/broadcom_bt_fw.hcd \
device/$(VENDOR)/$(DEVICE)/prebuilt/usr/idc/sitronix_ts.idc:system/usr/idc/sitronix_ts.idc \

PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=180dpi \

$(call inherit-product, build/target/product/full.mk)

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
PRODUCT_NAME := full_xt320
PRODUCT_DEVICE := xt320
PRODUCT_BRAND := motorola

2 changes: 2 additions & 0 deletions egl.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0 0 android
# 0 1 adreno200
36 changes: 36 additions & 0 deletions extract-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/sh

# 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/LICENSu8150E-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.

# Extract prebuilt libraries (from a CM7 running device) needed for the xt320

VENDOR=motorola
DEVICE=xt320

BASE=../../../vendor/$VENDOR/$DEVICE/proprietary
# rm -rf $BASE/*

for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
adb pull /system/$FILE $BASE/$FILE
done

chmod 0755 ../../../$OUTDIR/proprietary/bin/*
chmod 0755 ../../../$OUTDIR/proprietary/etc/*.sh

./setup-makefiles.sh
4 changes: 4 additions & 0 deletions fstab
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/dev/block/mtdblock9 /cache yaffs2 rw
/dev/block/mtdblock12 /data yaffs2 rw
/dev/block/mtdblock11 /system yaffs2 rw
/dev/block/mmcblk0p1 /sdcard vfat rw
37 changes: 37 additions & 0 deletions full_xt320.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
LOCAL_PATH := $(call my-dir)
VENDOR := motorola
DEVICE := xt320

# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/base_telephony.mk)
$(call inherit-product-if-exists, vendor/qcom/proprietary/qcom-vendor.mk)
$(call inherit-product, device/$(VENDOR)/$(DEVICE)/device_xt320.mk)
$(call inherit-product-if-exists, vendor/$(VENDOR)/$(DEVICE)/xt320-vendor.mk)
$(call inherit-product, frameworks/base/data/sounds/OldAudio.mk)



# The gps config appropriate for this device
$(call inherit-product, device/common/gps/gps_eu_supl.mk)

DEVICE_PACKAGE_OVERLAYS += device/motorola/xt320/overlay

PRODUCT_PACKAGES += \
libcamera \
liblights \
libgenlock \
liboverlay \
gralloc.msm7x27a \
audio_policy.msm7x27a \
audio_primary.msm7x27a \
camera.msm7x27a \
copybit.msm7x27a \
lights.msm7x27a \
gps.msm7x27a


#$(call inherit-product, build/target/product/full.mk)

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
PRODUCT_NAME := full_xt320
PRODUCT_DEVICE := xt320
Loading

0 comments on commit 8d36a61

Please sign in to comment.