From fa87e4df72fa6be93b412003ac4798292b32dc91 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 15 Jun 2012 18:05:48 +0200 Subject: Initial import of the Mackerel device description for Android This is an unmodified copy of the 20120530-1 sources from Guennadi Liakhovetski's Android camera blueprint. Signed-off-by: Laurent Pinchart --- Android.mk | 32 ++++++++++ AndroidBoard.mk | 13 ++++ AndroidProducts.mk | 2 + BoardConfig.mk | 49 +++++++++++++++ CleanSpec.mk | 50 +++++++++++++++ device.mk | 19 ++++++ device_base.mk | 22 +++++++ full_mackerel.mk | 42 +++++++++++++ init.mackerel.rc | 24 +++++++ mackerel-tca6416-keypad.kcm | 1 + mackerel-tca6416-keypad.kl | 4 ++ media_profiles-nosnd.xml | 111 +++++++++++++++++++++++++++++++++ media_profiles.xml | 149 ++++++++++++++++++++++++++++++++++++++++++++ vendorsetup.sh | 23 +++++++ vold.fstab | 1 + 15 files changed, 542 insertions(+) create mode 100644 Android.mk create mode 100644 AndroidBoard.mk create mode 100644 AndroidProducts.mk create mode 100644 BoardConfig.mk create mode 100644 CleanSpec.mk create mode 100644 device.mk create mode 100644 device_base.mk create mode 100644 full_mackerel.mk create mode 100644 init.mackerel.rc create mode 100644 mackerel-tca6416-keypad.kcm create mode 100644 mackerel-tca6416-keypad.kl create mode 100644 media_profiles-nosnd.xml create mode 100644 media_profiles.xml create mode 100755 vendorsetup.sh create mode 100644 vold.fstab diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..2b31505 --- /dev/null +++ b/Android.mk @@ -0,0 +1,32 @@ +# 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. + +LOCAL_PATH := $(my-dir) + +CAMERA_DEFAULT := $(TARGET_OUT_SHARED_LIBRARIES)/hw/camera.mackerel$(TARGET_SHLIB_SUFFIX) + +include $(CLEAR_VARS) + +LOCAL_MODULE := camera.mackerel +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := FAKE +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw + +include $(BUILD_SYSTEM)/base_rules.mk + +$(LOCAL_BUILT_MODULE): CAMERA_LIB := camera.v4l$(TARGET_SHLIB_SUFFIX) +$(LOCAL_BUILT_MODULE): + $(hide) echo "Linking $(CAMERA_LIB) <- $(CAMERA_DEFAULT)" + $(hide) mkdir -p $(TARGET_OUT_SHARED_LIBRARIES)/hw + $(hide) ln -sf $(CAMERA_LIB) $(CAMERA_DEFAULT) diff --git a/AndroidBoard.mk b/AndroidBoard.mk new file mode 100644 index 0000000..ed9d9fa --- /dev/null +++ b/AndroidBoard.mk @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +ifeq ($(TARGET_PREBUILT_KERNEL),) +TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel +endif + +file := $(INSTALLED_KERNEL_TARGET) +ALL_PREBUILT += $(file) +$(file): $(TARGET_PREBUILT_KERNEL) | $(ACP) + $(transform-prebuilt-to-target) + +include $(CLEAR_VARS) diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..2aefab3 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,2 @@ +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/full_mackerel.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..4409ed9 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,49 @@ +# 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 sets variables that control the way modules are built +# thorughout the system. It should not be used to conditionally +# disable makefiles (the proper mechanism to control what gets +# included in a build is to use PRODUCT_PACKAGES in a product +# definition file). +# + +# WARNING: This line must come *before* including the proprietary +# variant, so that it gets overwritten by the parent (which goes +# against the traditional rules of inheritance). +# The proprietary variant sets USE_CAMERA_STUB := false, this way +# we use the camera stub when the vendor tree isn't present, and +# the true camera library when the vendor tree is available. Similarly, +# we set USE_PROPRIETARY_AUDIO_EXTENSIONS to true in the proprietary variant as +# well. +USE_CAMERA_STUB := true +USE_PROPRIETARY_AUDIO_EXTENSIONS := false + +# Use a smaller subset of system fonts to keep image size lower +SMALLER_FONT_FOOTPRINT := true + +TARGET_BOARD_PLATFORM := sh7372 + +TARGET_CPU_ABI := armeabi-v7a +TARGET_CPU_ABI2 := armeabi +TARGET_CPU_SMP := false +TARGET_ARCH_VARIANT := armv7-a +ARCH_ARM_HAVE_TLS_REGISTER := true + +TARGET_NO_KERNEL := true + +BOARD_FLASH_BLOCK_SIZE := 4096 + +BOARD_USES_GENERIC_AUDIO := false diff --git a/CleanSpec.mk b/CleanSpec.mk new file mode 100644 index 0000000..df5b41e --- /dev/null +++ b/CleanSpec.mk @@ -0,0 +1,50 @@ +# Copyright (C) 2007 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. +# + +# If you don't need to do a full clean build but would like to touch +# a file or delete some intermediate files, add a clean step to the end +# of the list. These steps will only be run once, if they haven't been +# run before. +# +# E.g.: +# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) +# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) +# +# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with +# files that are missing or have been moved. +# +# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. +# Use $(OUT_DIR) to refer to the "out" directory. +# +# If you need to re-do something that's already mentioned, just copy +# the command and add it to the bottom of the list. E.g., if a change +# that you made last week required touching a file and a change you +# made today requires touching the same file, just copy the old +# touch step and add it to the end of the list. +# +# ************************************************ +# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST +# ************************************************ + +# For example: +#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) +#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) +#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) +#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) + +# ************************************************ +# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST +# ************************************************ +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop) diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..3453dc5 --- /dev/null +++ b/device.mk @@ -0,0 +1,19 @@ +# +# 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. +# + +$(call inherit-product, device/renesas/mackerel/device_base.mk) + +# Add commands which are mackerel specific after here diff --git a/device_base.mk b/device_base.mk new file mode 100644 index 0000000..496ef12 --- /dev/null +++ b/device_base.mk @@ -0,0 +1,22 @@ +# +# 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. +# + +PRODUCT_COPY_FILES += \ + device/renesas/mackerel/init.mackerel.rc:root/init.mackerel.rc \ + device/renesas/mackerel/media_profiles.xml:system/etc/media_profiles.xml \ + device/renesas/mackerel/mackerel-tca6416-keypad.kl:system/usr/keylayout/mackerel-tca6416-keypad.kl \ + device/renesas/mackerel/mackerel-tca6416-keypad.kcm:system/usr/keychars/mackerel-tca6416-keypad.kcm \ + device/renesas/mackerel/vold.fstab:system/etc/vold.fstab diff --git a/full_mackerel.mk b/full_mackerel.mk new file mode 100644 index 0000000..94b8448 --- /dev/null +++ b/full_mackerel.mk @@ -0,0 +1,42 @@ +# 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 is the build configuration for a full Android +# build for stingray hardware. This cleanly combines a set of +# device-specific aspects (drivers) with a device-agnostic +# product configuration (apps). +# + +# A few more packages that aren't quite used on all builds +PRODUCT_PACKAGES := \ + HoloSpiralWallpaper \ + LiveWallpapersPicker \ + VisualizationWallpapers + +# Camera +PRODUCT_PACKAGES += \ + Camera \ + camera.v4l + +# Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) +# This is where we'd set a backup provider if we had one +$(call inherit-product, device/renesas/mackerel/device.mk) + +# Discard inherited values and use our own instead. +PRODUCT_NAME := full_mackerel +PRODUCT_DEVICE := mackerel +PRODUCT_BRAND := Android +PRODUCT_MODEL := Full Android on Mackerel diff --git a/init.mackerel.rc b/init.mackerel.rc new file mode 100644 index 0000000..c3ec6ed --- /dev/null +++ b/init.mackerel.rc @@ -0,0 +1,24 @@ +on early-init + export EXTERNAL_STORAGE /mnt/sdcard + mkdir /mnt/sdcard 0000 system system + # for backwards compatibility + symlink /mnt/sdcard /sdcard + +on boot + setprop ARGH ARGH + setprop net.eth0.gw 192.168.1.9 + setprop net.eth0.dns1 192.168.1.9 +# setprop net.gprs.local-ip 192.168.1.90 +# setprop ro.radio.use-ppp no +# setprop ro.build.product generic +# setprop ro.product.device generic + + chmod 0666 /dev/video0 + chmod 0664 /dev/graphics/fb0 + +# fake some battery state + setprop hw.nobattery true +# setprop status.battery.state Slow +# setprop status.battery.level 5 +# setprop status.battery.level_raw 50 +# setprop status.battery.level_scale 9 diff --git a/mackerel-tca6416-keypad.kcm b/mackerel-tca6416-keypad.kcm new file mode 100644 index 0000000..a510228 --- /dev/null +++ b/mackerel-tca6416-keypad.kcm @@ -0,0 +1 @@ +type SPECIAL_FUNCTION diff --git a/mackerel-tca6416-keypad.kl b/mackerel-tca6416-keypad.kl new file mode 100644 index 0000000..1d2bb4c --- /dev/null +++ b/mackerel-tca6416-keypad.kl @@ -0,0 +1,4 @@ +key 102 HOME WAKE_DROPPED +key 116 POWER WAKE_DROPPED +key 139 MENU WAKE_DROPPED +key 158 BACK WAKE_DROPPED diff --git a/media_profiles-nosnd.xml b/media_profiles-nosnd.xml new file mode 100644 index 0000000..d50765e --- /dev/null +++ b/media_profiles-nosnd.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/media_profiles.xml b/media_profiles.xml new file mode 100644 index 0000000..dfb6f43 --- /dev/null +++ b/media_profiles.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendorsetup.sh b/vendorsetup.sh new file mode 100755 index 0000000..ab4ec7f --- /dev/null +++ b/vendorsetup.sh @@ -0,0 +1,23 @@ +# +# Copyright (C) 2008 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 full_mackerel-userdebug diff --git a/vold.fstab b/vold.fstab new file mode 100644 index 0000000..b79a820 --- /dev/null +++ b/vold.fstab @@ -0,0 +1 @@ +dev_mount sdcard /mnt/sdcard auto /devices/platform/sh_mobile_sdhi.0 /devices/platform/sh_mobile_sdhi.2 /devices/platform/sh_mmcif.0 -- cgit v1.2.3