summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2015-10-07 13:45:28 +0200
committerBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2015-10-07 13:46:10 +0200
commit74368573ceff5cc0c9190000b0da9ef9e0304353 (patch)
tree5a66fb215a2fdef0030dd999429d7f04c0c3929d
Create DragonBoard 410c device repository
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--AndroidProducts.mk17
-rw-r--r--BoardConfig.mk71
-rw-r--r--bootimg.cfg0
-rw-r--r--device.mk52
-rw-r--r--full_dragonboard410c.mk23
-rw-r--r--gpu/gpu_mesa.mk19
-rw-r--r--root/fstab.qcom10
-rw-r--r--root/fstab.qualcomm10
-rw-r--r--root/init.partitions.qualcomm.rc31
-rw-r--r--root/init.qcom.rc81
-rw-r--r--root/init.qualcomm.rc81
-rw-r--r--vendorsetup.sh19
12 files changed, 414 insertions, 0 deletions
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644
index 0000000..0c22826
--- /dev/null
+++ b/AndroidProducts.mk
@@ -0,0 +1,17 @@
+#
+# Copyright 2014 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.
+#
+
+PRODUCT_MAKEFILES := $(LOCAL_DIR)/full_dragonboard410c.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644
index 0000000..f4c472d
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,71 @@
+# config.mk
+#
+# Product-specific compile-time definitions.
+#
+
+# The generic product target doesn't have any hardware-specific pieces.
+TARGET_NO_BOOTLOADER := true
+TARGET_NO_KERNEL := true
+TARGET_NO_RADIOIMAGE := true
+
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := generic
+TARGET_CPU_SMP := true
+
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv7-a-neon
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := cortex-a15
+
+#SMALLER_FONT_FOOTPRINT := true
+#MINIMAL_FONT_FOOTPRINT := true
+
+# Some framework code requires this to enable BT
+# For now:
+BOARD_HAVE_BLUETOOTH := false
+#BOARD_HAVE_BLUETOOTH := true
+#BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/generic/common/bluetooth
+
+BOARD_USES_GENERIC_AUDIO := true
+
+BOARD_GPU_DRIVERS := freedreno
+#BOARD_EGL_CFG := device/generic/common/gpu/egl_mesa.cfg
+
+USE_CAMERA_STUB := true
+
+BUILD_EMULATOR_OPENGL := false
+USE_OPENGL_RENDERER := true
+
+BOARD_USE_LEGACY_UI := true
+VSYNC_EVENT_PHASE_OFFSET_NS := 0
+
+BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hdc.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk androidboot.selinux=permissive
+
+TARGET_USES_64_BIT_BCMDHD := true
+TARGET_USES_64_BIT_BINDER := true
+TARGET_USES_LOGD := true
+
+TARGET_USERIMAGES_USE_EXT4 := true
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 524288000
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
+BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_FLASH_BLOCK_SIZE := 512
+TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
+
+BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy
+BOARD_SEPOLICY_UNION += \
+ bootanim.te \
+ device.te \
+ domain.te \
+ file.te \
+ file_contexts \
+ qemud.te \
+ rild.te \
+ shell.te \
+ surfaceflinger.te \
+ system_server.te
diff --git a/bootimg.cfg b/bootimg.cfg
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/bootimg.cfg
diff --git a/device.mk b/device.mk
new file mode 100644
index 0000000..78172b6
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,52 @@
+#
+# Copyright 2014 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),)
+LOCAL_KERNEL := device/freedreno/dragonboard410c-kernel/kernel
+else
+LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
+endif
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \
+ ro.sf.lcd_density=180 \
+ dalvik.vm.heapsize=48m \
+
+PRODUCT_COPY_FILES := \
+ $(foreach f,$(wildcard $(LOCAL_PATH)/root/*),$(f):$(subst $(LOCAL_PATH)/,,$(f))) \
+ $(LOCAL_KERNEL):kernel
+
+# firmware distributed separately, copy these files from your device and
+# use ADRENO_FIRMWARE=path/to/firmware/directory on the make cmdline:
+PRODUCT_COPY_FILES += \
+ $(ADRENO_FIRMWARE)/a300_pfp.fw:root/lib/firmware/a300_pfp.fw \
+ $(ADRENO_FIRMWARE)/a300_pm4.fw:root/lib/firmware/a300_pm4.fw \
+
+$(call inherit-product-if-exists, vendor/freedreno/dragonboard410c/device-vendor.mk)
+
+
+PRODUCT_CHARACTERISTICS := tablet
+
+PRODUCT_AAPT_CONFIG := normal large xlarge mdpi hdpi
+PRODUCT_AAPT_PREF_CONFIG := mdpi
+
+DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay
+
+# Get the hardware acceleration libraries
+$(call inherit-product-if-exists,$(LOCAL_PATH)/gpu/gpu_mesa.mk)
+
+PRODUCT_PACKAGES += \
+ Trebuchet \
+
diff --git a/full_dragonboard410c.mk b/full_dragonboard410c.mk
new file mode 100644
index 0000000..4d39cad
--- /dev/null
+++ b/full_dragonboard410c.mk
@@ -0,0 +1,23 @@
+#
+# Copyright 2014 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.
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+$(call inherit-product, device/freedreno/dragonboard410c/device.mk)
+
+PRODUCT_NAME := full_dragonboard410c
+PRODUCT_DEVICE := dragonboard410c
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := dragonboard410c
+PRODUCT_MANUFACTURER := freedreno
diff --git a/gpu/gpu_mesa.mk b/gpu/gpu_mesa.mk
new file mode 100644
index 0000000..70854cb
--- /dev/null
+++ b/gpu/gpu_mesa.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2011 The Android-x86 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
+#
+
+PRODUCT_PACKAGES += \
+ gralloc.drm \
+ libGLES_mesa
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+ hal.gralloc=drm \
+ debug.egl.hw=1 \
+ ro.opengles.version=196608
+
diff --git a/root/fstab.qcom b/root/fstab.qcom
new file mode 100644
index 0000000..1148a86
--- /dev/null
+++ b/root/fstab.qcom
@@ -0,0 +1,10 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+/dev/mmcblk0p22 /system ext4 ro,barrier=1,discard wait
+/dev/mmcblk0p29 /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,encryptable=footer
+#/devices/soc.0/7864900.sdhci/mmc_host /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd
+#/devices/soc.0/78d9000.usb / auto vfat defaults voldmanaged=usbotg:auto
+#/dev/block/zram0 none swap defaults zramsize=536870912
+#/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
diff --git a/root/fstab.qualcomm b/root/fstab.qualcomm
new file mode 100644
index 0000000..1148a86
--- /dev/null
+++ b/root/fstab.qualcomm
@@ -0,0 +1,10 @@
+# Android fstab file.
+#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+/dev/mmcblk0p22 /system ext4 ro,barrier=1,discard wait
+/dev/mmcblk0p29 /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,encryptable=footer
+#/devices/soc.0/7864900.sdhci/mmc_host /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd
+#/devices/soc.0/78d9000.usb / auto vfat defaults voldmanaged=usbotg:auto
+#/dev/block/zram0 none swap defaults zramsize=536870912
+#/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
diff --git a/root/init.partitions.qualcomm.rc b/root/init.partitions.qualcomm.rc
new file mode 100644
index 0000000..a235df3
--- /dev/null
+++ b/root/init.partitions.qualcomm.rc
@@ -0,0 +1,31 @@
+on init
+ # mount debugfs
+ mount debugfs /sys/kernel/debug /sys/kernel/debug
+
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0555 root root
+
+ export EXTERNAL_STORAGE /storage/emulated/legacy
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
+
+ # Support legacy paths
+ symlink /storage/emulated/legacy /sdcard
+ symlink /storage/emulated/legacy /mnt/sdcard
+ symlink /storage/emulated/legacy /storage/sdcard0
+ symlink /mnt/shell/emulated/0 /storage/emulated/legacy
+
+ # Disabled virtual memory randomization
+ # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
+ write /proc/sys/kernel/randomize_va_space 0
+
+# virtual sdcard daemon running as media_rw (1023)
+service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
+ class late_start
+
+on post-fs-data
+ mkdir /data/media 0770 media_rw media_rw
+
+on fs
+ mount_all /fstab.qualcomm
diff --git a/root/init.qcom.rc b/root/init.qcom.rc
new file mode 100644
index 0000000..d081831
--- /dev/null
+++ b/root/init.qcom.rc
@@ -0,0 +1,81 @@
+import /init.partitions.qualcomm.rc
+
+on init
+ # mount debugfs
+ mount debugfs /sys/kernel/debug /sys/kernel/debug
+
+# power management
+# Enable off mode by default
+ #write /sys/kernel/debug/pm_debug/enable_off_mode 1
+
+on boot
+ # create dhcpcd dir
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ mkdir /data/misc/gatord 0700 root root
+ chmod 0770 /data/misc/dhcp
+
+ # For TC2, set A15 and A7 clusters A7s to interactive governor
+ # (Other CoreTiles don't have cpu_freq so this doesn't affect them.)
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor interactive
+
+ # change permissions for alsa nodes
+ chmod 0777 /dev/snd/pcmC0D0c
+ chmod 0777 /dev/snd/pcmC0D0p
+ chmod 0777 /dev/snd/controlC0
+ chmod 0777 /dev/snd/timer
+
+ #change permissions for alsa nodes for audio modem
+ chmod 0777 /dev/snd/pcmC0D5c
+ chmod 0777 /dev/snd/pcmC0D5p
+
+ #change permissions for alsa nodes for HDMI
+ chmod 777 /dev/snd/pcmC0D7p
+
+ chown system system /sys/class/graphics/fb0/overlays
+ chown system system /sys/class/graphics/fb0/fit_to_screen
+ chown system system /sys/class/graphics/fb1/overlays
+
+# Load gator module
+ insmod /system/modules/gator.ko
+
+on post-fs-data
+ # Set SELinux security contexts for files used by lava.
+ restorecon_recursive /data/local/tmp/lava
+
+service boardtweaks /sbin/tweaks.qualcomm.sh
+ class main
+ user root
+ oneshot
+
+# setup IRQ affinity to the A7s
+service setirqaffinity /sbin/set_irq_affinity.sh 0xc07
+ class main
+ user root
+ oneshot
+
+service faketsd /system/bin/faketsd
+ class main
+ user bluetooth
+ group bluetooth
+ oneshot
+
+service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL
+ class main
+ disabled
+ oneshot
+
+service iprenew_eth0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service gatord /system/bin/gatord -c /data/misc/gatord/configuration.xml
+ class main
+ user root
+ oneshot
+ seclabel u:r:gatord:s0
+
diff --git a/root/init.qualcomm.rc b/root/init.qualcomm.rc
new file mode 100644
index 0000000..d081831
--- /dev/null
+++ b/root/init.qualcomm.rc
@@ -0,0 +1,81 @@
+import /init.partitions.qualcomm.rc
+
+on init
+ # mount debugfs
+ mount debugfs /sys/kernel/debug /sys/kernel/debug
+
+# power management
+# Enable off mode by default
+ #write /sys/kernel/debug/pm_debug/enable_off_mode 1
+
+on boot
+ # create dhcpcd dir
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ mkdir /data/misc/gatord 0700 root root
+ chmod 0770 /data/misc/dhcp
+
+ # For TC2, set A15 and A7 clusters A7s to interactive governor
+ # (Other CoreTiles don't have cpu_freq so this doesn't affect them.)
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor interactive
+
+ # change permissions for alsa nodes
+ chmod 0777 /dev/snd/pcmC0D0c
+ chmod 0777 /dev/snd/pcmC0D0p
+ chmod 0777 /dev/snd/controlC0
+ chmod 0777 /dev/snd/timer
+
+ #change permissions for alsa nodes for audio modem
+ chmod 0777 /dev/snd/pcmC0D5c
+ chmod 0777 /dev/snd/pcmC0D5p
+
+ #change permissions for alsa nodes for HDMI
+ chmod 777 /dev/snd/pcmC0D7p
+
+ chown system system /sys/class/graphics/fb0/overlays
+ chown system system /sys/class/graphics/fb0/fit_to_screen
+ chown system system /sys/class/graphics/fb1/overlays
+
+# Load gator module
+ insmod /system/modules/gator.ko
+
+on post-fs-data
+ # Set SELinux security contexts for files used by lava.
+ restorecon_recursive /data/local/tmp/lava
+
+service boardtweaks /sbin/tweaks.qualcomm.sh
+ class main
+ user root
+ oneshot
+
+# setup IRQ affinity to the A7s
+service setirqaffinity /sbin/set_irq_affinity.sh 0xc07
+ class main
+ user root
+ oneshot
+
+service faketsd /system/bin/faketsd
+ class main
+ user bluetooth
+ group bluetooth
+ oneshot
+
+service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL
+ class main
+ disabled
+ oneshot
+
+service iprenew_eth0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service gatord /system/bin/gatord -c /data/misc/gatord/configuration.xml
+ class main
+ user root
+ oneshot
+ seclabel u:r:gatord:s0
+
diff --git a/vendorsetup.sh b/vendorsetup.sh
new file mode 100644
index 0000000..41a4d58
--- /dev/null
+++ b/vendorsetup.sh
@@ -0,0 +1,19 @@
+#
+# Copyright 2014 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.
+#
+
+add_lunch_combo full_dragonboard410c-user
+add_lunch_combo full_dragonboard410c-userdebug
+add_lunch_combo full_dragonboard410c-eng