Initial Hikey device configuration
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
Change-Id: I2697a8e4aec4991826f7351fd7f41eba324a6869
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644
index 0000000..0df5afe
--- /dev/null
+++ b/AndroidProducts.mk
@@ -0,0 +1,13 @@
+#
+# This file should set PRODUCT_MAKEFILES to a list of product makefiles
+# to expose to the build system. LOCAL_DIR will already be set to
+# the directory containing this file.
+#
+# This file may not rely on the value of any variable other than
+# LOCAL_DIR; do not use any conditionals, and do not look up the
+# value of any variable that isn't set in this file or in a file that
+# it includes.
+#
+
+PRODUCT_MAKEFILES := \
+$(LOCAL_DIR)/hikey.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644
index 0000000..b14271d
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,49 @@
+# Primary Arch
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_VARIANT := generic
+TARGET_CPU_ABI := arm64-v8a
+
+# Secondary Arch
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv7-a-neon
+TARGET_2ND_CPU_VARIANT := cortex-a15
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+
+TARGET_USES_64_BIT_BINDER := true
+TARGET_SUPPORTS_32_BIT_APPS := true
+TARGET_SUPPORTS_64_BIT_APPS := true
+
+TARGET_BOARD_PLATFORM := hikey
+WITH_DEXPREOPT ?= true
+USE_OPENGL_RENDERER := true
+ANDROID_ENABLE_RENDERSCRIPT := true
+
+# BT configs
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := "device/linaro/hikey/bluetooth"
+BOARD_HAVE_BLUETOOTH := true
+
+# generic wifi
+WPA_SUPPLICANT_VERSION := VER_0_8_X
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+CONFIG_DRIVER_NL80211 := y
+CONFIG_DRIVER_WEXT := y
+
+BOARD_KERNEL_CMDLINE := k3v2mem hisi_dma_print=0 vmalloc=484M no_irq_affinity loglevel=7 androidboot.hardware=hikey selinux=0
+
+TARGET_NO_BOOTLOADER := true
+TARGET_NO_KERNEL := false
+TARGET_NO_RECOVERY := true
+TARGET_HARDWARE_3D := true
+BOARD_USES_GENERIC_AUDIO := true
+USE_CAMERA_STUB := true
+TARGET_USERIMAGES_USE_EXT4 := true
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1342177280
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 1342177280
+BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_FLASH_BLOCK_SIZE := 131072
+TARGET_USE_PAN_DISPLAY := true
+
+BOARD_SEPOLICY_DIRS := device/linaro/hikey/sepolicy
diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf
new file mode 100644
index 0000000..dc1c653
--- /dev/null
+++ b/audio/audio_policy.conf
@@ -0,0 +1,98 @@
+#
+# Audio policy configuration for nvidia device builds
+#
+
+# Global configuration section: lists input and output devices always present on the device
+# as well as the output device selected by default.
+# Devices are designated by a string that corresponds to the enum in audio.h
+
+global_configuration {
+ attached_output_devices AUDIO_DEVICE_OUT_CUSTOM|AUDIO_DEVICE_OUT_SPEAKER
+ default_output_device AUDIO_DEVICE_OUT_SPEAKER
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
+}
+
+# audio hardware module section: contains descriptors for all audio hw modules present on the
+# device. Each hw module node is named after the corresponding hw module library base name.
+# For instance, "primary" corresponds to audio.primary.<device>.so.
+# The "primary" module is mandatory and must include at least one output with
+# AUDIO_OUTPUT_FLAG_PRIMARY flag.
+# Each module descriptor contains one or more output profile descriptors and zero or more
+# input profile descriptors. Each profile lists all the parameters supported by a given output
+# or input stream category.
+# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
+# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
+
+audio_hw_modules {
+ primary {
+ outputs {
+ primary {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
+ }
+ }
+ inputs {
+ primary {
+ sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
+ }
+ }
+ }
+ a2dp {
+ outputs {
+ a2dp {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_ALL_A2DP
+ }
+ }
+ }
+ usb {
+ outputs {
+ usb_accessory {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_USB_ACCESSORY
+ }
+ usb_device {
+ sampling_rates dynamic
+ channel_masks dynamic
+ formats dynamic
+ devices AUDIO_DEVICE_OUT_USB_DEVICE
+ }
+ }
+ inputs {
+ usb_device {
+ sampling_rates dynamic
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_USB_DEVICE
+ }
+ }
+ }
+ r_submix {
+ outputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
+ }
+ }
+ inputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
+ }
+ }
+ }
+}
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
new file mode 100644
index 0000000..a2ce34b
--- /dev/null
+++ b/bluetooth/bdroid_buildcfg.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+#ifndef _BDROID_BUILDCFG_H
+#define _BDROID_BUILDCFG_H
+
+#define BTM_DEF_LOCAL_NAME "Android Bluedroid"
+#define PRELOAD_START_TIMEOUT_MS 30000
+
+#endif
diff --git a/boot_fat.mk b/boot_fat.mk
new file mode 100644
index 0000000..5d3a0d4
--- /dev/null
+++ b/boot_fat.mk
@@ -0,0 +1,15 @@
+REALTOP=$(realpath $(TOP))
+boot_fatimage: bootimage
+ dd if=/dev/zero of=$(PRODUCT_OUT)/boot_fat.uefi.img bs=512 count=98304
+ mkfs.fat -n "BOOT IMG" $(PRODUCT_OUT)/boot_fat.uefi.img
+ mkdir -p $(PRODUCT_OUT)/boot_tmp && sudo mount -o umask=000,loop,rw,sync $(PRODUCT_OUT)/boot_fat.uefi.img $(PRODUCT_OUT)/boot_tmp
+ cp $(PRODUCT_OUT)/kernel $(PRODUCT_OUT)/boot_tmp/Image
+ cp $(PRODUCT_OUT)/hi6220-hikey.dtb $(PRODUCT_OUT)/boot_tmp/hi6220-hikey.dtb
+ cp -r device/linaro/hikey/bootloader/* $(PRODUCT_OUT)/boot_tmp/
+ cp $(PRODUCT_OUT)/ramdisk.img $(PRODUCT_OUT)/boot_tmp/
+ mkdir -p $(PRODUCT_OUT)/boot_tmp/grub/
+ sync
+ sudo umount -f $(PRODUCT_OUT)/boot_fat.uefi.img
+
+
+droidcore: boot_fatimage
diff --git a/bootloader/fastboot.efi b/bootloader/fastboot.efi
new file mode 100644
index 0000000..2fce0fd
--- /dev/null
+++ b/bootloader/fastboot.efi
Binary files differ
diff --git a/bootloader/grub/grub.cfg b/bootloader/grub/grub.cfg
new file mode 100644
index 0000000..2dadf7e
--- /dev/null
+++ b/bootloader/grub/grub.cfg
@@ -0,0 +1,17 @@
+set default="0"
+set timeout=2
+menuentry 'AOSP@720P' {
+ linux /Image console=ttyAMA3,115200 androidboot.console=ttyAMA3 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime video=HDMI-A-1:1280x720@60 androidboot.selinux=permissive
+ initrd /ramdisk.img
+ devicetree /hi6220-hikey.dtb
+}
+menuentry 'AOSP@SVGA' {
+ linux /Image console=ttyAMA3,115200 androidboot.console=ttyAMA3 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime video=HDMI-A-1:800x600@60 androidboot.selinux=permissive
+ initrd /ramdisk.img
+ devicetree /hi6220-hikey.dtb
+}
+menuentry 'AOSP' {
+ linux /Image console=ttyAMA3,115200 androidboot.console=ttyAMA3 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime androidboot.selinux=permissive
+ initrd /ramdisk.img
+ devicetree /hi6220-hikey.dtb
+}
diff --git a/bootloader/grubaa64.efi b/bootloader/grubaa64.efi
new file mode 100644
index 0000000..01728a6
--- /dev/null
+++ b/bootloader/grubaa64.efi
Binary files differ
diff --git a/bt-wifi-firmware-util/TIInit_11.8.32.bts b/bt-wifi-firmware-util/TIInit_11.8.32.bts
new file mode 100755
index 0000000..824ca0f
--- /dev/null
+++ b/bt-wifi-firmware-util/TIInit_11.8.32.bts
Binary files differ
diff --git a/bt-wifi-firmware-util/uim-sysfs.sh b/bt-wifi-firmware-util/uim-sysfs.sh
new file mode 100755
index 0000000..356f085
--- /dev/null
+++ b/bt-wifi-firmware-util/uim-sysfs.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+uim=/usr/sbin/uim
+
+test -x "$uim" || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting uim-sysfs daemon"
+ start-stop-daemon --start --quiet --exec $uim &
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping uim-sysfs daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/uim.pid
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/uim-sysfs.sh {start|stop}"
+ exit 1
+esac
+
+exit 0
+
diff --git a/bt-wifi-firmware-util/wl18xx-fw-2.bin b/bt-wifi-firmware-util/wl18xx-fw-2.bin
new file mode 100644
index 0000000..4eb4415
--- /dev/null
+++ b/bt-wifi-firmware-util/wl18xx-fw-2.bin
Binary files differ
diff --git a/bt-wifi-firmware-util/wl18xx-fw-3.bin b/bt-wifi-firmware-util/wl18xx-fw-3.bin
new file mode 100644
index 0000000..3c799a3
--- /dev/null
+++ b/bt-wifi-firmware-util/wl18xx-fw-3.bin
Binary files differ
diff --git a/bt-wifi-firmware-util/wl18xx-fw-4.bin b/bt-wifi-firmware-util/wl18xx-fw-4.bin
new file mode 100755
index 0000000..252ea2d
--- /dev/null
+++ b/bt-wifi-firmware-util/wl18xx-fw-4.bin
Binary files differ
diff --git a/cmdline b/cmdline
new file mode 100755
index 0000000..a0a1e7a
--- /dev/null
+++ b/cmdline
@@ -0,0 +1 @@
+k3v2mem hisi_dma_print=0 vmalloc=484M no_irq_affinity loglevel=7 androidboot.console=ttyAMA0 androidboot.hardware=hikey root=/dev/mmcblk0p7 firmware_class.path=/system/etc/firmware
diff --git a/device.mk b/device.mk
new file mode 100644
index 0000000..a3cc8c2
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,93 @@
+#
+# 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.
+#
+
+# Adjust the dalvik heap to be appropriate for a tablet.
+$(call inherit-product-if-exists, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
+
+ifeq ($(TARGET_PREBUILT_KERNEL),)
+LOCAL_KERNEL := device/linaro/hikey-kernel/Image
+LOCAL_DTB := device/linaro/hikey-kernel/hi6220-hikey.dtb
+else
+LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
+LOCAL_DTB := $(TARGET_PREBUILT_DTB)
+endif
+
+PRODUCT_COPY_FILES += $(LOCAL_KERNEL):kernel \
+ $(LOCAL_DTB):hi6220-hikey.dtb \
+ $(LOCAL_PATH)/fstab.hikey:root/fstab.hikey \
+ $(LOCAL_PATH)/init.hikey.rc:root/init.hikey.rc \
+ $(LOCAL_PATH)/ueventd.hikey.rc:root/ueventd.hikey.rc \
+ $(LOCAL_PATH)/hikey.kl:system/usr/keylayout/hikey.kl
+
+$(call inherit-product-if-exists, device/linaro/hikey-kernel/modules/wifi/wifi.mk)
+
+# Set custom settings
+DEVICE_PACKAGE_OVERLAYS := device/linaro/hikey/overlay
+
+# Add openssh support for remote debugging and job submission
+PRODUCT_PACKAGES += ssh sftp scp sshd ssh-keygen sshd_config start-ssh uim wpa_supplicant
+
+# Build and run only ART
+PRODUCT_RUNTIMES := runtime_libart_default
+
+# Build BT a2dp audio HAL
+PRODUCT_PACKAGES += audio.a2dp.default
+
+# Include USB speed switch App
+PRODUCT_PACKAGES += UsbSpeedSwitch
+
+# Build libion for new double-buffering HDLCD driver
+PRODUCT_PACKAGES += libion
+
+# Build gralloc for Juno
+PRODUCT_PACKAGES += gralloc.hikey
+
+# Set zygote config
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64_32
+PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64_32.rc:root/init.zygote64_32.rc
+
+PRODUCT_PACKAGES += libGLES_android
+
+# Copy hardware config file(s)
+PRODUCT_COPY_FILES += \
+ device/linaro/hikey/etc/permissions/android.hardware.screen.xml:system/etc/permissions/android.hardware.screen.xml \
+ frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
+ frameworks/native/data/etc/android.software.app_widgets.xml:system/etc/permissions/android.software.app_widgets.xml \
+ frameworks/native/data/etc/android.software.backup.xml:system/etc/permissions/android.software.backup.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml
+
+#Copy Graphics binaries
+PRODUCT_COPY_FILES += vendor/linaro/hikey/mali/64bit/libGLES_mali.so:system/lib64/egl/libGLES_mali.so \
+ vendor/linaro/hikey/mali/32bit/libGLES_mali.so:system/lib/egl/libGLES_mali.so
+
+# Include BT modules
+$(call inherit-product-if-exists, hardware/ti/wpan/ti-wpan-products.mk)
+
+# Build boot_fat partition image
+$(call inherit-product-if-exists, device/linaro/hikey/boot_fat.mk)
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
+ device/linaro/hikey/bt-wifi-firmware-util/TIInit_11.8.32.bts:system/etc/firmware/ti-connectivity/TIInit_11.8.32.bts \
+ device/linaro/hikey/bt-wifi-firmware-util/TIInit_11.8.32.bts:system/etc/firmware/TIInit_11.8.32.bts \
+ device/linaro/hikey/bt-wifi-firmware-util/wl18xx-fw-4.bin:system/etc/firmware/ti-connectivity/wl18xx-fw-4.bin \
+ device/linaro/hikey/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \
+ device/linaro/hikey/audio/audio_policy.conf:system/etc/audio_policy.conf
+
+# Copy media codecs config file
+PRODUCT_COPY_FILES += device/linaro/hikey/etc/media_codecs.xml:system/etc/media_codecs.xml
diff --git a/etc/media_codecs.xml b/etc/media_codecs.xml
new file mode 100644
index 0000000..8d46b98
--- /dev/null
+++ b/etc/media_codecs.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright (C) 2012 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT MediaCodecs (Decoders,Encoders)>
+<!ELEMENT Decoders (MediaCodec*)>
+<!ELEMENT Encoders (MediaCodec*)>
+<!ELEMENT MediaCodec (Type*,Quirk*)>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+-->
+
+<MediaCodecs>
+ <Decoders>
+ <MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" />
+ <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" />
+ <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" />
+ <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" />
+ <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" />
+ <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" />
+ <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" />
+ <MediaCodec name="OMX.google.gsm.decoder" type="audio/gsm" />
+
+ <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" />
+ <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" />
+ <MediaCodec name="OMX.google.h264.decoder" type="video/avc" />
+ <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" />
+ <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" />
+ </Decoders>
+
+ <Encoders>
+ <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" />
+ <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" />
+ <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" />
+ <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" />
+ <MediaCodec name="OMX.google.h264.encoder" type="video/avc" />
+ <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" />
+ <MediaCodec name="OMX.google.flac.encoder" type="audio/flac" />
+ <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" />
+ </Encoders>
+</MediaCodecs>
diff --git a/etc/permissions/android.hardware.screen.xml b/etc/permissions/android.hardware.screen.xml
new file mode 100644
index 0000000..1e748ae
--- /dev/null
+++ b/etc/permissions/android.hardware.screen.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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/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.
+-->
+
+<!-- These are the screen features that most applications query for -->
+<permissions>
+ <feature name="android.hardware.screen.portrait" />
+ <feature name="android.hardware.screen.landscape" />
+</permissions>
diff --git a/fstab.hikey b/fstab.hikey
new file mode 100644
index 0000000..07d8462
--- /dev/null
+++ b/fstab.hikey
@@ -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/block/platform/f723d000.dwmmc0/by-name/system /system ext4 ro wait
+/dev/block/platform/f723d000.dwmmc0/by-name/cache /cache ext4 discard,noauto_da_alloc,data=ordered,user_xattr,discard,barrier=1 wait
+/dev/block/platform/f723d000.dwmmc0/by-name/userdata /data ext4 discard,noauto_da_alloc,data=ordered,user_xattr,discard,barrier=1 wait
+/devices/f723e000.dwmmc1/mmc_host auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+/devices/f72c0000.usb/usb1 auto auto defaults voldmanaged=usbdisk:auto,encryptable=userdata
diff --git a/hikey.kl b/hikey.kl
new file mode 100644
index 0000000..a1302da
--- /dev/null
+++ b/hikey.kl
@@ -0,0 +1,113 @@
+# 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/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.
+
+#
+# Generic key layout file for full alphabetic US English PC style external keyboards.
+#
+# This file is intentionally very generic and is intended to support a broad rang of keyboards.
+# Do not edit the generic key layout to support a specific keyboard; instead, create
+# a new key layout file with the required keyboard configuration.
+#
+
+key 399 GRAVE
+key 1 BACK
+key 2 1
+key 3 2
+key 4 3
+key 5 4
+key 6 5
+key 7 6
+key 8 7
+key 9 8
+key 10 9
+key 11 0
+key 158 BACK WAKE_DROPPED
+key 230 SOFT_RIGHT WAKE
+key 60 SOFT_RIGHT WAKE
+key 107 ENDCALL WAKE_DROPPED
+key 62 ENDCALL WAKE_DROPPED
+key 229 MENU WAKE_DROPPED
+key 139 MENU WAKE_DROPPED
+key 59 MENU WAKE_DROPPED
+key 127 SEARCH WAKE_DROPPED
+key 217 SEARCH WAKE_DROPPED
+key 228 POUND
+key 227 STAR
+key 231 CALL WAKE_DROPPED
+key 61 CALL WAKE_DROPPED
+key 232 DPAD_CENTER WAKE_DROPPED
+key 108 DPAD_DOWN WAKE_DROPPED
+key 103 DPAD_UP WAKE_DROPPED
+key 102 HOME WAKE
+key 105 DPAD_LEFT WAKE_DROPPED
+key 106 DPAD_RIGHT WAKE_DROPPED
+key 115 VOLUME_UP
+key 114 VOLUME_DOWN
+key 116 POWER WAKE
+key 212 CAMERA
+
+key 16 Q
+key 17 W
+key 18 E
+key 19 R
+key 20 T
+key 21 Y
+key 22 U
+key 23 I
+key 24 O
+key 25 P
+key 26 LEFT_BRACKET
+key 27 RIGHT_BRACKET
+key 43 BACKSLASH
+
+key 30 A
+key 31 S
+key 32 D
+key 33 F
+key 34 G
+key 35 H
+key 36 J
+key 37 K
+key 38 L
+key 39 SEMICOLON
+key 40 APOSTROPHE
+key 14 DEL
+
+key 44 Z
+key 45 X
+key 46 C
+key 47 V
+key 48 B
+key 49 N
+key 50 M
+key 51 COMMA
+key 52 PERIOD
+key 53 SLASH
+key 28 ENTER
+
+key 56 ALT_LEFT
+key 100 ALT_RIGHT
+key 42 SHIFT_LEFT
+key 54 SHIFT_RIGHT
+key 15 TAB
+key 57 SPACE
+key 150 EXPLORER
+key 155 ENVELOPE
+
+key 12 MINUS
+key 13 EQUALS
+key 215 AT
+
+
+key 82 MENU WAKE
diff --git a/hikey.mk b/hikey.mk
new file mode 100644
index 0000000..b48e531
--- /dev/null
+++ b/hikey.mk
@@ -0,0 +1,9 @@
+#
+# Inherit the full_base and device configurations
+$(call inherit-product, device/linaro/hikey/device.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+
+#
+# Overrides
+PRODUCT_NAME := hikey
+PRODUCT_DEVICE := hikey
diff --git a/init.hikey.rc b/init.hikey.rc
new file mode 100644
index 0000000..4a1914e
--- /dev/null
+++ b/init.hikey.rc
@@ -0,0 +1,159 @@
+on init
+ # mount debugfs
+ mount debugfs /sys/kernel/debug /sys/kernel/debug
+
+ setprop wifi.interface wlan0
+
+ # Set this property so AdvancedWifiSettings would show the checkbox
+ # for Enable/Disable Active Roaming
+ setprop ro.wifi.active_roaming.enable true
+
+ # disable transparent huge pages
+ write /sys/kernel/mm/transparent_hugepage/enabled "never"
+
+ # See storage config details at http://source.android.com/tech/storage/
+ symlink /sdcard /mnt/sdcard
+ symlink /sdcard /storage/sdcard0
+
+
+ # 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
+
+#bluetooth
+ #UART device
+ chmod 0660 /dev/ttyAMA1
+ chown bluetooth net_bt_stack /dev/ttyAMA1
+
+on fs
+ mount_all /fstab.hikey
+ setprop ro.crypto.fuse_sdcard false
+
+ mount configfs none /sys/kernel/config
+ mkdir /sys/kernel/config/usb_gadget/g1
+ mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb
+
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+
+ write /sys/kernel/config/usb_gadget/g1/idVendor 0x12d1
+ write /sys/kernel/config/usb_gadget/g1/idProduct 0x103a
+ mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
+ write /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber "0123456789"
+ write /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer "HISILICON"
+ write /sys/kernel/config/usb_gadget/g1/strings/0x409/product "ADB Gadget"
+
+ mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1
+ mkdir /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409
+ write /sys/kernel/config/usb_gadget/g1/configs/c.1/strings/0x409/configuration "Conf 1"
+ symlink /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/c.1/ffs.adb
+ start adbd
+
+
+on post-fs-data
+ mkdir /data/media 0770 media_rw media_rw
+ mkdir /data/misc/gatord 0700 root root
+ mkdir /data/misc/wireless 0771 system system
+ mkdir /data/misc/wifi 0771 wifi wifi
+ mkdir /data/misc/wifi/sockets 0771 wifi wifi
+ mkdir /data/misc/wifi/wapi_certs 0777 wifi wifi
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ # Set SELinux security contexts for files used by lava.
+ restorecon_recursive /data/local/tmp/lava
+
+on post-fs
+ # insert WiFi Modules
+ insmod /system/modules/rfkill.ko
+ insmod /system/modules/wifi/compat.ko
+ insmod /system/modules/wifi/cfg80211.ko
+ insmod /system/modules/wifi/mac80211.ko
+ insmod /system/modules/wifi/wlcore.ko
+ insmod /system/modules/wifi/wl18xx.ko
+ insmod /system/modules/wifi/wlcore_sdio.ko
+
+ # BT LED sysfs entry
+ write /sys/devices/leds/leds/bt_active/trigger "hci1rx"
+
+ chmod 0666 /dev/ump
+ chmod 0666 /dev/ion
+ chmod 0666 /dev/mali
+ chown system.graphics /dev/mali
+ chmod 0666 /dev/graphics/fb0
+
+# fake some battery state
+ setprop status.battery.state Slow
+ setprop status.battery.level 5
+ setprop status.battery.level_raw 50
+ setprop status.battery.level_scale 9
+
+# Set Display density
+ setprop ro.sf.lcd_density 160
+
+# Set supported opengles version
+ setprop ro.opengles.version 196608
+
+# change permissions for process groups
+# https://bugs.launchpad.net/bugs/1037611
+ chmod 0660 /dev/cpuctl
+
+# enable Google-specific location features,
+# like NetworkLocationProvider and LocationCollector
+ setprop ro.com.google.locationfeatures 1
+
+# enable test harness
+ setprop ro.test_harness true
+
+ # Setup paths used for socket communication with the dhcp daemon (dhcpd)
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ chown dhcp dhcp /data/misc/dhcp
+
+on property:sys.usb.config=adb
+ write /sys/kernel/config/usb_gadget/g1/UDC "f72c0000.usb"
+ write /sys/class/udc/f72c0000.usb/soft_connect "disconnect"
+ write /sys/class/udc/f72c0000.usb/soft_connect "connect"
+ setprop sys.usb.state ${sys.usb.config}
+
+# FIXME: we need to bind the driver while adbd is restarted. We need delay else bind fails. Need to investigate
+on property:init.svc.adbd=running
+ wait /dev/socket/hack 1
+ write /sys/kernel/config/usb_gadget/g1/UDC "f72c0000.usb"
+ write /sys/class/udc/f72c0000.usb/soft_connect "disconnect"
+ write /sys/class/udc/f72c0000.usb/soft_connect "connect"
+ setprop sys.usb.state ${sys.usb.config}
+
+
+on property:usb_speed.switch=high
+ write /sys/kernel/debug/f72c0000.usb/config "0"
+
+on property:usb_speed.switch=full
+ write /sys/kernel/debug/f72c0000.usb/config "1"
+
+#userspace daemon needed for bluetooth
+service uim /system/bin/uim
+ class main
+ user root
+ oneshot
+
+service wpa_supplicant /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
+ socket wpa_wlan0 dgram 660 wifi wifi
+ class main
+ disabled
+ oneshot
+
+service dhcpcd_wlan0 /system/bin/dhcpcd -dABKL
+ group dhcp
+ disabled
+ oneshot
+
+service dhcpcd_eth0 /system/bin/dhcpcd -dABKL
+ group dhcp
+ disabled
+ oneshot
+
+service dhcpcd_bt-pan /system/bin/dhcpcd -dABKL
+ group dhcp
+ disabled
+ oneshot
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..029bdec
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+
+ <!-- This device is not "voice capable"; it's data-only. -->
+ <bool name="config_voice_capable">false</bool>
+
+ <!-- This device does not allow sms service. -->
+ <bool name="config_sms_capable">false</bool>
+
+ <!-- Separate software navigation bar required on this device. -->
+ <bool name="config_showNavigationBar">true</bool>
+
+ <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
+ Please don't copy them, copy anything else. -->
+
+ <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+ before automatically restore the default connection. Set -1 if the connection
+ does not require auto-restore. -->
+ <!-- the 6th element indicates boot-time dependency-met value. -->
+ <string-array translatable="false" name="networkAttributes">
+ <item>"wifi,1,1,1,-1,true"</item>
+ <item>"wifi_p2p,13,1,0,-1,true"</item>
+ <item>"ethernet,9,9,2,-1,true"</item>
+ </string-array>
+
+ <!-- This string array should be overridden by the device to present a list of radio
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[ConnectivityManager connectionType],
+ [# simultaneous connection types]" -->
+ <string-array translatable="false" name="radioAttributes">
+ <item>"1,1"</item>
+ <item>"9,1"</item>
+ </string-array>
+
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
new file mode 100644
index 0000000..45ac503
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 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.
+*/
+-->
+
+<!-- The <device> element should contain one or more <storage> elements.
+ Exactly one of these should have the attribute primary="true".
+ This storage will be the primary external storage and should have path="/mnt/sdcard".
+ Each storage should have both a path and description attribute set.
+ The following boolean attributes are optional:
+
+ primary: this storage is the primary external storage
+ removable: this is removable storage (for example, a real SD card)
+ emulated: the storage is emulated via the FUSE sdcard daemon
+ mtp-reserve: number of megabytes of storage MTP should reserve for free storage
+ (used for emulated storage that is shared with system's data partition)
+
+ A storage should not have both emulated and removable set to true
+-->
+
+<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
+<storage
+ android:storageDescription="@string/storage_internal"
+ android:emulated="true"
+ android:mtpReserve="100" />
+<storage
+ android:mountPoint="/storage/sdcard1"
+ android:storageDescription="@string/storage_sd_card"
+ android:removable="true"
+ android:maxFileSize="4096" />
+
+<storage android:mountPoint="/storage/usbdisk"
+ android:storageDescription="@string/storage_usb"
+ android:primary="false"
+ android:removable="true" />
+
+</StorageList>
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..34d5433
--- /dev/null
+++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <integer name="def_screen_off_timeout">-1</integer>
+ <bool name="def_lockscreen_disabled">true</bool>
+ <bool name="def_stay_on_while_plugged_in">true</bool>
+</resources>
diff --git a/sepolicy/debuggerd.te b/sepolicy/debuggerd.te
new file mode 100644
index 0000000..308d1b1
--- /dev/null
+++ b/sepolicy/debuggerd.te
@@ -0,0 +1 @@
+allow debuggerd kernel:system module_request;
diff --git a/sepolicy/dex2oat.te b/sepolicy/dex2oat.te
new file mode 100644
index 0000000..c6e8e73
--- /dev/null
+++ b/sepolicy/dex2oat.te
@@ -0,0 +1 @@
+allow dex2oat kernel:system module_request;
diff --git a/sepolicy/drmserver.te b/sepolicy/drmserver.te
new file mode 100644
index 0000000..b98b158
--- /dev/null
+++ b/sepolicy/drmserver.te
@@ -0,0 +1 @@
+allow drmserver kernel:system module_request;
diff --git a/sepolicy/file.te b/sepolicy/file.te
new file mode 100644
index 0000000..45c5117
--- /dev/null
+++ b/sepolicy/file.te
@@ -0,0 +1 @@
+type configfs, fs_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
new file mode 100644
index 0000000..19ea0d4
--- /dev/null
+++ b/sepolicy/file_contexts
@@ -0,0 +1,8 @@
+/data/linaro-android-kernel-test(/.*)? u:object_r:shell_data_file:s0
+/data/linaro-android-userspace-test(/.*)? u:object_r:shell_data_file:s0
+/data/nativebenchmark(/.*)? u:object_r:shell_data_file:s0
+/dev/ttyAMA0 u:object_r:console_device:s0
+/dev/ttyAMA3 u:object_r:console_device:s0
+/dev/mali u:object_r:gpu_device:s0
+/dev/dri/card0 u:object_r:gpu_device:s0
+/dev/hci_tty u:object_r:hci_attach_dev:s0
diff --git a/sepolicy/gatord.te b/sepolicy/gatord.te
new file mode 100644
index 0000000..2943a9b
--- /dev/null
+++ b/sepolicy/gatord.te
@@ -0,0 +1,3 @@
+type gatord, domain, mlstrustedsubject;
+
+permissive gatord;
diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts
new file mode 100644
index 0000000..50c7cd7
--- /dev/null
+++ b/sepolicy/genfs_contexts
@@ -0,0 +1 @@
+genfscon configfs / u:object_r:configfs:s0
diff --git a/sepolicy/init.te b/sepolicy/init.te
new file mode 100644
index 0000000..a8cca76
--- /dev/null
+++ b/sepolicy/init.te
@@ -0,0 +1,7 @@
+userdebug_or_eng(`
+ allow init su:process { transition dyntransition rlimitinh siginh };
+')
+allow init self:capability { sys_module };
+allow init self:tcp_socket create;
+allow init gatord:process { transition rlimitinh siginh };
+allow init kernel:system module_request;
diff --git a/sepolicy/kernel.te b/sepolicy/kernel.te
new file mode 100644
index 0000000..9be9fd4
--- /dev/null
+++ b/sepolicy/kernel.te
@@ -0,0 +1 @@
+allow kernel shell_data_file:file { read write };
diff --git a/sepolicy/logd.te b/sepolicy/logd.te
new file mode 100644
index 0000000..a99d8bd
--- /dev/null
+++ b/sepolicy/logd.te
@@ -0,0 +1,2 @@
+allow logd property_socket:sock_file write;
+allow logd init:unix_stream_socket connectto;
diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te
new file mode 100644
index 0000000..72acfbb
--- /dev/null
+++ b/sepolicy/mediaserver.te
@@ -0,0 +1 @@
+allow mediaserver debug_prop:property_service set;
diff --git a/sepolicy/netd.te b/sepolicy/netd.te
new file mode 100644
index 0000000..42717f5
--- /dev/null
+++ b/sepolicy/netd.te
@@ -0,0 +1,5 @@
+allow netd usermodehelper:file r_file_perms;
+allow netd debug_prop:property_service set;
+allow netd kernel:system module_request;
+allow netd gatord:fd use;
+allow netd gatord:tcp_socket rw_socket_perms;
diff --git a/sepolicy/shell.te b/sepolicy/shell.te
new file mode 100644
index 0000000..f62b97a
--- /dev/null
+++ b/sepolicy/shell.te
@@ -0,0 +1,16 @@
+allow shell serial_device:chr_file rw_file_perms;
+
+# allow to use ndc command to enable dns work
+allow shell netd_socket:sock_file write;
+
+# hack for running netcfg eth0 dhcp/ifconfig/ping on console session
+allow shell self:packet_socket create_socket_perms;
+allow shell system_prop:property_service set;
+
+# hack for running start adbd/stop adbd on console session
+allow shell ctl_default_prop:property_service set;
+
+# hack for reading the mkshrc file after lava modified
+allow shell unlabeled:file r_file_perms;
+
+allow shell kernel:system module_request;
diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te
new file mode 100644
index 0000000..1d54ead
--- /dev/null
+++ b/sepolicy/surfaceflinger.te
@@ -0,0 +1,3 @@
+allow surfaceflinger self:process execmem;
+allow surfaceflinger debug_prop:property_service set;
+allow surfaceflinger ashmem_device:chr_file execute;
diff --git a/sepolicy/zygote.te b/sepolicy/zygote.te
new file mode 100644
index 0000000..04fc7d3
--- /dev/null
+++ b/sepolicy/zygote.te
@@ -0,0 +1 @@
+allow zygote kernel:system module_request;
diff --git a/system.prop b/system.prop
new file mode 100644
index 0000000..70c0009
--- /dev/null
+++ b/system.prop
@@ -0,0 +1,4 @@
+# This overrides settings in the products/generic/system.prop file
+#
+# rild.libpath=/system/lib/libreference-ril.so
+# rild.libargs=-d /dev/ttyS0
diff --git a/ueventd.hikey.rc b/ueventd.hikey.rc
new file mode 100644
index 0000000..9f1b2ef
--- /dev/null
+++ b/ueventd.hikey.rc
@@ -0,0 +1 @@
+/dev/hci_tty 0666 root root
diff --git a/vendorsetup.sh b/vendorsetup.sh
new file mode 100755
index 0000000..dedfea3
--- /dev/null
+++ b/vendorsetup.sh
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 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.
+#
+
+# This file is executed by build/envsetup.sh, and can use anything
+# defined in envsetup.sh.
+#
+# In particular, you can add lunch options with the add_lunch_combo
+# function: add_lunch_combo generic-eng
+
+add_lunch_combo hikey-userdebug
diff --git a/wpa_supplicant.conf b/wpa_supplicant.conf
new file mode 100644
index 0000000..a08eb33
--- /dev/null
+++ b/wpa_supplicant.conf
@@ -0,0 +1,6 @@
+##### wpa_supplicant configuration file template #####
+update_config=1
+ctrl_interface=wlan0
+eapol_version=1
+ap_scan=1
+fast_reauth=1