summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2015-10-25 10:07:00 +0800
committerleozwang <leozwang@google.com>2015-10-28 15:59:52 -0700
commit9aa0ec0a20442de9817a62f6c9aa061ffee06601 (patch)
tree598b7324fd9b02acc4a34eb5df6cd61cd1edbade
parent3a2793330d4a0656959b5e0efbbca4e1fec00eff (diff)
downloadrockchip-9aa0ec0a20442de9817a62f6c9aa061ffee06601.tar.gz
kylin: Init version, base on dragonboard
Change-Id: Ia0d649690980ca9480c3bc899ed1e97f8a1af8e3
-rw-r--r--soc/rk3036/init.rk3036.rc22
-rw-r--r--soc/rk3036/sepolicy/file_contexts2
-rw-r--r--soc/rk3036/soc.kconf15
-rw-r--r--soc/rk3036/soc.mk55
4 files changed, 94 insertions, 0 deletions
diff --git a/soc/rk3036/init.rk3036.rc b/soc/rk3036/init.rk3036.rc
new file mode 100644
index 0000000..acd83ab
--- /dev/null
+++ b/soc/rk3036/init.rk3036.rc
@@ -0,0 +1,22 @@
+#
+# Copyright 2015 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.
+#
+
+on fs
+ mount_all /fstab.${ro.hardware}
+ 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/class/android_usb/android0/f_ffs/aliases adb
diff --git a/soc/rk3036/sepolicy/file_contexts b/soc/rk3036/sepolicy/file_contexts
new file mode 100644
index 0000000..0f72891
--- /dev/null
+++ b/soc/rk3036/sepolicy/file_contexts
@@ -0,0 +1,2 @@
+# Serial console
+/dev/ttyS2 u:object_r:console_device:s0
diff --git a/soc/rk3036/soc.kconf b/soc/rk3036/soc.kconf
new file mode 100644
index 0000000..2e80bb9
--- /dev/null
+++ b/soc/rk3036/soc.kconf
@@ -0,0 +1,15 @@
+#
+# Copyright 2015 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.
+#
diff --git a/soc/rk3036/soc.mk b/soc/rk3036/soc.mk
new file mode 100644
index 0000000..6e78d4f
--- /dev/null
+++ b/soc/rk3036/soc.mk
@@ -0,0 +1,55 @@
+#
+# Copyright 2015 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.
+#
+
+# TODO(leecam): Make this automatic.
+LOCAL_PATH := hardware/bsp/rockchip/soc/rk3036
+
+# Arm32 device.
+TARGET_ARCH := arm
+TARGET_ARCH_VARIANT := armv7-a
+TARGET_CPU_VARIANT := generic
+TARGET_CPU_ABI := armeabi-v7a
+TARGET_CPU_ABI2 := armeabi
+TARGET_KERNEL_ARCH := $(TARGET_ARCH)
+
+TARGET_NO_BOOTLOADER := false
+TARGET_NO_KERNEL := false
+
+BOARD_KERNEL_CMDLINE := console=ttyS2,115200n8 androidboot.console=ttyS2 androidboot.hardware=rk3036 earlyprintk selinux=enforcing
+
+TARGET_USERIMAGES_USE_EXT4 := true
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_FLASH_BLOCK_SIZE := 131072
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/init.rk3036.rc:root/init.rk3036.rc \
+ system/core/rootdir/init.usb.rc:root/init.usb.rc \
+ system/core/rootdir/ueventd.rc:root/ueventd.rc \
+
+# TODO: Move common/prebuilts/sepolicy include to audio_prebuilts.mk
+BOARD_SEPOLICY_DIRS += \
+ $(LOCAL_PATH)/sepolicy \
+
+# Set up the local kernel.
+TARGET_KERNEL_SRC := hardware/bsp/kernel/rockchip/rk-4.1
+TARGET_KERNEL_DEFCONFIG := rk3036_kylin_defconfig
+TARGET_KERNEL_CONFIGS := $(realpath $(LOCAL_PATH)/soc.kconf)
+TARGET_KERNEL_DTB := rk3036-evb.dtb
+
+# Default Keystore HAL
+DEVICE_PACKAGES += \
+ keystore.default \
+ bootctrl.default