diff options
author | Tony SIM <sim.chinyeow@renesas.com> | 2010-02-01 13:56:40 +0900 |
---|---|---|
committer | Tony Sim <sim.chinyeow@renesas.com> | 2010-02-01 15:16:23 +0900 |
commit | 04100f0e084ae3ec5eb598f80cc646a6045ab635 (patch) | |
tree | b13a463bf30bb68b22ceba8025581fcdd19ff556 | |
parent | 403ddcfce83d9a85a08b23816f29178f8f615bd1 (diff) | |
download | ms7724-04100f0e084ae3ec5eb598f80cc646a6045ab635.tar.gz |
MS7724 first commit
-rw-r--r-- | AndroidBoard.mk | 46 | ||||
-rw-r--r-- | AndroidProducts.mk | 29 | ||||
-rw-r--r-- | BoardConfig.mk | 18 | ||||
-rw-r--r-- | README.txt | 5 | ||||
-rw-r--r-- | init.r0p7724.rc | 33 | ||||
-rwxr-xr-x | init.r0p7724.sh | 18 | ||||
-rw-r--r-- | init.rc | 224 | ||||
-rw-r--r-- | ms7724.mk | 40 | ||||
-rw-r--r-- | sh_keysc.kl | 6 | ||||
-rw-r--r-- | system.prop | 8 | ||||
-rw-r--r-- | vold.conf | 9 |
11 files changed, 436 insertions, 0 deletions
diff --git a/AndroidBoard.mk b/AndroidBoard.mk new file mode 100644 index 0000000..162d8ad --- /dev/null +++ b/AndroidBoard.mk @@ -0,0 +1,46 @@ +LOCAL_PATH := $(call my-dir) + + +#################################################################### + +# Lets install our own init.rc files :) +# We will also make the ramdisk depend on it so that it's always pulled in. + +LOCAL_PATH := vendor/renesas/ms7724 +include $(CLEAR_VARS) + +target_init_rc_file := $(TARGET_ROOT_OUT)/init.rc +$(target_init_rc_file) : $(LOCAL_PATH)/init.rc | $(ACP) + $(transform-prebuilt-to-target) +ALL_PREBUILT += $(target_init_rc_file) + +target_hw_init_rc_file := $(TARGET_ROOT_OUT)/init.r0p7724.rc +$(target_hw_init_rc_file) : $(LOCAL_PATH)/init.r0p7724.rc | $(ACP) + $(transform-prebuilt-to-target) +ALL_PREBUILT += $(target_hw_init_rc_file) + +$(INSTALLED_RAMDISK_TARGET): $(target_init_rc_file) $(target_hw_init_rc_file) + +# and our initialization script +file := $(TARGET_OUT)/etc/init.r0p7724.sh +$(file) : $(LOCAL_PATH)/init.r0p7724.sh | $(ACP) + $(transform-prebuilt-to-target) +ALL_PREBUILT += $(file) + + +#################################################################### +### Include input devices specific files + +include $(CLEAR_VARS) + +file := $(TARGET_OUT_KEYLAYOUT)/sh_keysc.kl +ALL_PREBUILT += $(file) +$(file) : $(LOCAL_PATH)/sh_keysc.kl | $(ACP) + $(transform-prebuilt-to-target) + + +#################################################################### +### Copy necessary files to target root filesystem + +PRODUCT_COPY_FILES = \ + vendor/renesas/ms7724/vold.conf:system/etc/vold.conf diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..ff838fe --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,29 @@ +# +# 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. +# + +# +# 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)/ms7724.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..74b6812 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,18 @@ +# config.mk +# +# Product-specific compile-time definitions. +# + +DISABLE_DEXPREOPT := true + +# The generic product target doesn't have any hardware-specific pieces. +TARGET_NO_BOOTLOADER := true +TARGET_NO_KERNEL := true +TARGET_NO_RADIOIMAGE := true +TARGET_CPU_ABI := sh +TARGET_PROVIDES_INIT_RC := true +USE_CAMERA_STUB = true +HAVE_HTC_AUDIO_DRIVER := false +BOARD_USES_GENERIC_AUDIO := true +BOARD_USES_ALSA_AUDIO := false +BUILD_WITH_ALSA_UTILS := false diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..3c452be --- /dev/null +++ b/README.txt @@ -0,0 +1,5 @@ +The "ms7724" product defines a target 'renesas/r0p7724' +without a kernel or bootloader. + +It can be used to build the entire user-level system. + diff --git a/init.r0p7724.rc b/init.r0p7724.rc new file mode 100644 index 0000000..a97accb --- /dev/null +++ b/init.r0p7724.rc @@ -0,0 +1,33 @@ +on boot + setprop ro.radio.use-ppp no + setprop ro.product.board ap325rxa + setprop ro.build.product generic + setprop ro.product.device generic + +# 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 + +# disable some daemons the emulator doesn't want + stop dund + stop akmd + + setprop app.setupwizard.disable 1 + +# For the emulator, which bypasses Setup Wizard, you can specify +# account info for the device via these two properties. Google +# Login Service will insert these accounts into the database when +# it is created (ie, after a data wipe). +# +# setprop ro.config.hosted_account username@hosteddomain.org:password +# setprop ro.config.google_account username@gmail.com:password +# +# You MUST have a Google account on the device, and you MAY +# additionally have a hosted account. No other configuration is +# supported, and arbitrary breakage may result if you specify +# something else. + +service ms7724-setup /system/etc/init.r0p7724.sh + oneshot diff --git a/init.r0p7724.sh b/init.r0p7724.sh new file mode 100755 index 0000000..1b0437e --- /dev/null +++ b/init.r0p7724.sh @@ -0,0 +1,18 @@ +#!/system/bin/sh + +# start network setting +ifconfig eth0 +case $? in + 255) netcfg eth0 dhcp ;; +esac + +# remove previous browser session +rm -r /data/data/com.android.browser/cache +rm -r /data/data/com.android.browser/databases + +# disable boot animation for a faster boot sequence when needed +boot_anim=`getprop ro.kernel.android.bootanim` +case "$boot_anim" in + 0) setprop debug.sf.nobootanimation 1 + ;; +esac @@ -0,0 +1,224 @@ + +on init + +sysclktz 0 + +loglevel 3 + +# setup the global environment + export PATH /sbin:/system/sbin:/system/bin:/system/xbin + export LD_LIBRARY_PATH /system/lib + export ANDROID_BOOTLOGO 1 + export ANDROID_ROOT /system + export ANDROID_ASSETS /system/app + export ANDROID_DATA /data + export EXTERNAL_STORAGE /sdcard + export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar + +# Backward compatibility + symlink /system/etc /etc + +# create mountpoints and mount tmpfs on sqlite_stmt_journals + mkdir /sdcard 0000 system system + mkdir /system + mkdir /data 0771 system system + mkdir /cache 0770 system cache + mkdir /sqlite_stmt_journals 01777 root root + mount tmpfs tmpfs /sqlite_stmt_journals size=4m + + write /proc/sys/kernel/panic_on_oops 1 + write /proc/sys/kernel/hung_task_timeout_secs 0 + write /proc/cpu/alignment 4 + write /proc/sys/kernel/sched_latency_ns 10000000 + write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000 + write /proc/sys/kernel/sched_compat_yield 1 + +# Create cgroup mount points for process groups + mkdir /dev/cpuctl + mount cgroup none /dev/cpuctl cpu + chown sytem system /dev/cpuctl + chown system system /dev/cpuctl/tasks + chmod 0777 /dev/cpuctl/tasks + write /dev/cpuctl/cpu.shares 1024 + + mkdir /dev/cpuctl/fg_boost + chown system system /dev/cpuctl/fg_boost/tasks + chmod 0777 /dev/cpuctl/fg_boost/tasks + write /dev/cpuctl/fg_boost/cpu.shares 1024 + + mkdir /dev/cpuctl/bg_non_interactive + chown system system /dev/cpuctl/bg_non_interactive/tasks + chmod 0777 /dev/cpuctl/bg_non_interactive/tasks + # 5.0 % + write /dev/cpuctl/bg_non_interactive/cpu.shares 52 + + # We chown/chmod /data again so because mount is run as root + defaults + chown system system /data + chmod 0771 /data + + # Same reason as /data above + chown system cache /cache + chmod 0770 /cache + + # This may have been created by the recovery system with odd permissions + chown system system /cache/recovery + chmod 0770 /cache/recovery + +# create basic filesystem structure + mkdir /data/misc 01771 system misc + mkdir /data/misc/keystore 0770 keystore keystore + mkdir /data/local 0771 shell shell + mkdir /data/local/tmp 0771 shell shell + mkdir /data/data 0771 system system + mkdir /data/app-private 0771 system system + mkdir /data/app 0771 system system + mkdir /data/property 0700 root root + + # create dalvik-cache and double-check the perms + mkdir /data/dalvik-cache 0771 system system + chown system system /data/dalvik-cache + chmod 0771 /data/dalvik-cache + + # create the lost+found directories, so as to enforce our permissions + mkdir /data/lost+found 0770 + mkdir /cache/lost+found 0770 + + # double check the perms, in case lost+found already exists, and set owner + chown root root /data/lost+found + chmod 0770 /data/lost+found + chown root root /cache/lost+found + chmod 0770 /cache/lost+found + +on boot +# basic network init + ifup lo + hostname localhost + domainname localdomain + +# set RLIMIT_NICE to allow priorities from 19 to -20 + setrlimit 13 40 40 + +# Define the oom_adj values for the classes of processes that can be +# killed by the kernel. These are used in ActivityManagerService. + setprop ro.FOREGROUND_APP_ADJ 0 + setprop ro.VISIBLE_APP_ADJ 1 + setprop ro.SECONDARY_SERVER_ADJ 2 + setprop ro.BACKUP_APP_ADJ 2 + setprop ro.HOME_APP_ADJ 4 + setprop ro.HIDDEN_APP_MIN_ADJ 7 + setprop ro.CONTENT_PROVIDER_ADJ 14 + setprop ro.EMPTY_APP_ADJ 15 + +# Define the memory thresholds at which the above process classes will +# be killed. These numbers are in pages (4k). + setprop ro.FOREGROUND_APP_MEM 1536 + setprop ro.VISIBLE_APP_MEM 2048 + setprop ro.SECONDARY_SERVER_MEM 4096 + setprop ro.BACKUP_APP_MEM 4096 + setprop ro.HOME_APP_MEM 4096 + setprop ro.HIDDEN_APP_MEM 5120 + setprop ro.CONTENT_PROVIDER_MEM 5632 + setprop ro.EMPTY_APP_MEM 6144 + +# Write value must be consistent with the above properties. +# Note that the driver only supports 6 slots, so we have HOME_APP at the +# same memory level as services. + write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15 + + write /proc/sys/vm/overcommit_memory 1 + write /proc/sys/vm/min_free_order_shift 4 + write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144 + + # Set init its forked children's oom_adj. + write /proc/1/oom_adj -16 + + # Permissions for System Server and daemons. + chown radio system /sys/android_power/state + chown radio system /sys/android_power/request_state + chown radio system /sys/android_power/acquire_full_wake_lock + chown radio system /sys/android_power/acquire_partial_wake_lock + chown radio system /sys/android_power/release_wake_lock + chown radio system /sys/power/state + chown radio system /sys/power/wake_lock + chown radio system /sys/power/wake_unlock + chmod 0660 /sys/power/state + chmod 0660 /sys/power/wake_lock + chmod 0660 /sys/power/wake_unlock + chown system system /sys/class/timed_output/vibrator/enable + chown system system /sys/class/leds/keyboard-backlight/brightness + chown system system /sys/class/leds/lcd-backlight/brightness + chown system system /sys/class/leds/button-backlight/brightness + chown system system /sys/class/leds/jogball-backlight/brightness + chown system system /sys/class/leds/red/brightness + chown system system /sys/class/leds/green/brightness + chown system system /sys/class/leds/blue/brightness + chown system system /sys/class/leds/red/device/grpfreq + chown system system /sys/class/leds/red/device/grppwm + chown system system /sys/class/leds/red/device/blink + chown system system /sys/class/leds/red/brightness + chown system system /sys/class/leds/green/brightness + chown system system /sys/class/leds/blue/brightness + chown system system /sys/class/leds/red/device/grpfreq + chown system system /sys/class/leds/red/device/grppwm + chown system system /sys/class/leds/red/device/blink + chown system system /sys/class/timed_output/vibrator/enable + chown system system /sys/module/sco/parameters/disable_esco + chown system system /sys/kernel/ipv4/tcp_wmem_min + chown system system /sys/kernel/ipv4/tcp_wmem_def + chown system system /sys/kernel/ipv4/tcp_wmem_max + chown system system /sys/kernel/ipv4/tcp_rmem_min + chown system system /sys/kernel/ipv4/tcp_rmem_def + chown system system /sys/kernel/ipv4/tcp_rmem_max + chown root radio /proc/cmdline + +# Define TCP buffer sizes for various networks +# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, + setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208 + setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208 + setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208 + setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040 + setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680 + + class_start default + +## Daemon processes to be run by init. +## +service console /system/bin/sh + console + +service servicemanager /system/bin/servicemanager + user system + critical + onrestart restart zygote + onrestart restart media + +service vold /system/bin/vold + socket vold stream 0660 root mount + +service nexus /system/bin/nexus + socket nexus stream 0660 root system + disabled + +service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server + socket zygote stream 666 + onrestart write /sys/android_power/request_state wake + onrestart write /sys/power/state on + +service media /system/bin/mediaserver + user media + group system audio camera graphics inet net_bt net_bt_admin + +service bootanim /system/bin/bootanimation + user graphics + group graphics + disabled + oneshot + +service installd /system/bin/installd + socket installd stream 600 system system + +service keystore /system/bin/keystore + user keystore + group keystore + socket keystore stream 666 + diff --git a/ms7724.mk b/ms7724.mk new file mode 100644 index 0000000..f22e1d7 --- /dev/null +++ b/ms7724.mk @@ -0,0 +1,40 @@ +PRODUCT_PROPERTY_OVERRIDES := + +PRODUCT_PACKAGES := \ + ApiDemos \ + Launcher \ + SdkSetup + +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk) + +# Overrides +PRODUCT_BRAND := renesas +PRODUCT_NAME := ms7724 +PRODUCT_DEVICE := ms7724 +PRODUCT_LOCALES := \ + en_US \ + en_GB \ + en_CA \ + en_AU \ + en_NZ \ + en_SG \ + ja_JP \ + fr_FR \ + fr_BE \ + fr_CA \ + fr_CH \ + it_IT \ + it_CH \ + es_ES \ + de_DE \ + de_AT \ + de_CH \ + de_LI \ + nl_NL \ + nl_BE \ + cs_CZ \ + pl_PL \ + zh_CN \ + zh_TW \ + ru_RU \ + ko_KR diff --git a/sh_keysc.kl b/sh_keysc.kl new file mode 100644 index 0000000..ffe2300 --- /dev/null +++ b/sh_keysc.kl @@ -0,0 +1,6 @@ +key 2 HOME WAKE +key 3 MENU WAKE_DROPPED +key 4 BACK WAKE_DROPPED +key 5 DPAD_CENTER WAKE_DROPPED +key 6 DPAD_UP WAKE_DROPPED +key 7 DPAD_DOWN WAKE_DROPPED diff --git a/system.prop b/system.prop new file mode 100644 index 0000000..2152209 --- /dev/null +++ b/system.prop @@ -0,0 +1,8 @@ +# +# system.prop for ms7724 +# + +keyguard.no_require_sim=1 + +rild.libpath=/system/lib/libreference-ril.so +rild.libargs=-d /dev/ttyS0 diff --git a/vold.conf b/vold.conf new file mode 100644 index 0000000..c19a7f4 --- /dev/null +++ b/vold.conf @@ -0,0 +1,9 @@ +## vold configuration file for ms7724 + +volume_sdcard { + ## This is the direct uevent device path to the SD slot on the device + media_path /devices/platform/sh_mobile_sdhi.0/tmio-mmc.0/mmc_host/mmc0 + + media_type mmc + mount_point /sdcard +} |