diff options
author | Pankaj Bharadiya <pankaj.bharadiya@ti.com> | 2012-10-18 16:50:25 +0530 |
---|---|---|
committer | Pankaj Bharadiya <pankaj.bharadiya@ti.com> | 2012-11-05 15:45:53 +0530 |
commit | 522f8c9daf006055eb4d4e41dec7cf72e135477b (patch) | |
tree | b1ab810fdd88cd6a1e172b0ec9a6c0c0667a104c | |
download | beaglebone-522f8c9daf006055eb4d4e41dec7cf72e135477b.tar.gz |
initial commit for beaglebone
Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@ti.com>
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | AndroidProducts.mk | 2 | ||||
-rw-r--r-- | BoardConfig.mk | 47 | ||||
-rw-r--r-- | README.txt | 11 | ||||
-rw-r--r-- | beaglebone.mk | 8 | ||||
-rw-r--r-- | device.mk | 59 | ||||
-rw-r--r-- | egl.cfg | 1 | ||||
-rw-r--r-- | gpio-keys.kcm | 64 | ||||
-rw-r--r-- | gpio-keys.kl | 6 | ||||
-rw-r--r-- | init.am335xevm.rc | 64 | ||||
-rw-r--r-- | init.am335xevm.usb.rc | 18 | ||||
-rw-r--r-- | initlogo.rle | bin | 0 -> 27288 bytes | |||
-rw-r--r-- | liblights/Android.mk | 34 | ||||
-rw-r--r-- | liblights/lights.c | 153 | ||||
-rw-r--r-- | media_codecs.xml | 99 | ||||
-rw-r--r-- | media_profiles.xml | 203 | ||||
-rw-r--r-- | overlay/frameworks/base/core/res/res/values/config.xml | 55 | ||||
-rw-r--r-- | overlay/frameworks/base/core/res/res/xml/storage_list.xml | 44 | ||||
-rw-r--r-- | softwaregfx/egl.cfg | 1 | ||||
-rw-r--r-- | uEnv.txt | 4 | ||||
-rw-r--r-- | vendorsetup.sh | 1 | ||||
-rw-r--r-- | vold.fstab | 2 |
22 files changed, 878 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..6361f9b --- /dev/null +++ b/Android.mk @@ -0,0 +1,2 @@ +LOCAL_PATH := $(call my-dir) +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..e5081db --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,2 @@ +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/beaglebone.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..a6251a2 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,47 @@ +# config.mk +# +# Product-specific compile-time definitions. +# + +TARGET_BOARD_PLATFORM := sitara +TARGET_NO_BOOTLOADER := true # Uses u-boot instead +TARGET_NO_KERNEL := false +USE_PREBUILT_UBOOT = false +BOARD_EGL_CFG := device/linaro/beaglebone/egl.cfg +KERNEL_CONFIG := am335x_evm_android_defconfig +TARGET_USE_UBOOT := true +UBOOT_TOOLS_PREFIX := arm-eabi- +UBOOT_CONFIG := am335x_evm_config +TARGET_USE_XLOADER := false +TARGET_NO_RECOVERY := true +TARGET_NO_RADIOIMAGE := true +BOARD_USES_GENERIC_AUDIO := false +#BOARD_USES_ALSA_AUDIO := false +BUILD_WITH_ALSA_UTILS := false +BOARD_USES_TINY_AUDIO_HW := true +HARDWARE_OMX := false +USE_CAMERA_STUB := true + +TARGET_CPU_ABI := armeabi-v7a +TARGET_CPU_ABI2 := armeabi +TARGET_CPU_SMP := false + +# Enable NEON feature +TARGET_ARCH_VARIANT := armv7-a-neon +ARCH_ARM_HAVE_TLS_REGISTER := true + +EXTRA_PACKAGE_MANAGEMENT := false + +TARGET_USERIMAGES_USE_EXT4 := true +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true + +USE_OPENGL_RENDERER := true + +# PandaBoard uses an OMAP4 -- Cortex A9 +#TARGET_EXTRA_CFLAGS += $(call cc-ifversion, -ge, 46, $(call cc-option,-mtune=cortex-a9,$(call cc-option,-mtune=cortex-a8)) $(call cc-option,-mcpu=cortex-a9,$(call cc-option,-mcpu=cortex-a8))) + +# ARMs gator (DS-5) +TARGET_USE_GATOR:= true + +# Build uImage and uInitrd instead of kernel and ramdisk.img +TARGET_BOOTLOADER_TYPE := uboot diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..0fd2438 --- /dev/null +++ b/README.txt @@ -0,0 +1,11 @@ +Summary: Linaro Evaluation Build for Android + +Author: Linaro Limited + +Description: + In order to ensure that Software Components developed and improved work + well and really matter in a production like environment, Linaro Platform + Releases introduced a concept called "Evaluation Builds". + + Evaluation Builds are images that can be installed on high volume member + boards supported by Linaro Platform and Landing Teams. diff --git a/beaglebone.mk b/beaglebone.mk new file mode 100644 index 0000000..4b49de3 --- /dev/null +++ b/beaglebone.mk @@ -0,0 +1,8 @@ +# The geaglebone product that is specialized for beaglebone +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) +$(call inherit-product, device/linaro/common/common.mk) +$(call inherit-product, device/linaro/beaglebone/device.mk) + +PRODUCT_BRAND := beaglebone +PRODUCT_DEVICE := beaglebone +PRODUCT_NAME := beaglebone diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..de15cdc --- /dev/null +++ b/device.mk @@ -0,0 +1,59 @@ +# Copyright (C) 2011 Linaro Limited +# +# 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/linaro/common/init.partitions.rc:root/init.partitions.rc \ + device/linaro/beaglebone/media_profiles.xml:system/etc/media_profiles.xml \ + frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ + frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ + device/linaro/beaglebone/vold.fstab:system/etc/vold.fstab \ + device/linaro/beaglebone/init.am335xevm.rc:root/init.am335xevm.rc \ + device/linaro/beaglebone/init.am335xevm.usb.rc:root/init.am335xevm.usb.rc \ + device/linaro/beaglebone/ti-tsc-adcc.idc:system/usr/idc/ti-tsc-adcc.idc + +# KeyPads +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl + +PRODUCT_PACKAGES := \ + make_ext4fs \ + com.android.future.usb.accessory \ + uim + +PRODUCT_PROPERTY_OVERRIDES := \ + hwui.render_dirty_regions=false + +PRODUCT_CHARACTERISTICS := tablet,nosdcard + +DEVICE_PACKAGE_OVERLAYS := \ + device/linaro/beaglebone/overlay + +PRODUCT_TAGS += dalvik.gc.type-precise + +$(call inherit-product, frameworks/native/build/tablet-dalvik-heap.mk) +$(call inherit-product-if-exists, device/ti/proprietary-open/install-binaries.mk) + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.opengles.version=131072 + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.nohardwaregfx=true + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.sf.lcd_density=160 + +# Backlight HAL (liblights) +PRODUCT_PACKAGES += \ + lights.beaglebone + @@ -0,0 +1 @@ +0 0 android diff --git a/gpio-keys.kcm b/gpio-keys.kcm new file mode 100644 index 0000000..8056364 --- /dev/null +++ b/gpio-keys.kcm @@ -0,0 +1,64 @@ +[type=QWERTY] + +# keycode display number base caps fn caps_fn + +A 'A' '2' 'a' 'A' '#' 0x00 +B 'B' '2' 'b' 'B' '<' 0x00 +C 'C' '2' 'c' 'C' '9' 0x00E7 +D 'D' '3' 'd' 'D' '5' 0x00 +E 'E' '3' 'e' 'E' '2' 0x0301 +F 'F' '3' 'f' 'F' '6' 0x00A5 +G 'G' '4' 'g' 'G' '-' '_' +H 'H' '4' 'h' 'H' '[' '{' +I 'I' '4' 'i' 'I' '$' 0x0302 +J 'J' '5' 'j' 'J' ']' '}' +K 'K' '5' 'k' 'K' '"' '~' +L 'L' '5' 'l' 'L' ''' '`' +M 'M' '6' 'm' 'M' '!' 0x00 +N 'N' '6' 'n' 'N' '>' 0x0303 +O 'O' '6' 'o' 'O' '(' 0x00 +P 'P' '7' 'p' 'P' ')' 0x00 +Q 'Q' '7' 'q' 'Q' '*' 0x0300 +R 'R' '7' 'r' 'R' '3' 0x20AC +S 'S' '7' 's' 'S' '4' 0x00DF +T 'T' '8' 't' 'T' '+' 0x00A3 +U 'U' '8' 'u' 'U' '&' 0x0308 +V 'V' '8' 'v' 'V' '=' '^' +W 'W' '9' 'w' 'W' '1' 0x00 +X 'X' '9' 'x' 'X' '8' 0xEF00 +Y 'Y' '9' 'y' 'Y' '%' 0x00A1 +Z 'Z' '9' 'z' 'Z' '7' 0x00 + +# on pc keyboards +COMMA ',' ',' ',' ';' ';' '|' +PERIOD '.' '.' '.' ':' ':' 0x2026 +AT '@' '0' '@' '0' '0' 0x2022 +SLASH '/' '/' '/' '?' '?' '\' + +SPACE 0x20 0x20 0x20 0x20 0xEF01 0xEF01 +ENTER 0xa 0xa 0xa 0xa 0xa 0xa + +TAB 0x9 0x9 0x9 0x9 0x9 0x9 +0 '0' '0' '0' ')' ')' ')' +1 '1' '1' '1' '!' '!' '!' +2 '2' '2' '2' '@' '@' '@' +3 '3' '3' '3' '#' '#' '#' +4 '4' '4' '4' '$' '$' '$' +5 '5' '5' '5' '%' '%' '%' +6 '6' '6' '6' '^' '^' '^' +7 '7' '7' '7' '&' '&' '&' +8 '8' '8' '8' '*' '*' '*' +9 '9' '9' '9' '(' '(' '(' + +GRAVE '`' '`' '`' '~' '`' '~' +MINUS '-' '-' '-' '_' '-' '_' +EQUALS '=' '=' '=' '+' '=' '+' +LEFT_BRACKET '[' '[' '[' '{' '[' '{' +RIGHT_BRACKET ']' ']' ']' '}' ']' '}' +BACKSLASH '\' '\' '\' '|' '\' '|' +SEMICOLON ';' ';' ';' ':' ';' ':' +APOSTROPHE ''' ''' ''' '"' ''' '"' +STAR '*' '*' '*' '*' '*' '*' +POUND '#' '#' '#' '#' '#' '#' +PLUS '+' '+' '+' '+' '+' '+' + diff --git a/gpio-keys.kl b/gpio-keys.kl new file mode 100644 index 0000000..1ce0a62 --- /dev/null +++ b/gpio-keys.kl @@ -0,0 +1,6 @@ +# Beaglebone LCD Cape GPIO KEYPAD keylayout +key 105 BACK WAKE +key 106 HOME WAKE +key 103 MENU WAKE +key 108 SEARCH WAKE +key 28 POWER WAKE diff --git a/init.am335xevm.rc b/init.am335xevm.rc new file mode 100644 index 0000000..cde3678 --- /dev/null +++ b/init.am335xevm.rc @@ -0,0 +1,64 @@ +import init.am335xevm.usb.rc + +on early-init + mount debugfs debugfs /sys/kernel/debug + + # for backwards compatibility + export EXTERNAL_STORAGE /storage/sdcard0 + mkdir /storage 0050 system sdcard_r + mkdir /storage/sdcard0 0000 system system + symlink /storage/sdcard0 /sdcard + symlink /storage/sdcard0 /mnt/sdcard + + # create directory for mounting usb drives + mkdir /storage/usb1 0666 system system + symlink /storage/usb1 /usbdrive + symlink /storage/usb1 /mnt/usb1 + +on post-fs-data + mkdir /data/misc/dhcp 0770 dhcp dhcp + chown dhcp dhcp /data/misc/dhcp + + # we will remap this as /storage/sdcard0 with the sdcard fuse tool + mkdir /data/media 0770 media_rw media_rw + chown media_rw media_rw /data/media + + # Set indication (checked by vold) that we have finished this action + setprop vold.post_fs_data_done 1 + + # Do not suspend + write /sys/power/wake_lock nosuspend + +on boot + +# Default Read Ahead value for sdcards + write /sys/block/mmcblk0/queue/read_ahead_kb 2048 + +# PWM-Backlight for display brightness on LCD7 Cape + chmod 0666 /sys/class/backlight/pwm-backlight/brightness +# PWM-Backlight for display brightness on LCD3 Cape + chmod 0666 /sys/class/backlight/tps65217-bl/brightness + +on fs + # This board does not have battery, force battery-level to 100% + setprop hw.nobattery true + +service pvr /system/bin/sgx/rc.pvr start + class core + oneshot + +service dhcpcd_eth0 /system/bin/dhcpcd -ABKL -f/system/etc/dhcpcd/dhcpcd.conf + class main + disabled + oneshot + +service iprenew_eth0 /system/bin/dhcpcd -n + class main + disabled + oneshot + +# create virtual SD card at /storage/sdcard0, based on the /data/media directory +# deamon will drop to user/group system/media_rw after initializing +# underlying files in /data/media wil be created with user and group media_rw (1023) +service sdcard /system/bin/sdcard /data/media 1023 1023 + class late_start diff --git a/init.am335xevm.usb.rc b/init.am335xevm.usb.rc new file mode 100644 index 0000000..7a834c9 --- /dev/null +++ b/init.am335xevm.usb.rc @@ -0,0 +1,18 @@ +on boot + write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} + write /sys/class/android_usb/android0/iProduct ${ro.product.model} + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + +on property:sys.usb.config=none + stop adbd + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/bDeviceClass 0 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct D002 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} diff --git a/initlogo.rle b/initlogo.rle Binary files differnew file mode 100644 index 0000000..9bf8bef --- /dev/null +++ b/initlogo.rle diff --git a/liblights/Android.mk b/liblights/Android.mk new file mode 100644 index 0000000..eb64ab7 --- /dev/null +++ b/liblights/Android.mk @@ -0,0 +1,34 @@ +# 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. + + +LOCAL_PATH:= $(call my-dir) + +ifeq ($(TARGET_PRODUCT),beaglebone) +# HAL module implemenation, not prelinked and stored in +# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := lights.c + +LOCAL_PRELINK_MODULE := false +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw + +LOCAL_SHARED_LIBRARIES := liblog +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE := lights.$(TARGET_PRODUCT) + +include $(BUILD_SHARED_LIBRARY) + +endif diff --git a/liblights/lights.c b/liblights/lights.c new file mode 100644 index 0000000..b166b0d --- /dev/null +++ b/liblights/lights.c @@ -0,0 +1,153 @@ +/* + * 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. + */ + + +#define LOG_TAG "lights" + +#include <cutils/log.h> + +#include <stdint.h> +#include <string.h> +#include <unistd.h> +#include <errno.h> +#include <fcntl.h> +#include <pthread.h> + +#include <sys/ioctl.h> +#include <sys/types.h> + +#include <hardware/lights.h> + +/******************************************************************************/ + +static pthread_once_t g_init = PTHREAD_ONCE_INIT; +static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; + +char const *const LCD7_FILE + = "/sys/class/backlight/pwm-backlight/brightness"; +char const *const LCD3_FILE + = "/sys/class/backlight/tps65217-bl/brightness"; + +void init_globals(void) +{ + /* init the mutex */ + pthread_mutex_init(&g_lock, NULL); +} + +static int +write_int(char const *path, int value) +{ + int fd; + static int already_warned; + + fd = open(path, O_RDWR); + if (fd >= 0) { + char buffer[20]; + int bytes = sprintf(buffer, "%d\n", value); + int amt = write(fd, buffer, bytes); + close(fd); + return amt == -1 ? -errno : 0; + } else { + if (already_warned == 0) { + ALOGE("write_int failed to open %s\n", path); + already_warned = 1; + } + return -errno; + } +} + +static int +rgb_to_brightness(struct light_state_t const *state) +{ + int color = state->color & 0x00ffffff; + return ((77*((color>>16)&0x00ff)) + + (150*((color>>8)&0x00ff)) + (29*(color&0x00ff))) >> 8; +} + +static int +set_light_backlight(struct light_device_t *dev, + struct light_state_t const *state) +{ + int err = 0; + int brightness = rgb_to_brightness(state); + + brightness = (brightness*100)/255.0; + pthread_mutex_lock(&g_lock); + /* Try to write to LCD7 Backlight node */ + err = write_int(LCD7_FILE, brightness); + if (err != 0) { + /* LCD7 Backlight node not available, Try to write to LCD3 Backlight node */ + err = write_int(LCD3_FILE, brightness); + if (err != 0) + /* LCD3 and LCD7 Backlight node not available */ + ALOGI("write_int failed to open \n\t %s and %s\n", + LCD7_FILE, LCD3_FILE); + } + + pthread_mutex_unlock(&g_lock); + return err; +} + +static int +close_lights(struct light_device_t *dev) +{ + if (dev) + free(dev); + return 0; +} + + +/******************************************************************************/ +static int open_lights(const struct hw_module_t *module, char const *name, + struct hw_device_t **device) +{ + int (*set_light)(struct light_device_t *dev, + struct light_state_t const *state); + + if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) + set_light = set_light_backlight; + else + return -EINVAL; + + pthread_once(&g_init, init_globals); + + struct light_device_t *dev = malloc(sizeof(struct light_device_t)); + memset(dev, 0, sizeof(*dev)); + + dev->common.tag = HARDWARE_DEVICE_TAG; + dev->common.version = 0; + dev->common.module = (struct hw_module_t *)module; + dev->common.close = (int (*)(struct hw_device_t *))close_lights; + dev->set_light = set_light; + + *device = (struct hw_device_t *)dev; + return 0; +} + + +static struct hw_module_methods_t lights_module_methods = { + .open = open_lights, +}; + +struct hw_module_t HAL_MODULE_INFO_SYM = { + .tag = HARDWARE_MODULE_TAG, + .version_major = 1, + .version_minor = 0, + .id = LIGHTS_HARDWARE_MODULE_ID, + .name = "TI OMAP lights Module", + .author = "Google, Inc.", + .methods = &lights_module_methods, +}; diff --git a/media_codecs.xml b/media_codecs.xml new file mode 100644 index 0000000..ac633bf --- /dev/null +++ b/media_codecs.xml @@ -0,0 +1,99 @@ +<?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.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.vpx.decoder" type="video/x-vnd.on2.vp8"/> + + </Decoders> + + <Encoders> + <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp"/> + <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb"/> + <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm"/> + <MediaCodec name="OMX.google.flac.encoder" type="audio/flac"/> + </Encoders> +</MediaCodecs> diff --git a/media_profiles.xml b/media_profiles.xml new file mode 100644 index 0000000..e57951d --- /dev/null +++ b/media_profiles.xml @@ -0,0 +1,203 @@ +<?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. +--> +<!DOCTYPE MediaSettings [ +<!ELEMENT MediaSettings (CamcorderProfiles, + EncoderOutputFileFormat+, + VideoEncoderCap+, + AudioEncoderCap+, + VideoDecoderCap, + AudioDecoderCap)> +<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)> +<!ELEMENT EncoderProfile (Video, Audio)> +<!ATTLIST EncoderProfile quality (high|low) #REQUIRED> +<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED> +<!ATTLIST EncoderProfile duration (30|60) #REQUIRED> +<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED> +<!ELEMENT Video EMPTY> +<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED> +<!ATTLIST Video bitRate CDATA #REQUIRED> +<!ATTLIST Video width CDATA #REQUIRED> +<!ATTLIST Video height CDATA #REQUIRED> +<!ATTLIST Video frameRate CDATA #REQUIRED> +<!ELEMENT Audio EMPTY> +<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED> +<!ATTLIST Audio bitRate CDATA #REQUIRED> +<!ATTLIST Audio sampleRate CDATA #REQUIRED> +<!ATTLIST Audio channels (1|2) #REQUIRED> +<!ELEMENT ImageEncoding EMPTY> +<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED> +<!ELEMENT ImageDecoding EMPTY> +<!ATTLIST ImageDecoding memCap CDATA #REQUIRED> +<!ELEMENT Camera EMPTY> +<!ELEMENT EncoderOutputFileFormat EMPTY> +<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED> +<!ELEMENT VideoEncoderCap EMPTY> +<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED> +<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED> +<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED> +<!ELEMENT AudioEncoderCap EMPTY> +<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED> +<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED> +<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED> +<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED> +<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED> +<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED> +<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED> +<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED> +<!ELEMENT VideoDecoderCap EMPTY> +<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED> +<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED> +<!ELEMENT AudioDecoderCap EMPTY> +<!ATTLIST AudioDecoderCap name (wma) #REQUIRED> +<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED> +]> +<!-- + This file is used to declare the multimedia profiles and capabilities + on an android-powered device. +--> +<MediaSettings> + <!-- Each camcorder profile defines a set of predefined configuration parameters --> + <CamcorderProfiles cameraId="0"> + + <EncoderProfile quality="high" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="3000000" + width="720" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="96000" + sampleRate="16000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="low" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="256000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + + </EncoderProfile> + + <ImageEncoding quality="90" /> + <ImageEncoding quality="80" /> + <ImageEncoding quality="70" /> + <ImageDecoding memCap="20000000" /> + + </CamcorderProfiles> + + <CamcorderProfiles cameraId="1"> + + <EncoderProfile quality="high" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="1000000" + width="640" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="96000" + sampleRate="16000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="low" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="256000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + + </EncoderProfile> + + <ImageEncoding quality="90" /> + <ImageEncoding quality="80" /> + <ImageEncoding quality="70" /> + <ImageDecoding memCap="20000000" /> + + </CamcorderProfiles> + + + <EncoderOutputFileFormat name="3gp" /> + <EncoderOutputFileFormat name="mp4" /> + + <!-- + If a codec is not enabled, it is invisible to the applications + In other words, the applications won't be able to use the codec + or query the capabilities of the codec at all if it is disabled + --> + <VideoEncoderCap name="h264" enabled="true" + minBitRate="64000" maxBitRate="3000000" + minFrameWidth="176" maxFrameWidth="800" + minFrameHeight="144" maxFrameHeight="480" + minFrameRate="1" maxFrameRate="30" /> + + <VideoEncoderCap name="h263" enabled="true" + minBitRate="64000" maxBitRate="1000000" + minFrameWidth="176" maxFrameWidth="800" + minFrameHeight="144" maxFrameHeight="480" + minFrameRate="1" maxFrameRate="30" /> + + <VideoEncoderCap name="m4v" enabled="true" + minBitRate="64000" maxBitRate="2000000" + minFrameWidth="176" maxFrameWidth="800" + minFrameHeight="144" maxFrameHeight="480" + minFrameRate="1" maxFrameRate="30" /> + + <AudioEncoderCap name="aac" enabled="true" + minBitRate="8192" maxBitRate="96000" + minSampleRate="8000" maxSampleRate="16000" + minChannels="1" maxChannels="1" /> + + <AudioEncoderCap name="amrwb" enabled="true" + minBitRate="6600" maxBitRate="23050" + minSampleRate="16000" maxSampleRate="16000" + minChannels="1" maxChannels="1" /> + + <AudioEncoderCap name="amrnb" enabled="true" + minBitRate="5525" maxBitRate="12200" + minSampleRate="8000" maxSampleRate="8000" + minChannels="1" maxChannels="1" /> + + <!-- + FIXME: + We do not check decoder capabilities at present + At present, we only check whether windows media is visible + for TEST applications. For other applications, we do + not perform any checks at all. + --> + <VideoDecoderCap name="wmv" enabled="false"/> + <AudioDecoderCap name="wma" enabled="false"/> +</MediaSettings> 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..9e31662 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,55 @@ +<?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> + + <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION. + Please don't copy them, copy anything else. --> + + <!-- This string array should be overridden by the device to present a list of network + attributes. This is used by the connectivity manager to decide which networks can coexist + based on the hardware --> + <!-- An Array of "[Connection name],[ConnectivityManager connection type], + [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] --> + <!-- 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>"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>"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..73d4517 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml @@ -0,0 +1,44 @@ +<?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:mountPoint="/storage/sdcard0" + android:storageDescription="@string/storage_internal" + android:primary="true" + android:emulated="true" + android:mtpReserve="100" /> + <storage android:mountPoint="/storage/usb1" + android:storageDescription="@string/storage_usb" + android:removable="true" /> +</StorageList> diff --git a/softwaregfx/egl.cfg b/softwaregfx/egl.cfg new file mode 100644 index 0000000..c4a1437 --- /dev/null +++ b/softwaregfx/egl.cfg @@ -0,0 +1 @@ +0 0 android diff --git a/uEnv.txt b/uEnv.txt new file mode 100644 index 0000000..94d62b7 --- /dev/null +++ b/uEnv.txt @@ -0,0 +1,4 @@ +bootargs=console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M rootwait ro earlyprintk fixrtc nocompcache init=/init ip=off +bootcmd=mmc rescan ; fatload mmc 0:1 0x80200000 uImage; fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80200000 0x81600000 +uenvcmd=boot + diff --git a/vendorsetup.sh b/vendorsetup.sh new file mode 100644 index 0000000..7e0a389 --- /dev/null +++ b/vendorsetup.sh @@ -0,0 +1 @@ +add_lunch_combo beaglebone-eng diff --git a/vold.fstab b/vold.fstab new file mode 100644 index 0000000..67e071c --- /dev/null +++ b/vold.fstab @@ -0,0 +1,2 @@ +dev_mount sdcard /storage/sdcard0 3 /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc0 +dev_mount usb /storage/usb1 auto /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1 |