initial version r1
authornotaz <notasas@gmail.com>
Tue, 5 Jun 2012 20:44:16 +0000 (23:44 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 6 Jun 2012 00:26:29 +0000 (03:26 +0300)
53 files changed:
AndroidBoard.mk [new file with mode: 0644]
AndroidProducts.mk [new file with mode: 0644]
BoardConfig.mk [new file with mode: 0644]
asound.conf [new file with mode: 0644]
dhcpcd.conf [new file with mode: 0644]
init.rc [new file with mode: 0644]
initlogo.png [new file with mode: 0644]
initlogo.rle [new file with mode: 0644]
kill_android/Android.mk [new file with mode: 0644]
kill_android/AndroidManifest.xml [new file with mode: 0644]
kill_android/ant.properties [new file with mode: 0644]
kill_android/build.xml [new file with mode: 0644]
kill_android/local.properties [new file with mode: 0644]
kill_android/proguard-project.txt [new file with mode: 0644]
kill_android/project.properties [new file with mode: 0644]
kill_android/res/drawable/icon.png [new file with mode: 0644]
kill_android/res/layout/main.xml [new file with mode: 0644]
kill_android/res/values/strings.xml [new file with mode: 0644]
kill_android/src/org/openpandora/kill_android/kill_android.java [new file with mode: 0644]
pandora.mk [new file with mode: 0644]
patches/all.patch [new file with mode: 0644]
pnd/PXML_schema.xsd [new file with mode: 0644]
pnd/gingerbread.png [new file with mode: 0644]
pnd/gingerbread.pxml [new file with mode: 0644]
pnd/pnd_make.sh [new file with mode: 0755]
pnd/readme.txt [new file with mode: 0644]
pnd/run.sh [new file with mode: 0755]
pvr/3.2.17/bufferclass_ti.ko [new file with mode: 0644]
pvr/3.2.17/omaplfb.ko [new file with mode: 0644]
pvr/3.2.17/pvrsrvkm.ko [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/eglinfo [new file with mode: 0755]
pvr/gfx_rel_es2.x_android/gralloc.omap3.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/install.sh [new file with mode: 0755]
pvr/gfx_rel_es2.x_android/libEGL_POWERVR_SGX530_121.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libGLESv1_CM_POWERVR_SGX530_121.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libGLESv2_POWERVR_SGX530_121.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libIMGegl.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libPVRScopeServices.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libfakehal.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libglslcompiler.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libpvr2d.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libpvrANDROID_WSEGL.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libsfutil.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/libsrv_um.so [new file with mode: 0644]
pvr/gfx_rel_es2.x_android/pvrsrvinit [new file with mode: 0755]
rc.pvr [new file with mode: 0755]
rc.wifi [new file with mode: 0755]
scripts/Makefile [new file with mode: 0644]
scripts/make_pnd.sh [new file with mode: 0755]
scripts/sgx.sh [new file with mode: 0755]
ueventd.omap3.rc [new file with mode: 0644]
vold.fstab [new file with mode: 0644]
wpa_supplicant.conf [new file with mode: 0644]

diff --git a/AndroidBoard.mk b/AndroidBoard.mk
new file mode 100644 (file)
index 0000000..cf98d50
--- /dev/null
@@ -0,0 +1,49 @@
+LOCAL_PATH := $(call my-dir)
+
+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)
+
+ifeq ($(TARGET_PROVIDES_INIT_RC),true)
+file := $(TARGET_ROOT_OUT)/init.rc
+ifeq ($(strip $(DSP_PATH)),)
+$(file): $(LOCAL_PATH)/init.rc | $(ACP)
+else
+$(file): $(LOCAL_PATH)/init.omap3.rc | $(ACP)
+endif
+       $(transform-prebuilt-to-target)
+ALL_PREBUILT += $(file)
+endif
+
+ifneq ($(strip $(DSP_PATH)),)
+# DSP module node permissions
+PRODUCT_COPY_FILES += \
+       $(LOCAL_PATH)/ueventd.omap3.rc:root/ueventd.omap3.rc
+endif
+
+# keyboard
+#PRODUCT_COPY_FILES += \
+       $(LOCAL_PATH)/TWL4030_Keypad.kl:system/usr/keylayout/TWL4030_Keypad.kl
+
+# Wifi
+PRODUCT_COPY_FILES += \
+       $(LOCAL_PATH)/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \
+       $(LOCAL_PATH)/dhcpcd.conf:system/etc/dhcpcd/dhcpcd.conf \
+       $(LOCAL_PATH)/rc.wifi:system/bin/rc.wifi
+
+# misc
+PRODUCT_COPY_FILES += \
+       $(LOCAL_PATH)/vold.fstab:system/etc/vold.fstab \
+       $(LOCAL_PATH)/asound.conf:system/etc/asound.conf \
+       $(LOCAL_PATH)/rc.pvr:system/bin/rc.pvr
+
+# initlogo
+PRODUCT_COPY_FILES += \
+       $(LOCAL_PATH)/initlogo.rle:root/initlogo.rle.bak
+
+include frameworks/base/data/sounds/OriginalAudio.mk
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644 (file)
index 0000000..396266e
--- /dev/null
@@ -0,0 +1,2 @@
+PRODUCT_MAKEFILES := \
+       $(LOCAL_DIR)/pandora.mk 
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644 (file)
index 0000000..dc30d04
--- /dev/null
@@ -0,0 +1,60 @@
+# pandora configuration
+
+TARGET_NO_BOOTLOADER := true
+TARGET_NO_KERNEL := true
+TARGET_PROVIDES_INIT_RC := true
+TARGET_NO_RADIOIMAGE := true
+#USE_CAMERA_STUB := true
+#BOARD_USES_GENERIC_AUDIO := true
+BOARD_USES_ALSA_AUDIO := true
+BUILD_WITH_ALSA_UTILS := true
+
+ifeq ($(strip $(DSP_PATH)),)
+BUILD_WITHOUT_PV := true
+else
+BUILD_WITHOUT_PV := false
+# build OpenCORE OMX component only
+BUILD_PV_OMX_ONLY := true
+OMAP_ENHANCEMENT := true
+endif
+#BUILD_WITH_FULL_STAGEFRIGHT := true
+
+#BUILD_PV_VIDEO_ENCODERS := 1
+
+BOARD_USES_OMAP3_LIGHTS := false
+
+# Wifi
+WPA_SUPPLICANT_VERSION      := VER_0_8_X
+#BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+BOARD_WPA_SUPPLICANT_DRIVER := WEXT
+WIFI_DRIVER_MODULE_PATH     := "/vendor/wl1251_sdio.ko"
+WIFI_DRIVER_MODULE_NAME     := "wl1251_sdio"
+
+# Bluetooth
+BOARD_HAVE_BLUETOOTH := true
+
+# Setup some runtime system properties.
+TARGET_BOARD_PLATFORM := omap3
+#TARGET_BOOTLOADER_BOARD_NAME := pandora
+TARGET_CPU_ABI  := armeabi-v7a
+TARGET_CPU_ABI2 := armeabi
+ARCH_ARM_HAVE_NEON := true
+TARGET_ARCH_VARIANT := armv7-a-neon
+ARCH_ARM_HAVE_TLS_REGISTER := true
+
+#HARDWARE_OMX := true
+
+ifdef HARDWARE_OMX
+OMX_JPEG := true
+OMX_VENDOR := ti
+OMX_VENDOR_INCLUDES := \
+   hardware/ti/omx/system/src/openmax_il/omx_core/inc \
+   hardware/ti/omx/image/src/openmax_il/jpeg_enc/inc
+OMX_VENDOR_WRAPPER := TI_OMX_Wrapper
+BOARD_OPENCORE_LIBRARIES := libOMX_Core
+BOARD_OPENCORE_FLAGS := -DHARDWARE_OMX=1
+endif
+
+ifdef OMAP_ENHANCEMENT
+COMMON_GLOBAL_CFLAGS += -DOVERLAY_SUPPORT_USERPTR_BUF
+endif
diff --git a/asound.conf b/asound.conf
new file mode 100644 (file)
index 0000000..56dbf84
--- /dev/null
@@ -0,0 +1,54 @@
+# Android ALSA configuration file for TI OMAP3430 reference platform using the TWL4030 ASoC audio.
+
+##
+## Mixer Devices
+##
+
+ctl.AndroidOut {
+       type hw
+}
+
+ctl.AndroidIn {
+       type hw
+}
+
+
+##
+## Playback Devices
+##
+
+pcm.AndroidOut_Speaker {
+       type hw
+}
+
+pcm.AndroidOut_Speaker_normal {
+       type hw
+}
+
+pcm.AndroidOut_Headset {
+       type hw
+}
+
+pcm.AndroidOut_Earpiece {
+       type hw
+}
+
+# No bluetooth available.  Send output to the bit bucket.
+pcm.AndroidOut_Bluetooth {
+       type null
+}
+
+pcm.AndroidOut_Bluetooth-A2DP {
+       type null
+}
+
+
+##
+## Recording device
+##
+
+pcm.AndroidIn {
+       type hw
+}
+
+
diff --git a/dhcpcd.conf b/dhcpcd.conf
new file mode 100644 (file)
index 0000000..54006c7
--- /dev/null
@@ -0,0 +1,6 @@
+# dhcpcd configuration for Android Wi-Fi interface
+# See dhcpcd.conf(5) for details.
+
+interface wlan0
+# dhcpcd-run-hooks uses these options.
+option subnet_mask, routers, domain_name_servers
diff --git a/init.rc b/init.rc
new file mode 100644 (file)
index 0000000..1351714
--- /dev/null
+++ b/init.rc
@@ -0,0 +1,469 @@
+on early-init
+   symlink /initlogo.rle.bak /initlogo.rle
+   start ueventd
+
+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 /mnt/sdcard2
+    export ASEC_MOUNTPOINT /mnt/asec
+    export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
+
+# Location of BT firmware files
+    export BT_FW_PATH /vendor/firmware
+
+# Backward compatibility
+    symlink /system/etc /etc
+    symlink /sys/kernel/debug /d
+
+# create mountpoints
+    mkdir /mnt 0775 root system
+    mkdir /mnt/sdcard 0000 system system
+    mkdir /mnt/sdcard2 0000 system system
+
+# Create cgroup mount point for cpu accounting
+    mkdir /acct
+    mount cgroup none /acct cpuacct
+    mkdir /acct/uid
+
+# Backwards Compat - XXX: Going away in G*
+    symlink /mnt/sdcard2 /sdcard
+
+    mkdir /system
+    mkdir /data 0771 system system
+    mkdir /cache 0770 system cache
+    mkdir /config 0500 root root
+
+    # Directory for putting things only root should see.
+    mkdir /mnt/secure 0700 root root
+
+    # Directory for staging bindmounts
+    mkdir /mnt/secure/staging 0700 root root
+
+    # Directory-target for where the secure container
+    # imagefile directory will be bind-mounted
+    mkdir /mnt/secure/asec  0700 root root
+
+    # Secure container public mount points.
+    mkdir /mnt/asec  0700 root system
+    mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
+
+#    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
+    write /proc/sys/kernel/sched_child_runs_first 0
+
+# Create cgroup mount points for process groups
+    mkdir /dev/cpuctl
+    mount cgroup none /dev/cpuctl cpu
+    chown system 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
+
+# Power Management Patches
+    chmod 0777 /sys/power/state
+    chmod 0777 /sys/power/wake_lock
+    chmod 0777 /sys/power/wake_unlock
+    chmod 0777 /sys/power/wait_for_fb_sleep
+    chmod 0777 /sys/power/wait_for_fb_wake
+
+    chown system system /data
+    chmod 0771 /data
+
+    # Create dump dir and collect dumps.
+    # Do this before we mount cache so eventually we can use cache for
+    # storing dumps on platforms which do not have a dedicated dump partition.
+   
+    mkdir /data/dontpanic
+    chown root log /data/dontpanic
+    chmod 0750 /data/dontpanic
+
+    # Collect apanic data, free resources and re-arm trigger
+    copy /proc/apanic_console /data/dontpanic/apanic_console
+    chown root log /data/dontpanic/apanic_console
+    chmod 0640 /data/dontpanic/apanic_console
+
+    copy /proc/apanic_threads /data/dontpanic/apanic_threads
+    chown root log /data/dontpanic/apanic_threads
+    chmod 0640 /data/dontpanic/apanic_threads
+
+    write /proc/apanic_console 1
+
+    # 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 cache /cache/recovery
+    chmod 0770 /cache/recovery
+
+    #change permissions on vmallocinfo so we can grab it from bugreports
+    chown root log /proc/vmallocinfo
+    chmod 0440 /proc/vmallocinfo
+
+    #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
+    chown root system /proc/kmsg
+    chmod 0440 /proc/kmsg
+    chown root system /proc/sysrq-trigger
+    chmod 0220 /proc/sysrq-trigger
+
+# change permissions for Overlay
+    chmod 0777 /dev/video1
+    chmod 0777 /dev/video2
+    chmod 0777 /dev/omap-resizer
+
+# change permissions for Overlay on 2.6.37 kernel
+       chmod 777 /dev/video7
+
+
+
+# create basic filesystem structure
+    mkdir /data/misc 01771 system misc
+    mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
+    mkdir /data/misc/bluetooth 0770 system system
+    mkdir /data/misc/keystore 0700 keystore keystore
+    mkdir /data/misc/vpn 0770 system system
+    mkdir /data/misc/systemkeys 0700 system system
+    mkdir /data/misc/vpn/profiles 0770 system system
+
+    # give system access to wpa_supplicant.conf for backup and restore
+    mkdir /system/etc/wifi 0770 system wifi
+    chmod 0770 /system/etc/wifi
+    chmod 0660 /system/etc/wifi/wpa_supplicant.conf
+    chown system wifi /system/etc/wifi/wpa_supplicant.conf
+    mkdir /data/misc/wifi 0770 system wifi
+    mkdir /data/misc/wifi/sockets 0777 system wifi
+    chmod 0770 /data/misc/wifi
+    chmod 0660 /data/misc/wifi/wpa_supplicant.conf
+    chown wifi wifi /data/misc/wifi
+    chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
+
+    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
+    mkdir /data/misc/dhcp 0777 dhcp dhcp
+    mkdir /data/misc/udhcpd 0777 system wifi
+    chown dhcp dhcp /data/misc/dhcp
+
+    # 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
+
+# console changed to ttyO* from ttyS* since 2.6.37 kernel.
+    chmod 0660 /dev/ttyO1
+    chown bluetooth bluetooth /dev/ttyO1
+#    chmod 0660 sys/class/rfkill/rfkill0/state
+#    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
+#    write /sys/class/rfkill/rfkill0/state 0
+
+
+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
+
+# No battery hardware present
+    setprop hw.nobattery true
+    setprop hw.nophone true
+
+# Power Management Patches
+    setprop hw.nopm true
+
+# Enabling CPU Freq and CPU Idle
+# CPU Freq
+    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor performance
+# CPU Idle
+    mkdir /debug
+    mount debugfs debugfs /debug
+#    write /debug/pm_debug/sleep_while_idle 0
+#    write /debug/pm_debug/enable_off_mode 0
+
+# 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.PERCEPTIBLE_APP_ADJ 2
+    setprop ro.HEAVY_WEIGHT_APP_ADJ 3
+    setprop ro.SECONDARY_SERVER_ADJ 4
+    setprop ro.BACKUP_APP_ADJ 5
+    setprop ro.HOME_APP_ADJ 6
+    setprop ro.HIDDEN_APP_MIN_ADJ 7
+    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 2048
+    setprop ro.VISIBLE_APP_MEM 3072
+    setprop ro.PERCEPTIBLE_APP_MEM 4096
+    setprop ro.HEAVY_WEIGHT_APP_MEM 4096
+    setprop ro.SECONDARY_SERVER_MEM 6144
+    setprop ro.BACKUP_APP_MEM 6144
+    setprop ro.HOME_APP_MEM 6144
+    setprop ro.HIDDEN_APP_MEM 5120
+    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,4,7,15
+
+    write /proc/sys/vm/overcommit_memory 1
+    write /proc/sys/vm/min_free_order_shift 4
+    write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,8192
+
+    # Set init its forked children's oom_score_adj.
+    write /proc/1/oom_score_adj -16
+
+    # Tweak background writeout
+    write /proc/sys/vm/dirty_expire_centisecs 200
+    write /proc/sys/vm/dirty_background_ratio  5
+
+    # 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
+    #Power Management patches
+    chown radio system /sys/power/wait_for_fb_sleep
+    chown radio system /sys/power/wait_for_fb_wake
+
+    chmod 0660 /sys/power/state
+    chmod 0660 /sys/power/wake_lock
+    chmod 0660 /sys/power/wake_unlock
+#Brightness Control patches for 2.6.37 kernel
+#    chmod 0777 /sys/devices/omapdss/display0/backlight/sharp-ls/brightness
+#    chown system system /sys/devices/omapdss/display0/backlight/sharp-ls/brightness
+#    chown system system /sys/class/timed_output/vibrator/enable
+#    chown system system /sys/class/leds/keyboard-backlight/brightness
+#    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
+    chown system system /system/etc/wifi
+# wl12xx_sdio, wlan module for 2.6.37 wlan release
+#    chown system system /system/etc/wifi/wl12xx_sdio.ko
+
+#    chmod 0755 /wl1271bt_enable
+
+# 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
+
+    setprop wifi.interface wlan0
+
+    class_start default
+
+## Daemon processes to be run by init.
+##
+#service logcat /system/bin/logcat -f /dev/kmsg
+#    oneshot
+
+service ueventd /sbin/ueventd
+    critical
+
+#service console /system/bin/sh
+#    console
+
+service pvr /system/bin/rc.pvr start
+
+# adbd is controlled by the persist.service.adb.enable system property
+service adbd /sbin/adbd
+    disabled
+
+# adbd on at boot in emulator
+on property:ro.kernel.qemu=1
+    start adbd
+
+on property:persist.service.adb.enable=1
+    start adbd
+
+on property:persist.service.adb.enable=0
+    stop adbd
+
+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
+    ioprio be 2
+
+service netd /system/bin/netd
+    socket netd stream 0660 root system
+
+service debuggerd /system/bin/debuggerd
+
+service ril-daemon /system/bin/rild
+    socket rild stream 660 root radio
+    socket rild-debug stream 660 radio system
+    user root
+    group radio cache inet misc audio
+
+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
+    onrestart restart media
+
+service media /system/bin/mediaserver
+    user media
+    group system audio camera graphics inet net_bt net_bt_admin net_raw sdcard_rw
+    ioprio rt 4
+
+service bootanim /system/bin/bootanimation
+    user graphics
+    group graphics
+    disabled
+    oneshot
+
+service dbus /system/bin/dbus-daemon --system --nofork
+    socket dbus stream 660 bluetooth bluetooth
+    user bluetooth
+    group bluetooth net_bt_admin
+
+service bluetoothd /system/bin/bluetoothd -n
+    socket bluetooth stream 660 bluetooth bluetooth
+    socket dbus_bluetooth stream 660 bluetooth bluetooth
+# init.rc does not yet support applying capabilities, so run as root and
+# let bluetoothd drop uid to bluetooth with the right linux capabilities
+    group bluetooth net_bt_admin misc
+    disabled
+
+service hfag /system/bin/sdptool add --channel=10 HFAG
+    user bluetooth
+    group bluetooth net_bt_admin
+    disabled
+    oneshot
+
+service hsag /system/bin/sdptool add --channel=11 HSAG
+    user bluetooth
+    group bluetooth net_bt_admin
+    disabled
+    oneshot
+
+service opush /system/bin/sdptool add --channel=12 OPUSH
+    user bluetooth
+    group bluetooth net_bt_admin
+    disabled
+    oneshot
+
+service pbap /system/bin/sdptool add --channel=19 PBAP
+    user bluetooth
+    group bluetooth net_bt_admin
+    disabled
+    oneshot
+
+service installd /system/bin/installd
+    socket installd stream 600 system system
+
+#service flash_recovery /system/etc/install-recovery.sh
+#    oneshot
+
+service racoon /system/bin/racoon
+    socket racoon stream 600 system system
+    # racoon will setuid to vpn after getting necessary resources.
+    group net_admin
+    disabled
+    oneshot
+
+service mtpd /system/bin/mtpd
+    socket mtpd stream 600 system system
+    user vpn
+    group vpn net_admin net_raw
+    disabled
+    oneshot
+
+service keystore /system/bin/keystore /data/misc/keystore
+    user keystore
+    group keystore
+    socket keystore stream 666
+
+service dumpstate /system/bin/dumpstate -s
+    socket dumpstate stream 0660 shell log
+    disabled
+    oneshot
+
+# Start WiFi
+service wifi /system/bin/rc.wifi start
+    oneshot
+
+# rfkill is not supported, use this instead
+#service btpwr /wl1271bt_enable /dev/ttyO1
+#    disabled
+#    oneshot
+
+#service hciattach /system/bin/hciattach -n /dev/ttyO1 texas 3000000
+#    user root
+# changing user to root from bluetooth is a potential security issue
+#    group bluetooth net_bt_admin misc
+#    disabled
+#    oneshot
+
+# wpa_supplicant and dhcp daemon
+service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd -qq
+    socket wpa_wlan0 dgram 660 system wifi
+    group system wifi inet
+    disabled
+    oneshot
+
+service dhcpcd /system/bin/dhcpcd -ABKL wlan0
+    disabled
+    oneshot
diff --git a/initlogo.png b/initlogo.png
new file mode 100644 (file)
index 0000000..91b796c
Binary files /dev/null and b/initlogo.png differ
diff --git a/initlogo.rle b/initlogo.rle
new file mode 100644 (file)
index 0000000..f7aab16
Binary files /dev/null and b/initlogo.rle differ
diff --git a/kill_android/Android.mk b/kill_android/Android.mk
new file mode 100644 (file)
index 0000000..089e0e1
--- /dev/null
@@ -0,0 +1,18 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := kill_android
+LOCAL_SDK_VERSION := current
+LOCAL_CERTIFICATE := shared
+
+
+include $(BUILD_PACKAGE)
+
+# Use the following include to make our test apk.
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
+
diff --git a/kill_android/AndroidManifest.xml b/kill_android/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..10358e9
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      package="org.openpandora.kill_android" >
+    <uses-permission android:name="android.permission.INTERNET" />
+    <application android:icon="@drawable/icon" android:label="@string/app_name" >
+        <activity android:name="kill_android"
+                  android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest> 
diff --git a/kill_android/ant.properties b/kill_android/ant.properties
new file mode 100644 (file)
index 0000000..b0971e8
--- /dev/null
@@ -0,0 +1,17 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked into Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+#  'source.dir' for the location of your java source folder and
+#  'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+#  'key.store' for the location of your keystore and
+#  'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
diff --git a/kill_android/build.xml b/kill_android/build.xml
new file mode 100644 (file)
index 0000000..2873c2e
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="kill_android" default="help">
+
+    <!-- The local.properties file is created and updated by the 'android' tool.
+         It contains the path to the SDK. It should *NOT* be checked into
+         Version Control Systems. -->
+    <property file="local.properties" />
+
+    <!-- The ant.properties file can be created by you. It is only edited by the
+         'android' tool to add properties to it.
+         This is the place to change some Ant specific build properties.
+         Here are some properties you may want to change/update:
+
+         source.dir
+             The name of the source directory. Default is 'src'.
+         out.dir
+             The name of the output directory. Default is 'bin'.
+
+         For other overridable properties, look at the beginning of the rules
+         files in the SDK, at tools/ant/build.xml
+
+         Properties related to the SDK location or the project target should
+         be updated using the 'android' tool with the 'update' action.
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems.
+
+         -->
+    <property file="ant.properties" />
+
+    <!-- The project.properties file is created and updated by the 'android'
+         tool, as well as ADT.
+
+         This contains project specific properties such as project target, and library
+         dependencies. Lower level build properties are stored in ant.properties
+         (or in .classpath for Eclipse projects).
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems. -->
+    <loadproperties srcFile="project.properties" />
+
+    <!-- quick check on sdk.dir -->
+    <fail
+            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
+            unless="sdk.dir"
+    />
+
+    <!--
+        Import per project custom build rules if present at the root of the project.
+        This is the place to put custom intermediary targets such as:
+            -pre-build
+            -pre-compile
+            -post-compile (This is typically used for code obfuscation.
+                           Compiled code location: ${out.classes.absolute.dir}
+                           If this is not done in place, override ${out.dex.input.absolute.dir})
+            -post-package
+            -post-build
+            -pre-clean
+    -->
+    <import file="custom_rules.xml" optional="true" />
+
+    <!-- Import the actual build file.
+
+         To customize existing targets, there are two options:
+         - Customize only one target:
+             - copy/paste the target into this file, *before* the
+               <import> task.
+             - customize it to your needs.
+         - Customize the whole content of build.xml
+             - copy/paste the content of the rules files (minus the top node)
+               into this file, replacing the <import> task.
+             - customize to your needs.
+
+         ***********************
+         ****** IMPORTANT ******
+         ***********************
+         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+         in order to avoid having your file be overridden by tools such as "android update project"
+    -->
+    <!-- version-tag: 1 -->
+    <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>
diff --git a/kill_android/local.properties b/kill_android/local.properties
new file mode 100644 (file)
index 0000000..c106b1c
--- /dev/null
@@ -0,0 +1,10 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+
+# location of the SDK. This is only used by Ant
+# For customization when using a Version Control System, please read the
+# header note.
+sdk.dir=/home/notaz/stuff/android/android-sdk-linux
diff --git a/kill_android/proguard-project.txt b/kill_android/proguard-project.txt
new file mode 100644 (file)
index 0000000..f2fe155
--- /dev/null
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
diff --git a/kill_android/project.properties b/kill_android/project.properties
new file mode 100644 (file)
index 0000000..b7c2081
--- /dev/null
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-10
diff --git a/kill_android/res/drawable/icon.png b/kill_android/res/drawable/icon.png
new file mode 100644 (file)
index 0000000..0ec7e36
Binary files /dev/null and b/kill_android/res/drawable/icon.png differ
diff --git a/kill_android/res/layout/main.xml b/kill_android/res/layout/main.xml
new file mode 100644 (file)
index 0000000..6e32c24
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<TextView  
+    android:layout_width="fill_parent" 
+    android:layout_height="wrap_content" 
+    android:text="@string/app_name"
+    />
+</LinearLayout>
+
diff --git a/kill_android/res/values/strings.xml b/kill_android/res/values/strings.xml
new file mode 100644 (file)
index 0000000..954d5c0
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">Kill Android</string>
+</resources>
diff --git a/kill_android/src/org/openpandora/kill_android/kill_android.java b/kill_android/src/org/openpandora/kill_android/kill_android.java
new file mode 100644 (file)
index 0000000..f68f345
--- /dev/null
@@ -0,0 +1,38 @@
+package org.openpandora.kill_android;
+
+import android.app.Activity;
+import android.os.Bundle;
+import java.net.Socket;
+import java.io.OutputStream;
+
+public class kill_android extends Activity
+{
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main);
+
+        try
+        {
+            Socket s = new Socket("localhost", 36936);
+            OutputStream out = s.getOutputStream();
+            String msg = "quit";
+            byte[] msg_bytes = msg.getBytes("UTF8");
+
+            out.write(msg_bytes);
+//            PrintWriter output = new PrintWriter(out);
+
+//            output.println("quit");
+            s.close();    
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+        android.os.Process.killProcess(android.os.Process.myPid());
+    }
+}
+
+// vim:expandtab:ts=4
diff --git a/pandora.mk b/pandora.mk
new file mode 100644 (file)
index 0000000..c54064b
--- /dev/null
@@ -0,0 +1,22 @@
+PRODUCT_PACKAGES := \
+       ApiDemos      \
+        SoundRecorder \
+        GeneralRunner \
+        BluetoothSCOApp \
+        alsa.$(TARGET_PRODUCT) \
+        kill_android \
+
+$(call inherit-product, build/target/product/generic.mk)
+
+# Overrides
+PRODUCT_BRAND := openpandora
+PRODUCT_NAME := pandora
+PRODUCT_DEVICE := pandora
+PRODUCT_PACKAGE_OVERLAYS := device/rowboat/generic
+
+# Making ril wake lock timeout to zero. This is required to decrease the device suspend delay.
+# ADDITIONAL_DEFAULT_PROPERTIES += ro.ril.wake_lock_timeout=0
+
+# Install the features available on this device.
+PRODUCT_COPY_FILES += \
+    frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml
diff --git a/patches/all.patch b/patches/all.patch
new file mode 100644 (file)
index 0000000..c8147ff
--- /dev/null
@@ -0,0 +1,128 @@
+
+project frameworks/base/
+diff --git a/frameworks/base/libs/ui/InputReader.cpp b/frameworks/base/libs/ui/InputReader.cpp
+index 79cb87a..d8cd717 100644
+--- a/frameworks/base/libs/ui/InputReader.cpp
++++ b/frameworks/base/libs/ui/InputReader.cpp
+@@ -1668,12 +1668,36 @@ bool TouchInputMapper::configureSurfaceLocked() {
+         // Configure X and Y factors.
+         if (mRawAxes.x.valid && mRawAxes.y.valid) {
+-            mLocked.xOrigin = mRawAxes.x.minValue;
+-            mLocked.yOrigin = mRawAxes.y.minValue;
+-            mLocked.xScale = float(width) / mRawAxes.x.getRange();
+-            mLocked.yScale = float(height) / mRawAxes.y.getRange();
+-            mLocked.xPrecision = 1.0f / mLocked.xScale;
+-            mLocked.yPrecision = 1.0f / mLocked.yScale;
++            int a[7], have_pointercal = 0;
++            const char *fname = "/vendor/pointercal";
++            FILE *f = fopen(fname, "r");
++            int ret;
++            if (f) {
++              ret = fscanf(f, "%d %d %d %d %d %d %d",
++                &a[0], &a[1], &a[2], &a[3], &a[4], &a[5], &a[6]);
++              if (ret == 7)
++                have_pointercal = 1;
++              else
++                LOGW("Failed to parse %s", fname);
++              fclose(f);
++            }
++            else
++              LOGW("Failed to open %s", fname);
++
++            if (have_pointercal) {
++                mLocked.xScale = float(a[0]) / float(a[6]);
++                mLocked.yScale = float(a[4]) / float(a[6]);
++              // a[2] / mLocked.xScale / a[6]
++                mLocked.xOrigin = -a[2] / a[0];
++                mLocked.yOrigin = -a[5] / a[4];
++            } else {
++                mLocked.xOrigin = mRawAxes.x.minValue;
++                mLocked.yOrigin = mRawAxes.y.minValue;
++                mLocked.xScale = float(width) / mRawAxes.x.getRange();
++                mLocked.yScale = float(height) / mRawAxes.y.getRange();
++            }
++            mLocked.xPrecision = fabsf(1.0f / mLocked.xScale);
++            mLocked.yPrecision = fabsf(1.0f / mLocked.yScale);
+             configureVirtualKeysLocked();
+         } else {
+@@ -1689,7 +1713,7 @@ bool TouchInputMapper::configureSurfaceLocked() {
+         // Scale factor for terms that are not oriented in a particular axis.
+         // If the pixels are square then xScale == yScale otherwise we fake it
+         // by choosing an average.
+-        mLocked.geometricScale = avg(mLocked.xScale, mLocked.yScale);
++        mLocked.geometricScale = avg(fabsf(mLocked.xScale), fabsf(mLocked.yScale));
+         // Size of diagonal axis.
+         float diagonalSize = pythag(width, height);
+
+project hardware/libhardware/
+diff --git a/hardware/libhardware/modules/gralloc/framebuffer.cpp b/hardware/libhardware/modules/gralloc/framebuffer.cpp
+index fe57a8a..b5465e4 100644
+--- a/hardware/libhardware/modules/gralloc/framebuffer.cpp
++++ b/hardware/libhardware/modules/gralloc/framebuffer.cpp
+@@ -109,6 +109,12 @@ static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
+         }
+         m->currentBuffer = buffer;
+         
++#ifndef FBIO_WAITFORVSYNC
++#define FBIO_WAITFORVSYNC _IOW ('F', 32, unsigned int)
++#endif
++        int mode = 0;
++        ioctl(m->framebuffer->fd, FBIO_WAITFORVSYNC, &mode);
++
+     } else {
+         // If we can't do the page_flip, just copy the buffer to the front 
+         // FIXME: use copybit HAL instead of memcpy
+
+project system/core/
+diff --git a/system/core/libsysutils/src/NetlinkListener.cpp b/system/core/libsysutils/src/NetlinkListener.cpp
+index fb088e1..f99227c 100644
+--- a/system/core/libsysutils/src/NetlinkListener.cpp
++++ b/system/core/libsysutils/src/NetlinkListener.cpp
+@@ -45,21 +45,21 @@ bool NetlinkListener::onDataAvailable(SocketClient *cli)
+     }
+     if ((snl.nl_groups != 1) || (snl.nl_pid != 0)) {
+-        SLOGE("ignoring non-kernel netlink multicast message");
+-        return false;
++        //SLOGE("ignoring non-kernel netlink multicast message");
++        return true;
+     }
+     struct cmsghdr * cmsg = CMSG_FIRSTHDR(&hdr);
+     if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) {
+         SLOGE("ignoring message with no sender credentials");
+-        return false;
++        return true;
+     }
+     struct ucred * cred = (struct ucred *)CMSG_DATA(cmsg);
+     if (cred->uid != 0) {
+         SLOGE("ignoring message from non-root UID %d", cred->uid);
+-        return false;
++        return true;
+     }
+     NetlinkEvent *evt = new NetlinkEvent();
+
+project system/extras/
+diff --git a/system/extras/su/su.c b/system/extras/su/su.c
+index b87cece..bddc37d 100644
+--- a/system/extras/su/su.c
++++ b/system/extras/su/su.c
+@@ -59,10 +59,12 @@ int main(int argc, char **argv)
+     /* Until we have something better, only root and the shell can use su. */
+     myuid = getuid();
++#if 0
+     if (myuid != AID_ROOT && myuid != AID_SHELL) {
+         fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
+         return 1;
+     }
++#endif
+     
+     if(setgid(gid) || setuid(uid)) {
+         fprintf(stderr,"su: permission denied\n");
diff --git a/pnd/PXML_schema.xsd b/pnd/PXML_schema.xsd
new file mode 100644 (file)
index 0000000..335efe5
--- /dev/null
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema targetNamespace="http://openpandora.org/namespaces/PXML" xmlns="http://openpandora.org/namespaces/PXML" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
+       
+       
+       <!-- declare some simpleTypes for later usage -->
+       
+       <!-- Specify params allows with the 'x11' entry in exec -->
+       <xs:simpleType name="x11Param">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="req" />
+                       <xs:enumeration value="stop" />
+                       <xs:enumeration value="ignore" />
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- Specify the valid documentation formats in the <info> block -->
+       <xs:simpleType name="docType">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="text/html" />
+                       <xs:enumeration value="text/plain" />
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- Make sure that version numbers only consist of letters, numbers and + as well as - -->
+       <xs:simpleType name="versionNumber">
+               <xs:restriction base="xs:string">
+                       <xs:minLength value="1"/>
+                       <xs:pattern value="[a-zA-Z0-9+-]*" />
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- Specify what is valid as release type -->
+       <xs:simpleType name="releaseType">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="alpha" />
+                       <xs:enumeration value="beta" />
+                       <xs:enumeration value="release" />
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- Specify what makes an email address "valid" -->
+       <xs:simpleType name="emailAddress">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="[^@]+@[^\.]+\..+"/>
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- some restrictions regarding file names that are eg not allowed/possible when using sd cards formated as fat32 -->
+       <xs:simpleType name="dumbPath">
+               <xs:restriction base="xs:normalizedString">
+                       <xs:pattern value="[^?>:]+" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="dumbFolderName">
+               <xs:restriction base="xs:normalizedString">
+                       <xs:pattern value="[^?>:/]+" />
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- Specify lang codes -->
+       <xs:simpleType name="isoLangcode">
+               <xs:restriction base="xs:string">
+                       <xs:minLength value="2"/>
+                       <xs:pattern value="[a-zA-Z]{2,3}(_[a-zA-Z0-9]{2,3})*" />
+               </xs:restriction>
+       </xs:simpleType>
+       <xs:simpleType name="isoLangcode_en_US">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="en_US" />
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- Definition of all allowed categories following the FDO specs -->
+       <xs:simpleType name="fdoCategory">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="AudioVideo|Audio|Video|Development|Education|Game|Graphics|Network|Office|Settings|System|Utility"/>
+               </xs:restriction>
+       </xs:simpleType>
+       <!-- Definition of all allowed subcategories following the FDO specs (should be based upon the given main categories, but would significantly increase complexity of the schema) -->
+       <xs:simpleType name="fdoSubCategory">
+               <xs:restriction base="xs:string">
+                       <xs:pattern value="Building|Debugger|IDE|GUIDesigner|Profiling|RevisionControl|Translation|Calendar|ContactManagement|Database|Dictionary|Chart|Email|Finance|FlowChart|PDA|ProjectManagement|Presentation|Spreadsheet|WordProcessor|2DGraphics|VectorGraphics|RasterGraphics|3DGraphics|Scanning|OCR|Photography|Publishing|Viewer|TextTools|DesktopSettings|HardwareSettings|Printing|PackageManager|Dialup|InstantMessaging|Chat|IRCClient|FileTransfer|HamRadio|News|P2P|RemoteAccess|Telephony|TelephonyTools|VideoConference|WebBrowser|WebDevelopment|Midi|Mixer|Sequencer|Tuner|TV|AudioVideoEditing|Player|Recorder|DiscBurning|ActionGame|AdventureGame|ArcadeGame|BoardGame|BlocksGame|CardGame|KidsGame|LogicGame|RolePlaying|Simulation|SportsGame|StrategyGame|Art|Construction|Music|Languages|Science|ArtificialIntelligence|Astronomy|Biology|Chemistry|ComputerScience|DataVisualization|Economy|Electricity|Geography|Geology|Geoscience|History|ImageProcessing|Literature|Math|NumericalAnalysis|MedicalSoftware|Physics|Robotics|Sports|ParallelComputing|Amusement|Archiving|Compression|Electronics|Emulator|Engineering|FileTools|FileManager|TerminalEmulator|Filesystem|Monitor|Security|Accessibility|Calculator|Clock|TextEditor|Documentation|Core|KDE|GNOME|GTK|Qt|Motif|Java|ConsoleOnly"/>
+               </xs:restriction>
+       </xs:simpleType>
+       
+       <!-- Create some way to enforce entries to be nonempty -->
+       <xs:simpleType name="nonempty_token">
+               <xs:restriction base="xs:token">
+                       <xs:minLength value="1"/>
+               </xs:restriction>
+       </xs:simpleType>
+               <xs:simpleType name="nonempty_string">
+               <xs:restriction base="xs:string">
+                       <xs:minLength value="1"/>
+               </xs:restriction>
+       </xs:simpleType>
+               <xs:simpleType name="nonempty_normalizedString">
+               <xs:restriction base="xs:string">
+                       <xs:minLength value="1"/>
+               </xs:restriction>
+       </xs:simpleType>
+       
+       
+       
+       <!-- declare some complexTypes for later usage -->
+       
+       <!-- type used for file associations -->
+       <xs:complexType name="association_data">
+               <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+               <xs:attribute name="filetype" use="required" type="nonempty_token" />
+               <xs:attribute name="exec" use="required" type="nonempty_token" />
+       </xs:complexType>
+       
+       <!-- type used for author info -->
+       <xs:complexType name="author_data">
+               <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+               <xs:attribute name="website" use="optional" type="xs:anyURI" />
+               <xs:attribute name="email" use="optional" type="emailAddress" />
+       </xs:complexType>
+       
+       <!-- type used for version informations (full entry as well as os version) -->
+       <xs:complexType name="app_version_info">
+               <xs:attribute name="major" use="required" type="versionNumber" />
+               <xs:attribute name="minor" use="required" type="versionNumber" />
+               <xs:attribute name="release" use="required" type="versionNumber" />
+               <xs:attribute name="build" use="required" type="versionNumber" />
+               <xs:attribute name="type" use="optional" type="releaseType" />
+       </xs:complexType>
+       <xs:complexType name="os_version_info">
+               <xs:attribute name="major" use="required" type="versionNumber" />
+               <xs:attribute name="minor" use="required" type="versionNumber" />
+               <xs:attribute name="release" use="required" type="versionNumber" />
+               <xs:attribute name="build" use="required" type="versionNumber" />
+       </xs:complexType>
+       
+       <!-- type used for exec entries -->
+       <xs:complexType name="exec_params">
+               <xs:attribute name="command" use="required" type="nonempty_token" />
+               <xs:attribute name="arguments" use="optional" type="nonempty_token" />
+               <xs:attribute name="background" use="optional" type="xs:boolean" />
+               <xs:attribute name="startdir" use="optional" type="dumbPath" />
+               <xs:attribute name="standalone" use="optional" type="xs:boolean" />
+               <xs:attribute name="x11" use="optional" type="x11Param" />
+       </xs:complexType>
+       
+       <!-- type used for tiles or descriptions, once in 'normal' version, once enforcing usage of en_US -->
+       <xs:complexType name="title_or_description">
+               <xs:simpleContent>
+                       <xs:extension base="nonempty_string">
+                               <xs:attribute name="lang" use="required" type="isoLangcode" />
+                       </xs:extension>
+               </xs:simpleContent>
+       </xs:complexType>
+       <xs:complexType name="title_or_description_enUS">
+               <xs:simpleContent>
+                       <xs:extension base="nonempty_string">
+                               <xs:attribute name="lang" use="required" type="isoLangcode_en_US" />
+                       </xs:extension>
+               </xs:simpleContent>
+       </xs:complexType>
+       
+       <!-- type used for referencing images -->
+       <xs:complexType name="image_entry">
+               <xs:attribute name="src" use="required" type="dumbPath" />
+       </xs:complexType>
+       
+       <!-- type for referencing manuals/readme docs -->
+       <xs:complexType name="information_entry">
+               <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+               <xs:attribute name="type" use="required" type="docType" />
+               <xs:attribute name="src" use="required" type="dumbPath" />
+       </xs:complexType>
+       
+       <!-- type used for the license information -->
+       <xs:complexType name="license_info">
+               <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+               <xs:attribute name="url" use="optional" type="xs:anyURI" />
+               <xs:attribute name="sourcecodeurl" use="optional" type="xs:anyURI" />
+       </xs:complexType>
+       
+       
+       
+       <!-- Combine the symple and complex types into the "real" PXML specification -->
+       
+       <xs:element name="PXML">
+               <xs:complexType>
+                       <xs:sequence>
+                               <!-- specify the <package> tag with info about the complete package, information providable:
+                                       author
+                                       version
+                                       title(s)
+                                       description(s)
+                                       icon
+                                       -->
+                               <xs:element name="package" minOccurs="1" maxOccurs="1">
+                                       <xs:complexType>
+                                               <xs:all>
+                                                       <!--Author info-->
+                                                       <xs:element name="author" type="author_data" minOccurs="1" />
+                                                       <!--App version info-->
+                                                       <xs:element name="version" type="app_version_info" minOccurs="1" />
+                                                       <!--Title-->
+                                                       <xs:element name="titles" minOccurs="1">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
+                                                                               <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Description-->
+                                                       <xs:element name="descriptions" minOccurs="0">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="title" type="title_or_description_enUS" minOccurs="0" maxOccurs="1" />
+                                                                               <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Icon-->
+                                                       <xs:element name="icon" type="image_entry" minOccurs="0" />
+                                               </xs:all>
+                                               <!--Package ID-->
+                                               <xs:attribute name="id" use="required" type="dumbFolderName" />
+                                       </xs:complexType>
+                               </xs:element>
+                               <!-- specify the <application> tag with info about a single program
+                                       executable call
+                                       author
+                                       version (of the application)
+                                       osversion (min OS version supported)
+                                       title(s) (allowing compatibility to <HF6, too!)
+                                       description(s) (allowing compatibility to <HF6, too!)
+                                       icon
+                                       license
+                                       preview pictures
+                                       info/manual/readme entry
+                                       categories
+                                       associations to file types
+                                       clockspeed
+                                       -->
+                               <xs:element name="application" minOccurs="1" maxOccurs="unbounded">
+                                       <xs:complexType>
+                                               <xs:all>
+                                                       <!--Execution params -->
+                                                       <xs:element name="exec" type="exec_params" minOccurs="1" />
+                                                       <!--Author info-->
+                                                       <xs:element name="author" type="author_data" minOccurs="1" />
+                                                       <!--App version info-->
+                                                       <xs:element name="version" type="app_version_info" minOccurs="1" />
+                                                       <!--OS Version info-->
+                                                       <xs:element name="osversion" type="os_version_info" minOccurs="0" />
+                                                       <!--Title-->
+                                                       <!-- via <titles> element, used for HF6+ -->
+                                                       <xs:element name="titles" minOccurs="1">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
+                                                                               <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Title-->
+                                                       <!-- via <title> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
+                                                       <xs:element name="title" type="title_or_description_enUS" minOccurs="0" />
+                                                       <!--Description-->
+                                                       <!-- via <descriptions> element, used for HF6+ -->
+                                                       <xs:element name="descriptions" minOccurs="0">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="description" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
+                                                                               <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Description-->
+                                                       <!-- via <description> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
+                                                       <xs:element name="description" type="title_or_description_enUS" minOccurs="0" />
+                                                       <!--Icon-->
+                                                       <xs:element name="icon" type="image_entry" minOccurs="0" />
+                                                       <!--License-->
+                                                       <xs:element name="licenses" minOccurs="1">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="license" type="license_info" minOccurs="1" maxOccurs="unbounded" />
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Preview pics-->
+                                                       <xs:element name="previewpics" minOccurs="0">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="pic" type="image_entry" minOccurs="0" maxOccurs="unbounded" />
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Info (aka manual or readme entry)-->
+                                                       <xs:element name="info" type="information_entry" minOccurs="0" />
+                                                       <!--Categories-->
+                                                       <xs:element name="categories" minOccurs="1">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="category" minOccurs="1" maxOccurs="unbounded">
+                                                                                       <xs:complexType>
+                                                                                               <xs:sequence>
+                                                                                                       <xs:element name="subcategory" minOccurs="0" maxOccurs="unbounded">
+                                                                                                               <xs:complexType>
+                                                                                                                       <xs:attribute name="name" type="fdoSubCategory" />
+                                                                                                               </xs:complexType>
+                                                                                                       </xs:element>
+                                                                                               </xs:sequence>
+                                                                                               <xs:attribute name="name" use="required" type="fdoCategory" />
+                                                                                       </xs:complexType>
+                                                                               </xs:element>
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Associations-->
+                                                       <xs:element name="associations" minOccurs="0">
+                                                               <xs:complexType>
+                                                                       <xs:sequence>
+                                                                               <xs:element name="association" type="association_data" maxOccurs="unbounded" />
+                                                                       </xs:sequence>
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                                       <!--Clockspeed-->
+                                                       <xs:element name="clockspeed" minOccurs="0">
+                                                               <xs:complexType>
+                                                                       <xs:attribute name="frequency" use="required" type="xs:positiveInteger" />
+                                                               </xs:complexType>
+                                                       </xs:element>
+                                               </xs:all>
+                                               <!--AppID-->
+                                               <xs:attribute name="id" use="required" type="dumbFolderName" />
+                                               <xs:attribute name="appdata" use="optional" type="dumbFolderName" />
+                                       </xs:complexType>
+                               </xs:element>
+                       </xs:sequence>
+               </xs:complexType>
+       </xs:element>
+</xs:schema>
\ No newline at end of file
diff --git a/pnd/gingerbread.png b/pnd/gingerbread.png
new file mode 100644 (file)
index 0000000..15f57bd
Binary files /dev/null and b/pnd/gingerbread.png differ
diff --git a/pnd/gingerbread.pxml b/pnd/gingerbread.pxml
new file mode 100644 (file)
index 0000000..fec4c4f
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PXML xmlns="http://openpandora.org/namespaces/PXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PXML_schema.xsd">
+<package id="package.android_gingerbread">
+  <titles>
+    <title lang="en_US">Android Gingerbread</title>
+  </titles>
+  <version major="2" minor="3" release="4" build="0" type="beta"/>
+  <author name="Google" website="http://www.android.com/"/>
+</package>
+<application id="android_gingerbread" appdata="android_gingerbread">
+  <titles>
+    <title lang="en_US">Android Gingerbread</title>
+  </titles>
+  <title lang="en_US">Android Gingerbread</title>
+
+  <descriptions>
+    <description lang="en_US">The whole Android 2.3.4 (Gingerbread) OS fitted inside a PND</description>
+  </descriptions>
+
+  <exec command="pandora/run.sh"/>
+
+  <icon src="pandora/gingerbread.png"/>
+
+  <author name="Google" website="http://www.android.com/"/>
+
+  <version major="2" minor="3" release="4" build="0" type="beta"/>
+
+  <licenses>
+    <license name="Apache License 2.0" url="http://www.apache.org/licenses/LICENSE-2.0" sourcecodeurl="http://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=android_pandora.git"/>
+  </licenses>
+
+  <info name="Android 2.3.4 Gingerbread notes" type="text/plain" src="pandora/readme.txt"/>
+  <categories>
+    <category name="System">
+    </category>
+  </categories>
+</application>
+</PXML>
diff --git a/pnd/pnd_make.sh b/pnd/pnd_make.sh
new file mode 100755 (executable)
index 0000000..3178ba3
--- /dev/null
@@ -0,0 +1,321 @@
+#!/bin/bash
+#
+# pnd_make.sh
+#
+# This script is meant to ease generation of a pnd file. Please consult the output
+# when running --help for a list of available parameters and an explaination of
+# those.
+#
+# Required tools when running the script:
+# bash
+# echo, cat, mv, rm
+# mkisofs or mksquashfs (the latter when using the -c param!)
+# xmllint (optional, only for validation of the PXML against the schema)
+
+
+PXML_schema=$(dirname ${0})/PXML_schema.xsd
+GENPXML_PATH=$(dirname ${0})/genpxml.sh
+
+# useful functions ...
+black='\E[30m'
+red='\E[31m'
+green='\E[32m'
+yellow='\E[33m'
+blue='\E[34m'
+magenta='\E[35m'
+cyan='\E[36m'
+white='\E[37m'
+
+check_for_tool()
+{
+       which $1 &> /dev/null
+       if [ "$?" -ne "0" ];
+       then
+               cecho "ERROR: Could not find the program '$1'. Please make sure
+that it is available in your PATH since it is required to complete your request." $red
+               exit 1
+       fi
+}
+
+cecho ()       # Color-echo. Argument $1 = message, Argument $2 = color
+{
+       local default_msg="No message passed."   # Doesn't really need to be a local variable.
+       message=${1:-$default_msg}               # Defaults to default message.
+       color=${2:-$black}                       # Defaults to black, if not specified.
+       echo -e "$color$message"
+       tput sgr0                                # Reset to normal.
+       return
+} 
+
+
+print_help()
+{
+       cat << EOSTREAM
+pnd_make.sh - A script to package "something" into a PND.
+
+Usage:
+  $(basename ${0}) {--directory|-d} <folder> {--pndname|-p} <file> [{--compress-squashfs|-c}]
+                   [{--genpxml} <file>] [{--icon|-i} <file>] [{--pxml|-x} <file>]
+                   [{--schema|-s} <file>] [{--help|-h}]
+
+
+Switches:
+  --compress-squashfs / -c  Define whether or not the pnd should be compressed using
+                            squashfs. If this parameter is selected, a compressed pnd
+                            will be created.
+
+  --directory / -d          Sets the folder that is to be used for the resulting pnd
+                            to <folder>. This option is mandatory for the script to
+                            function correctly.
+
+  --genpxml                 Sets the script used for generating a PXML file (if none
+                            is available already) to <file>. Please make sure to either
+                            provide a full path or prefix a script in the current folder
+                            with './' so that the script can actually be executed. If
+                            this variable is not specified, $GENPXML_PATH
+                            will be used.
+
+  --help / -h               Displays this help text.
+
+  --icon / -i               Sets the icon that will be appended in the pnd to <file>.
+
+  --pndname / -p            Sets the output filename of the resulting pnd to <file>.
+                            This option is mandatory for the script to function
+                            correctly.
+
+  --pxml / -x               Sets the PXML file that is to be used to <file>. If you
+                            neither provide a PXML file or set this entry to 'guess',
+                            an existing 'PXML.xml' in your selected '--directory'
+                            will be used, or the script $GENPXML_PATH
+                            will be called to try to generate a basic PXML file for you.
+
+  --schema / -s             Sets the schema file, that is to be used for validation,
+                            to <file. If this is not defined, the script will try to
+                            use the file '$PXML_schema'. If this fails,
+                            a warning is issued.
+
+If you select the option to create a compressed squashfs, a version >=4.0 of squashfs
+is required to be available in your PATH.
+EOSTREAM
+}
+
+
+# Parse command line parameters
+while [ "${1}" != "" ]; do
+       if [ "${1}" = "--compress-squashfs" ] || [ "${1}" = "-c" ];
+       then
+               SQUASH=1
+               shift 1
+       elif [ "${1}" = "--directory" ] || [ "${1}" = "-d" ];
+       then
+               FOLDER=$2
+               shift 2
+       elif [ "${1}" = "--genpxml" ];
+       then
+               GENPXML_PATH=$2
+               shift 2
+       elif [ "${1}" = "--help" ] || [ "${1}" = "-h" ];
+       then
+               print_help
+               exit 0
+       elif [ "${1}" = "--icon" ] || [ "${1}" = "-i" ];
+       then
+               ICON=$2
+               shift 2
+       elif [ "${1}" = "--pndname" ] || [ "${1}" = "-p" ];
+       then
+               PNDNAME=$2
+               shift 2
+       elif [ "${1}" = "--pxml" ] || [ "${1}" = "-x" ];
+       then
+               PXML=$2
+               shift 2
+       elif [ "${1}" = "--schema" ] || [ "${1}" = "-s" ]
+       then
+               PXML_schema=$2
+               shift 2
+       else
+               cecho "ERROR: '$1' is not a known argument. Printing --help and aborting." $red
+               print_help
+               exit 1
+       fi
+done
+
+
+# Generate a PXML if the param is set to Guess or it is empty.
+if [ ! $PXML ] || [ $PXML = "guess" ] && [ $PNDNAME ] && [ $FOLDER ];
+then
+       if [ -f $FOLDER/PXML.xml ]; # use the already existing PXML.xml file if there is one...
+       then
+               PXML=$FOLDER/PXML.xml
+               PXML_ALREADY_EXISTING="true"
+       else
+               if [ -f $GENPXML_PATH ];
+               then
+                       $GENPXML_PATH --src $FOLDER --dest $FOLDER --author $USER
+                       if [ -f $FOLDER/PXML.xml ];
+                       then
+                               PXML_GENERATED="true"
+                       else
+                               cecho "ERROR: Generating a PXML file using '$GENPXML_PATH' failed.
+Please generate a PXML file manually." $red
+                               exit 1
+                       fi
+               else
+                       cecho "ERROR: Could not find '$GENPXML_PATH' for generating a PXML file." $red
+                       exit 1
+               fi
+       fi
+fi
+
+
+# Probe if required variables were set
+echo -e
+cecho "Checking if all required variables were set." $green
+if [ ! $PNDNAME ] || [ ! $FOLDER ] || [ ! $PXML ];
+then
+       echo -e
+       cecho "ERROR: Not all required options were set! Please see the --help information below." $red
+       echo -e
+       print_help
+       exit 1
+else
+       echo "PNDNAME set to '$PNDNAME'."
+fi
+# Check if the selected folder actually exists
+if [ ! -d $FOLDER ];
+then
+       echo -e
+       cecho "ERROR: '$FOLDER' doesn't exist or is not a folder." $red
+       exit 1
+else
+       echo "FOLDER set to '$FOLDER'."
+fi
+# Check if the selected PXML file actually exists
+if [ ! -f $PXML ];
+then
+       echo -e
+       cecho "ERROR: '$PXML' doesn't exist or is not a file." $red
+       exit 1
+else
+       if [ $PXML_ALREADY_EXISTING ];
+       then
+               echo "You have not explicitly specified a PXML to use, but an existing file was
+found. Will be using this one."
+       elif [ $PXML_GENERATED ];
+       then
+               echo "A PXML file was generated for you using '$GENPXML_PATH'. This file will
+not be removed at the end of this script because you might want to review it, adjust
+single entries and rerun the script to generate a pnd with a PXML file with all the
+information you want to have listed."
+       fi
+       echo "PXML set to '$PXML'."
+fi
+
+# Print the other variables:
+if [ $ICON ];
+then
+       if [ ! -f $ICON ]
+       then
+               cecho "WARNING: '$ICON' doesn't exist, will not append the selected icon to the pnd." $red
+       else
+               echo "ICON set to '$ICON'."
+               USE_ICON="true"
+       fi
+fi
+if [ $SQUASH ];
+then
+       echo "Will use a squashfs for '$PNDNAME'."
+fi
+
+
+# Validate the PXML file (if xmllint is available)
+# Errors and problems in this section will be shown but are not fatal.
+echo -e
+cecho "Trying to validate '$PXML' now. Will be using '$PXML_schema' to do so." $green
+which xmllint &> /dev/null
+if [ "$?" -ne "0" ];
+then
+       VALIDATED=false
+       cecho "WARNING: Could not find 'xmllint'. Validity check of '$PXML' is not possible!" $red
+else
+       if [ ! -f "$PXML_schema" ];
+       then
+               VALIDATED=false
+               cecho "WARNING: Could not find '$PXML_schema'. If you want to validate your
+PXML file please make sure to provide a schema using the --schema option." $red
+       else
+               xmllint --noout --schema $PXML_schema $PXML
+               if [ "$?" -ne "0" ]; then VALIDATED=false; else VALIDATED=true; fi
+       fi
+fi
+# Print some message at the end about the validation in case the user missed the output above
+if [ $VALIDATED = "false" ]
+then
+       cecho "WARNING: Could not successfully validate '$PXML'. Please check the output
+above. This does not mean that your pnd will be broken. Either you are not following the strict
+syntax required for validation or you don't have all files/programs required for validating." $red
+else
+       cecho "Your file '$PXML' was validated successfully. The resulting pnd should
+work nicely with libpnd." $green
+fi
+
+
+# Make iso from folder
+echo -e
+cecho "Creating an iso file based on '$FOLDER'." $green
+if [ $SQUASH ];
+then
+       check_for_tool mksquashfs
+       if [ $(mksquashfs -version | awk 'BEGIN{r=0} $3>=4{r=1} END{print r}') -eq 0 ];
+       then
+               cecho "ERROR: Your squashfs version is older then version 4, please upgrade to 4.0 or later" $red
+               exit 1
+       fi
+       mksquashfs $FOLDER $PNDNAME.iso # -nopad -no-recovery
+else
+       check_for_tool mkisofs
+       mkisofs -o $PNDNAME.iso -R $FOLDER
+fi
+
+# Check that the iso file was actually created before continuing
+if [ ! -f $PNDNAME.iso ];
+then
+       cecho "ERROR: The temporary file '$PNDNAME.iso' could not be created.
+Please check the output above for any errors and retry after fixing them. Aborting." $red
+       exit 1
+fi
+
+
+# Append pxml to iso
+echo -e
+cecho "Appending '$PXML' to the created iso file." $green
+cat $PNDNAME.iso $PXML > $PNDNAME
+rm $PNDNAME.iso #cleanup
+
+
+# Append icon if specified and available
+if [ $USE_ICON ];
+then
+       echo -e
+       cecho "Appending the icon '$ICON' to the pnd." $green
+       mv $PNDNAME $PNDNAME.tmp
+       cat $PNDNAME.tmp $ICON > $PNDNAME # append icon
+       rm $PNDNAME.tmp #cleanup
+fi
+
+
+# Final message
+echo -e
+if [ -f $PNDNAME ];
+then
+       cecho "Successfully finished creating the pnd '$PNDNAME'." $green
+else
+       cecho "There seems to have been a problem and '$PNDNAME' was not created. Please check
+the output above for any error messages. A possible cause for this is that there was
+not enough space available." $red
+       exit 1
+fi
+
+
+#if [ $PXML = "guess" ];then rm $FOLDER/PXML.xml; fi #cleanup
diff --git a/pnd/readme.txt b/pnd/readme.txt
new file mode 100644 (file)
index 0000000..2578157
--- /dev/null
@@ -0,0 +1,33 @@
+
+About
+-----
+
+This is the whole Android 2.3.4 (Gingerbread) OS, set up to run from
+a PND. It is based on TI rowboat Android project.
+
+
+Requirements
+------------
+
+At least 300MB free on SD card, SuperZaxxon beta5 or newer pandora firmware.
+
+
+Notes
+-----
+
+- do not remove the SD card that contains the .pnd file, doing so will
+  crash everything and corrupt data.
+- Android only supports one removable SD card, and that is set up to
+  be SD2 (right slot). So if you want to swap cards while Android is
+  running, and want it to see card change, place the .pnd in a card on
+  the left slot.
+- It should be possible to return to pandora's OS by running
+  "Kill Android" from Android OS itself.
+- external wifi sticks won't work due to Android limitations.
+
+
+Sources
+-------
+
+Changes and build instructions should be available at:
+http://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=android_pandora.git
diff --git a/pnd/run.sh b/pnd/run.sh
new file mode 100755 (executable)
index 0000000..98894e8
--- /dev/null
@@ -0,0 +1,248 @@
+#!/bin/bash
+# run/kill Android from Linux
+# (c) Grazvydas "notaz" Ignotas, 2012
+set -e -x
+
+if [ "`id -u`" != "0" ]; then
+  gksudo -m "Android needs root privileges to run, please enter your password" $0
+  exit 0
+fi
+
+root=/mnt/android
+mpoint_main=`pwd`
+kernel_ver=`uname -r`
+
+trap onexit 1 2 3 15 EXIT
+
+err()
+{
+  zenity --error --text "$1"
+  echo "$1"
+}
+
+onexit()
+{
+  set +e +x
+
+  list="/sbin/ueventd /system/bin/logcat /system/bin/sh /system/bin/servicemanager
+    /system/bin/vold /system/bin/netd /system/bin/rild /system/bin/installd /sbin/adbd
+    /system/bin/mediaserver /system/bin/keystore /system/bin/debuggerd
+    /system/bin/dbus-daemon"
+  for pr in $list; do
+    pb=`basename $pr`
+    p=`ps -C $pb -o pid=,cmd= | grep $pr | awk '{print $1}'`
+    test -n "$p" && echo kill $p $pr && kill $p
+  done
+  for pr in $list; do
+    pb=`basename $pr`
+    p=`ps -C $pb -o pid=,cmd= | grep $pr | awk '{print $1}'`
+    test -n "$p" && echo kill -9 $p $pr && kill -9 $p
+  done
+  list2=`ps ax | grep -v grep | grep -e ':.. /system/' -e ':.. /data/' -e ' android\.' | awk '{print $1}'`
+  list3=`lsof | grep '/dev/binder' | awk '{print $2}' | uniq`
+  for p in $list2 $list3; do
+    test -n "$p" && echo kill $p && kill $p
+  done
+  
+  sleep 0.5
+  
+  for i in `seq 5`; do
+    sdmounts=`grep -e '\.android_secure' -e 'secure/asec' -e 'mnt/sdcard' /proc/mounts`
+    if [ -n "$sdmounts" ]; then
+      echo "$sdmounts" | awk '{print $2}' | xargs umount
+    fi
+
+    umount $root/mnt/asec
+    umount $root/debug
+    umount $root/dev/pts
+    umount $root/dev
+    umount $root/proc
+    umount $root/sys
+    umount $root/data
+    umount $root/system || umount -i $root/system
+  
+    sleep 1
+    if umount $root; then
+      break;
+    fi
+  done
+
+  if ! pidof X > /dev/null; then
+    # need to restore SGX, X and friends
+    rmmod bufferclass_ti omaplfb pvrsrvkm
+    /etc/init.d/pvr-init start
+    rmmod wl1251_sdio # hmh
+    /etc/init.d/NetworkManager start
+    /etc/init.d/slim-init start
+  fi
+}
+
+
+# logger, binder and ashmem
+delay=0
+if ! test -e /dev/log_events; then
+  modprobe logger
+  delay=0.5
+fi
+if ! test -e /dev/binder; then
+  modprobe binder
+  delay=0.5
+fi
+if ! test -e /dev/ashmem; then
+  modprobe ashmem
+  delay=0.5
+fi
+sleep $delay
+if test ! -e /dev/log_events -o ! -e /dev/binder -o ! -e /dev/ashmem; then
+  err "could not load required Android modules,\n\
+perhaps you are running unsupported\nfirmware/kernel."
+  exit 1
+fi
+
+if ! test -e rootfs.ext2; then
+  if ! cp -v pandora/default_rootfs.ext2 rootfs.ext2; then
+    err "file copy failed, not enough space?"
+    exit 1
+  fi
+fi
+
+if ! test -e data.ext4; then
+  size=`zenity --entry --text="\
+    Android needs a partition to store it's data and installed programs.\n\
+    This will be stored in preallocated file of size that you have to select now.\n\
+    Android documentation recommends at least 150MB, going below 50MB will cause\n\
+    problems, as well as over 2GB if you are running from FAT partitioned card.\n\n\
+    Please select size of Android data partition (in megabytes):\n\
+    (creation may take several minutes after you press OK)" \
+      --entry-text=150`
+  if test -z "$size" || ! dd if=/dev/zero of=data.ext4 bs=1M count=$size; then
+    err "failed to create file, not enough space? bad input?"
+    exit 1
+  fi
+  if ! mkfs.ext4 -O ^has_journal -m 0 -F data.ext4; then
+    err "failed to create filesystem"
+    exit 1
+  fi
+fi
+
+if ! fsck.ext4 -y data.ext4 || ! fsck.ext2 -y rootfs.ext2; then
+  if [ "$?" -ge "4" ]; then
+    err "file corruption detected, try clearing appdata."
+    exit 1
+  fi
+fi
+
+mkdir -p $root
+mount -o loop,rw,noatime rootfs.ext2 $root
+mount --bind $mpoint_main/system/ $root/system/
+mount -o loop,rw,noatime data.ext4 $root/data
+
+mkdir -p $root/vendor
+
+# handle SGX
+mkdir -p $root/vendor/pvr
+echo "0 0 android" > $root/vendor/pvr/egl.cfg
+
+# load the right SGX driver
+sgx_kernel_loaded=false
+if ! grep -q '1.5.15.2766' /proc/pvr/version 2> /dev/null; then
+  echo have to change SGX kernel driver
+  /etc/init.d/pvr-init stop || true
+  if test -d $mpoint_main/pandora/pvr/$kernel_ver; then
+    # found with this android release
+    pvrbase=$mpoint_main/pandora/pvr/$kernel_ver
+  elif test -d /lib/modules/$kernel_ver/kernel/drivers/gpu/pvr/1.5.15.2766; then
+    # found in firmware
+    pvrbase=/lib/modules/$kernel_ver/kernel/drivers/gpu/pvr/1.5.15.2766
+  fi
+
+  if [ "x$pvrbase" != "x" ]; then
+    if insmod $pvrbase/pvrsrvkm.ko && insmod $pvrbase/omaplfb.ko; then
+      sgx_kernel_loaded=true
+      # optional
+      insmod $pvrbase/bufferclass_ti.ko || true
+    fi
+  fi
+else
+  sgx_kernel_loaded=true
+fi
+
+sgx_user_ready=false
+#if false; then
+if $sgx_kernel_loaded; then
+  es=`cat /etc/powervr-esrev`
+  if [ "x$es" = "x" ]; then
+    err "unable to determine SGX version"
+  else
+    es="es$es"
+    # for some braindead reason 103 is named 121 too
+    sgx_ver=121
+    if [ "$es" = "es5" ]; then
+      sgx_ver=125
+    else
+      ln -fs /system/lib/$es/libGLESv2_POWERVR_SGX530_121.so $root/vendor/pvr/
+      ln -fs /system/lib/$es/libGLESv1_CM_POWERVR_SGX530_121.so $root/vendor/pvr/
+    fi
+    ln -fs /system/bin/$es/pvrsrvinit $root/vendor/pvr/
+    ln -fs /system/lib/$es/libPVRScopeServices.so $root/vendor/pvr/
+    ln -fs /system/lib/$es/libglslcompiler.so $root/vendor/pvr/
+    ln -fs /system/lib/$es/libsrv_um.so $root/vendor/pvr/
+    ln -fs /system/lib/$es/libIMGegl.so $root/vendor/pvr/
+
+    echo "0 1 POWERVR_SGX530_$sgx_ver" >> $root/vendor/pvr/egl.cfg
+    sgx_user_ready=true
+  fi
+fi
+
+if ! $sgx_user_ready; then
+  err "SGX driver load failed, no 3D support"
+fi
+
+# stop X and interfering things, get wifi ready
+set +e
+if pidof xfce4-session > /dev/null; then
+  user=`cat /tmp/currentuser`
+  # most often doesn't work :(
+  #if ! test -z "$user"; then
+  #  su -c 'xfce4-session-logout --logout' $user
+  #fi
+fi
+/etc/init.d/NetworkManager stop
+modprobe mac80211
+/etc/init.d/wl1251-init start
+/etc/init.d/slim-init stop
+sleep 1 # for wlan0, hmh..
+chvt 2 & # may hang..
+sleep 1
+killall chvt 2> /dev/null || true
+ifconfig wlan0 down
+set -e
+
+cp /etc/pointercal $root/vendor/
+cp /lib/modules/$kernel_ver/kernel/drivers/net/wireless/wl1251/wl1251_sdio.ko $root/vendor/
+mkdir -p $root/vendor/firmware
+cp /lib/firmware/brf6300.bin $root/vendor/firmware/
+
+# some cleanup
+rm -rf $root/acct/uid/*
+
+chroot $root /init &
+
+# wait for a message
+while true; do
+  sleep 1
+
+  if nc -V 2> /dev/null | grep -q GNU; then
+    # GNU nc always fails
+    msg=`nc -l -p 36936 localhost || true`
+  else
+    msg=`nc -l localhost 36936`
+  fi
+  if [ "x$msg" = "xquit" ]; then
+    break
+  fi
+  echo "unknown message: $msg"
+done
+
+# real init can't be killed this way
+killall init
diff --git a/pvr/3.2.17/bufferclass_ti.ko b/pvr/3.2.17/bufferclass_ti.ko
new file mode 100644 (file)
index 0000000..87ec3af
Binary files /dev/null and b/pvr/3.2.17/bufferclass_ti.ko differ
diff --git a/pvr/3.2.17/omaplfb.ko b/pvr/3.2.17/omaplfb.ko
new file mode 100644 (file)
index 0000000..2754461
Binary files /dev/null and b/pvr/3.2.17/omaplfb.ko differ
diff --git a/pvr/3.2.17/pvrsrvkm.ko b/pvr/3.2.17/pvrsrvkm.ko
new file mode 100644 (file)
index 0000000..0a22e3f
Binary files /dev/null and b/pvr/3.2.17/pvrsrvkm.ko differ
diff --git a/pvr/gfx_rel_es2.x_android/eglinfo b/pvr/gfx_rel_es2.x_android/eglinfo
new file mode 100755 (executable)
index 0000000..a0871f1
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/eglinfo differ
diff --git a/pvr/gfx_rel_es2.x_android/gralloc.omap3.so b/pvr/gfx_rel_es2.x_android/gralloc.omap3.so
new file mode 100644 (file)
index 0000000..5e5da9d
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/gralloc.omap3.so differ
diff --git a/pvr/gfx_rel_es2.x_android/install.sh b/pvr/gfx_rel_es2.x_android/install.sh
new file mode 100755 (executable)
index 0000000..2e74bc6
--- /dev/null
@@ -0,0 +1,429 @@
+#!/bin/sh
+
+# PowerVR SGX DDK for Embedded Linux - installation script
+#
+# Copyright    2004-2006 by Imagination Technologies Limited.
+#                              All rights reserved.  No part of this software, either
+#                              material or conceptual may be copied or distributed,
+#                              transmitted, transcribed, stored in a retrieval system
+#                              or translated into any human or computer language in any
+#                              form by any means, electronic, mechanical, manual or
+#                              other-wise, or disclosed to third parties without the
+#                              express written permission of Imagination Technologies
+#                              Limited, Unit 8, HomePark Industrial Estate,
+#                              King's Langley, Hertfordshire, WD4 8LZ, U.K.
+
+# Auto-generated for omap3430_android from embedded.pj 1.5.15.2766
+#
+
+# PVR Consumer services version number
+#
+PVRVERSION=1.5.15.2766
+
+# Where we record what we did so we can undo it.
+#
+DDK_INSTALL_LOG=/powervr_ddk_install.log
+
+# basic installation function
+# $1=blurb
+#
+bail()
+{
+    echo "$1" >&2
+    echo "" >&2
+    echo "Installation failed" >&2
+    exit 1
+}
+
+# basic installation function
+# $1=fromfile, $2=destfilename, $3=blurb $4=chmod-flags
+#
+install_file()
+{
+       DESTFILE=${DISCIMAGE}$2
+       DESTDIR=`dirname $DESTFILE`
+
+       if [ ! -e $1 ]; then
+                       [ -n "$VERBOSE" ] && echo "skipping file $1 -> $2"
+                return
+       fi
+       
+       # Destination directory - make sure it's there and writable
+       #
+       if [ -d "${DESTDIR}" ]; then
+               if [ ! -w "${DESTDIR}" ]; then
+                       bail "${DESTDIR} is not writable."
+               fi
+       else
+               $DOIT mkdir -p ${DESTDIR} || bail "Couldn't mkdir -p ${DESTDIR}"
+               [ -n "$VERBOSE" ] && echo "Created directory `dirname $2`"
+       fi
+
+       # If it already exists then back it up if there isn't a back-up already.
+       #
+       #if [ -f $DESTFILE ]; then
+       #       if [ ! -f ${DESTFILE}.old ]; then
+       #               $DOIT mv $DESTFILE ${DESTFILE}.old ||
+       #                               bail "Couldn't back up $DESTFILE";
+       #               [ -n "$VERBOSE" ] && echo "Backed up $DESTFILE";
+       #       fi
+       #fi
+
+       # Delete the original so that permissions don't persist.
+       #
+       $DOIT rm -f $DESTFILE
+
+       $DOIT cp -f $1 $DESTFILE || bail "Couldn't copy $1 to $DESTFILE"
+       $DOIT chmod 644 ${DESTFILE}
+       if [ "$4" ]; then
+               $DOIT chmod $4 ${DESTFILE};
+       fi
+       echo "$3 `basename $1` -> $2"
+       $DOIT echo "file $2" >>${DISCIMAGE}${DDK_INSTALL_LOG}
+}
+
+# Install a symbolic link
+# $1=fromfile, $2=destfilename
+#
+install_link()
+{
+       DESTFILE=${DISCIMAGE}$2
+       DESTDIR=`dirname $DESTFILE`
+
+       if [ ! -e ${DESTDIR}/$1 ]; then
+                [ -n "$VERBOSE" ] && echo $DOIT "skipping link ${DESTDIR}/$1"
+                return
+       fi
+
+       # Destination directory - make sure it's there and writable
+       #
+       if [ -d "${DESTDIR}" ]; then
+               if [ ! -w "${DESTDIR}" ]; then
+                       bail "${DESTDIR} is not writable."
+               fi
+       else
+               $DOIT mkdir -p ${DESTDIR} || bail "Couldn't mkdir -p ${DESTDIR}"
+               [ -n "$VERBOSE" ] && echo "Created directory `dirname $2`"
+       fi
+
+       # Delete the original so that permissions don't persist.
+       #
+       $DOIT rm -f $DESTFILE
+
+       $DOIT ln -s $1 $DESTFILE || bail "Couldn't link $1 to $DESTFILE"
+       $DOIT echo "link $2" >>${DISCIMAGE}${DDK_INSTALL_LOG}
+       [ -n "$VERBOSE" ] && echo " linked `basename $1` -> $2"
+}
+
+# Tree-based installation function
+# $1 = fromdir $2=destdir $3=blurb
+#
+install_tree()
+{
+       # Make the destination directory if it's not there
+       #
+       if [ ! -d ${DISCIMAGE}$2 ]; then
+               $DOIT mkdir -p ${DISCIMAGE}$2 || bail "Couldn't mkdir -p ${DISCIMAGE}$2"
+       fi
+       if [ "$DONTDOIT" ]; then
+               echo "### tar -C $1 -cf - . | tar -C ${DISCIMAGE}$2 -x${VERBOSE}f -" 
+       else
+               tar -C $1 -cf - . | tar -C ${DISCIMAGE}$2 -x${VERBOSE}f -
+       fi
+       if [ $? = 0 ]; then
+               echo "Installed $3 in ${DISCIMAGE}$2"
+               $DOIT echo "tree $2" >>${DISCIMAGE}${DDK_INSTALL_LOG}
+       else
+               echo "Failed copying $3 from $1 to ${DISCIMAGE}$2"
+       fi
+}
+
+# Uninstall something.
+#
+uninstall()
+{
+       if [ ! -f ${DISCIMAGE}${DDK_INSTALL_LOG} ]; then
+               echo "Nothing to un-install."
+               return;
+       fi
+
+       BAD=0
+       VERSION=""
+       while read type data; do
+               case $type in
+               version)        # do nothing
+                       echo "Uninstalling existing version $data"
+                       VERSION="$data"
+                       ;;
+               link|file) 
+                       if [ -z "$VERSION" ]; then
+                               BAD=1;
+                               echo "No version record at head of ${DISCIMAGE}${DDK_INSTALL_LOG}"
+                       elif ! $DOIT rm -f ${DISCIMAGE}${data}; then
+                               BAD=1;
+                       else
+                               [ -n "$VERBOSE" ] && echo "Deleted $type $data"
+                       fi
+                       ;;
+               tree)           # so far, do nothing
+                       ;;
+               esac
+       done < ${DISCIMAGE}${DDK_INSTALL_LOG};
+
+       if [ $BAD = 0 ]; then
+               echo "Uninstallation completed."
+               $DOIT rm -f ${DISCIMAGE}${DDK_INSTALL_LOG}
+       else
+               echo "Uninstallation failed!!!"
+       fi
+}
+
+# Help on how to invoke
+#
+usage()
+{
+       echo "usage: $0 [options...]"
+       echo ""
+       echo "Options: -v            verbose mode"
+       echo "         -n            dry-run mode"
+       echo "         -u            uninstall-only mode"
+       echo "         --no-pvr      don't install PowerVR driver components"
+       echo "         --no-x        don't install X window system"
+       echo "         --no-display  don't install integrated PowerVR display module"
+       echo "         --no-bcdevice don't install buffer class device module"
+       echo "         --root path   use path as the root of the install file system"
+       exit 1
+}
+
+install_pvr()
+{
+       $DOIT echo "version 1.5.15.2766" >${DISCIMAGE}${DDK_INSTALL_LOG}
+       # Install the standard scripts
+       #
+       install_file rc.pvr /system/bin/sgx/rc.pvr "boot script" a+x
+
+       # Check the kernel module directory is there
+       #
+       if [ ! -d "${DISCIMAGE}" ]; then
+               echo ""
+               echo "Can't find  on file system installation root"
+               echo -n "There is no kernel module area setup yet. "
+               if [ "$from" = target ]; then
+                       echo "On your build machine you should invoke:"
+                       echo
+                       echo " $ cd \$KERNELDIR"
+                       echo " $ make INSTALL_MOD_PATH=\$DISCIMAGE modules_install"
+               else
+                       echo "You should invoke:"
+                       echo
+                       echo " $ cd $KERNELDIR"
+                       echo " $ make INSTALL_MOD_PATH=$DISCIMAGE modules_install"
+               fi
+               echo
+               exit 1;
+       fi
+
+       # Install the standard kernel modules
+       # Touch some files that might not exist so that busybox/modprobe don't complain
+       #
+               install_file pvrsrvkm.ko /system/bin/sgx/pvrsrvkm.ko "kernel module"
+
+
+
+if [ -z "$NO_DISPLAYMOD" ]; then
+               install_file omaplfb.ko /system/bin/sgx/omaplfb.ko "kernel module"
+
+fi
+
+if [ -z "$NO_BCDEVICE" ]; then
+               install_file bc_example.ko /system/bin/sgx/bc_example.ko "kernel module"
+
+fi
+
+#      $DOIT touch ${DISCIMAGE}/lib/modules/modprobe.conf
+#      $DOIT touch ${DISCIMAGE}/etc/modules.conf
+#      $DOIT rm -f /tmp/modules.$$.tmp
+
+       # Install the standard libraries
+       #
+
+       install_file libGLESv1_CM_POWERVR_SGX530_121.so /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_121.so.1.1.15.2766 "shared library"
+       install_link libGLESv1_CM_POWERVR_SGX530_121.so.1.1.15.2766 /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_121.so
+
+       install_file libGLESv2_POWERVR_SGX530_121.so /system/lib/egl/libGLESv2_POWERVR_SGX530_121.so.1.1.15.2766 "shared library"
+       install_link libGLESv2_POWERVR_SGX530_121.so.1.1.15.2766 /system/lib/egl/libGLESv2_POWERVR_SGX530_121.so
+
+       install_file libglslcompiler.so /system/lib/libglslcompiler.so.1.1.15.2766 "shared library"
+       install_link libglslcompiler.so.1.1.15.2766 /system/lib/libglslcompiler.so
+
+
+       install_file libIMGegl.so /system/lib/libIMGegl.so.1.1.15.2766 "shared library"
+       install_link libIMGegl.so.1.1.15.2766 /system/lib/libIMGegl.so
+       install_file libEGL_POWERVR_SGX530_121.so /system/lib/egl/libEGL_POWERVR_SGX530_121.so.1.1.15.2766 "shared library"
+       install_link libEGL_POWERVR_SGX530_121.so.1.1.15.2766 /system/lib/egl/libEGL_POWERVR_SGX530_121.so
+       install_file libpvr2d.so /system/lib/libpvr2d.so.1.1.15.2766 "shared library"
+       install_link libpvr2d.so.1.1.15.2766 /system/lib/libpvr2d.so
+
+
+
+       install_file libsrv_um.so /system/lib/libsrv_um.so.1.1.15.2766 "shared library"
+       install_link libsrv_um.so.1.1.15.2766 /system/lib/libsrv_um.so
+       install_file libPVRScopeServices.so /system/lib/libPVRScopeServices.so.1.1.15.2766 "shared library"
+       install_link libPVRScopeServices.so.1.1.15.2766 /system/lib/libPVRScopeServices.so
+
+
+
+       install_file gralloc.omap3.so /system/lib/hw/gralloc.omap3.so.1.1.15.2766 "shared library"
+       install_link gralloc.omap3.so.1.1.15.2766 /system/lib/hw/gralloc.omap3.so
+
+       install_file libfakehal.so /system/lib/libfakehal.so.1.1.15.2766 "shared library"
+       install_link libfakehal.so.1.1.15.2766 /system/lib/libfakehal.so
+
+       install_file libpvrANDROID_WSEGL.so /system/lib/libpvrANDROID_WSEGL.so.1.1.15.2766 "shared library"
+       install_link libpvrANDROID_WSEGL.so.1.1.15.2766 /system/lib/libpvrANDROID_WSEGL.so
+
+       install_file libsfutil.so /system/lib/libsfutil.so.1.1.15.2766 "shared library"
+       install_link libsfutil.so.1.1.15.2766 /system/lib/libsfutil.so
+
+
+       # Install the standard executables
+       #
+
+       install_file pvrsrvinit /system/bin/pvrsrvinit "binary" a+x
+       install_file sgx_init_test /system/bin/sgx_init_test "binary" a+x
+
+
+
+       # Install the standard unittests
+       #
+       install_file gles2test1 /system/bin/gles2test1 "binary" a+x
+       install_file glsltest1_vertshader.txt /system/bin/glsltest1_vertshader.txt "shader" a+x
+       install_file glsltest1_fragshaderA.txt /system/bin/glsltest1_fragshaderA.txt "shader" a+x
+       install_file glsltest1_fragshaderB.txt /system/bin/glsltest1_fragshaderB.txt "shader" a+x
+       install_file gles2_texture_stream /system/bin/gles2_texture_stream "binary" a+x
+
+       install_file gles1test1 /system/bin/gles1test1 "binary" a+x
+       install_file gles1_texture_stream /system/bin/gles1_texture_stream "binary" a+x
+
+       install_file services_test /system/bin/services_test "binary" a+x
+       install_file sgx_blit_test /system/bin/sgx_blit_test "binary" a+x
+       install_file sgx_flip_test /system/bin/sgx_flip_test "binary" a+x
+       install_file sgx_render_flip_test /system/bin/sgx_render_flip_test "binary" a+x
+       install_file pvr2d_test /system/bin/pvr2d_test "binary" a+x
+       install_file eglinfo /system/bin/eglinfo "binary" a+x
+##GLESUNITTEST(egl_test)dnl
+##GLES2UNITTEST(gl2info)dnl
+##ifelse(SUPPORT_PVR2D,1,[[UNITTEST(pvr2dtest)]])dnl
+##ifdef([[_BUFFER_CLASS_DEVICE_]],
+##     if [ -z "$NO_BCDEVICE" ]; then
+##     UNITTEST(sw_camera_ctrl)dnl
+##     UNITTEST(ogles_camera_ext)dnl
+##fi)
+
+       install_file hal_client_test /system/bin/hal_client_test "binary" a+x
+       install_file hal_server_test /system/bin/hal_server_test "binary" a+x
+       install_file framebuffer_test /system/bin/framebuffer_test "binary" a+x
+       install_file texture_benchmark /system/bin/texture_benchmark "binary" a+x
+       install_file xmultiegltest /system/bin/xmultiegltest "binary" a+x
+       VENDOR_LIB_NAME=`echo libEGL_POWERVR_SGX530_121.so | sed 's,libEGL_\|\.so,,g'`
+       $DOIT cat >${DISCIMAGE}/system/lib/egl/egl.cfg <<EOF
+0 0 android
+0 1 ${VENDOR_LIB_NAME}
+EOF
+       $DOIT echo "file /system/lib/egl/egl.cfg" >>${DISCIMAGE}${DDK_INSTALL_LOG}
+}
+
+
+# Work out if there are any special instructions.
+#
+while [ "$1" ]; do
+       case "$1" in
+       -v|--verbose)
+               VERBOSE=v;
+               ;;
+       -r|--root)
+               DISCIMAGE=$2;
+               shift; shift;
+               ;;
+       -u|--uninstall)
+               UNINSTALL=y
+               ;;
+       -n)     DOIT=echo
+               ;;
+       --no-pvr)
+               NO_PVR=y
+               ;;
+       --no-x)
+               NO_X=y
+               ;;
+       --no-display)
+               NO_DISPLAYMOD=y
+               ;;
+       --no-bcdevice)
+               NO_BCDEVICE=y
+               ;;
+       -h | --help | *)        
+               usage
+               ;;
+       esac
+       shift
+done
+
+# Find out where we are?  On the target?  On the host?
+#
+case `uname -m` in
+arm*)  host=0;
+               from=target;
+               DISCIMAGE=/;
+               ;;
+sh*)   host=0;
+               from=target;
+               DISCIMAGE=/;
+               ;;
+i?86*) host=1;
+               from=host;
+               if [ -z "$DISCIMAGE" ]; then    
+                       echo "DISCIMAGE must be set for installation to be possible." >&2
+                       exit 1
+               fi
+               ;;
+x86_64*)       host=1;
+               from=host;
+               if [ -z "$DISCIMAGE" ]; then    
+                       echo "DISCIMAGE must be set for installation to be possible." >&2
+                       exit 1
+               fi
+               ;;
+*)             echo "Don't know host to perform on machine type `uname -m`" >&2;
+               exit 1
+               ;;
+esac
+
+if [ ! -d "$DISCIMAGE" ]; then
+       echo "$0: $DISCIMAGE does not exist." >&2
+       exit 1
+fi
+
+echo
+echo "Installing PowerVR Consumer/Embedded DDK 1.5.15.2766 on $from"
+echo
+echo "File system installation root is $DISCIMAGE"
+echo
+
+# Uninstall whatever's there already.
+#
+uninstall
+[ -n "$UNINSTALL" ] && exit
+
+#  Now start installing things we want.
+#
+[ -z "$NO_PVR" ] && install_pvr
+
+# All done...
+#
+echo 
+echo "Installation complete!"
+if [ "$host" = 0 ]; then
+   echo "You may now reboot your target."
+fi
+echo
diff --git a/pvr/gfx_rel_es2.x_android/libEGL_POWERVR_SGX530_121.so b/pvr/gfx_rel_es2.x_android/libEGL_POWERVR_SGX530_121.so
new file mode 100644 (file)
index 0000000..23364b9
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libEGL_POWERVR_SGX530_121.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libGLESv1_CM_POWERVR_SGX530_121.so b/pvr/gfx_rel_es2.x_android/libGLESv1_CM_POWERVR_SGX530_121.so
new file mode 100644 (file)
index 0000000..b9037c2
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libGLESv1_CM_POWERVR_SGX530_121.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libGLESv2_POWERVR_SGX530_121.so b/pvr/gfx_rel_es2.x_android/libGLESv2_POWERVR_SGX530_121.so
new file mode 100644 (file)
index 0000000..29a4843
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libGLESv2_POWERVR_SGX530_121.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libIMGegl.so b/pvr/gfx_rel_es2.x_android/libIMGegl.so
new file mode 100644 (file)
index 0000000..8da1910
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libIMGegl.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libPVRScopeServices.so b/pvr/gfx_rel_es2.x_android/libPVRScopeServices.so
new file mode 100644 (file)
index 0000000..5a65c34
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libPVRScopeServices.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libfakehal.so b/pvr/gfx_rel_es2.x_android/libfakehal.so
new file mode 100644 (file)
index 0000000..0f5bf2e
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libfakehal.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libglslcompiler.so b/pvr/gfx_rel_es2.x_android/libglslcompiler.so
new file mode 100644 (file)
index 0000000..165d6e9
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libglslcompiler.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libpvr2d.so b/pvr/gfx_rel_es2.x_android/libpvr2d.so
new file mode 100644 (file)
index 0000000..d25c138
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libpvr2d.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libpvrANDROID_WSEGL.so b/pvr/gfx_rel_es2.x_android/libpvrANDROID_WSEGL.so
new file mode 100644 (file)
index 0000000..3031f99
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libpvrANDROID_WSEGL.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libsfutil.so b/pvr/gfx_rel_es2.x_android/libsfutil.so
new file mode 100644 (file)
index 0000000..ac03141
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libsfutil.so differ
diff --git a/pvr/gfx_rel_es2.x_android/libsrv_um.so b/pvr/gfx_rel_es2.x_android/libsrv_um.so
new file mode 100644 (file)
index 0000000..4bae92b
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/libsrv_um.so differ
diff --git a/pvr/gfx_rel_es2.x_android/pvrsrvinit b/pvr/gfx_rel_es2.x_android/pvrsrvinit
new file mode 100755 (executable)
index 0000000..1bbec3d
Binary files /dev/null and b/pvr/gfx_rel_es2.x_android/pvrsrvinit differ
diff --git a/rc.pvr b/rc.pvr
new file mode 100755 (executable)
index 0000000..b3ae23e
--- /dev/null
+++ b/rc.pvr
@@ -0,0 +1,44 @@
+#!/system/bin/sh
+
+load_pvr()
+{
+       echo "load_pvr"
+
+       # rely on something else to set modules up..
+       chmod 0666 /dev/pvrsrvkm
+       chmod 0666 /dev/bc_example
+       /system/bin/pvrsrvinit
+
+       return 0;
+}
+
+unload_pvr()
+{
+       echo "unload_pvr"
+       return 0;
+}
+
+#
+# Deal with the type of invocation we get.
+#
+case "$1" in
+"start")
+       load_pvr
+       ;;
+stop)
+       if ! unload_pvr; then
+               echo "Couldn't unload pvr" >&2;
+       fi
+       ;;
+reload|restart)
+       if unload_pvr; then
+               load_pvr
+       else
+               echo "Couldn't unload pvr" >&2;
+       fi
+       ;;
+*)
+       echo "$0: unknown argument $1." >&2;
+       ;;
+esac
+
diff --git a/rc.wifi b/rc.wifi
new file mode 100755 (executable)
index 0000000..2934d5a
--- /dev/null
+++ b/rc.wifi
@@ -0,0 +1,43 @@
+#!/system/bin/sh
+
+load_wifi()
+{
+       echo "load_wifi"
+
+       # this just prevents Android wifi loader from craping out,
+       # (it only functions properly if starting from "ok" state)
+       setprop wlan.driver.status ok
+
+       return 0;
+}
+
+unload_wifi()
+{
+       echo "unload_wifi"
+       return 0;
+}
+
+#
+# Deal with the type of invocation we get.
+#
+case "$1" in
+"start")
+       load_wifi
+       ;;
+stop)
+       if ! unload_wifi; then
+               echo "Couldn't unload wifi modules" >&2;
+       fi
+       ;;
+reload|restart)
+       if unload_wifi; then
+               load_wifi
+       else
+               echo "Couldn't unload wifi modules" >&2;
+       fi
+       ;;
+*)
+       echo "$0: unknown argument $1." >&2;
+       ;;
+esac
+
diff --git a/scripts/Makefile b/scripts/Makefile
new file mode 100644 (file)
index 0000000..02d4d18
--- /dev/null
@@ -0,0 +1,15 @@
+# Component Path Configuration
+export TARGET_PRODUCT := pandora
+export ANDROID_INSTALL_DIR := $(patsubst %/,%, $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
+export ANDROID_FS_DIR := $(ANDROID_INSTALL_DIR)/out/target/product/$(TARGET_PRODUCT)/android_rootfs
+
+# export TARGET_BUILD_TYPE := debug
+
+# some rowboat stuff?
+export SYSLINK_INSTALL_DIR := $(ANDROID_INSTALL_DIR)/hardware/ti/ti81xx/syslink_vpss/syslink_2_00_00_78
+export IPC_INSTALL_DIR := $(ANDROID_INSTALL_DIR)/hardware/ti/ti81xx/syslink_vpss/ipc_1_23_01_26
+export IPC_DIR := $(ANDROID_INSTALL_DIR)/hardware/ti/ti81xx/syslink_vpss/ipc_1_23_01_26
+
+### DO NOT EDIT THIS FILE ###
+include build/core/main.mk
+### DO NOT EDIT THIS FILE ###
diff --git a/scripts/make_pnd.sh b/scripts/make_pnd.sh
new file mode 100755 (executable)
index 0000000..f53ef0b
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e -x
+
+owd=`pwd`
+
+mkdir -p out/pnd /tmp/pnd_android
+rm -rf out/pnd/* gingerbread.pnd
+
+./sgx.sh device/openpandora/pandora/pvr/gfx_rel_es2.x_android
+./sgx.sh hardware/ti/sgx/gfx_rel_es3.x_android
+./sgx.sh hardware/ti/sgx/gfx_rel_es5.x_android
+
+cd out/target/product/pandora
+
+../../../../build/tools/mktarball.sh ../../../host/linux-x86/bin/fs_get_stats root . tmp1 /tmp/pnd_android/rootfs.tar.bz2
+../../../../build/tools/mktarball.sh ../../../host/linux-x86/bin/fs_get_stats . system tmp2 /tmp/pnd_android/system.tar.bz2
+
+dd if=/dev/zero of=/tmp/pnd_android/rootfs.ext2 bs=1M count=1
+mkfs.ext2 -N 512 -F /tmp/pnd_android/rootfs.ext2
+mount -o loop /tmp/pnd_android/rootfs.ext2 /mnt/tmp/
+cd /mnt/tmp/
+tar xf /tmp/pnd_android/rootfs.tar.bz2
+cd /tmp/
+umount /mnt/tmp/
+
+cd $owd/out/pnd
+tar xf /tmp/pnd_android/system.tar.bz2
+mkdir -p pandora/pvr
+cp ../../device/openpandora/pandora/pnd/gingerbread.png pandora/
+cp ../../device/openpandora/pandora/pnd/gingerbread.pxml pandora/
+cp ../../device/openpandora/pandora/pnd/run.sh pandora/
+cp ../../device/openpandora/pandora/pnd/readme.txt pandora/
+cp -r ../../device/openpandora/pandora/pvr/3* pandora/pvr/
+mv /tmp/pnd_android/rootfs.ext2 pandora/default_rootfs.ext2
+
+cd $owd
+
+./device/openpandora/pandora/pnd/pnd_make.sh -c -d out/pnd/ -i out/pnd/pandora/gingerbread.png \
+       -x out/pnd/pandora/gingerbread.pxml -s device/openpandora/pandora/pnd/PXML_schema.xsd \
+       -p gingerbread.pnd
+
diff --git a/scripts/sgx.sh b/scripts/sgx.sh
new file mode 100755 (executable)
index 0000000..effbb1f
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+set -e
+
+#v="1.15.2766"
+s=$1
+d=./out/target/product/pandora/
+es=`echo $s | sed -e 's/.*\(es.\).*/\1/'`
+
+if ! test -d $s; then
+       echo "missing s: $s"
+       exit 1
+fi
+
+if ! test -d $d; then
+       echo "missing d: $d"
+       exit 1
+fi
+
+# for some braindead reason 103 is named 121 too
+sgx_ver=121
+if [ "$es" = "es5" ]; then
+  sgx_ver=125
+fi
+
+mkdir -p $d/system/bin/$es
+mkdir -p $d/system/lib/hw
+mkdir -p $d/system/lib/$es
+
+cp -v $s/eglinfo $d/system/bin/
+cp -v $s/gralloc.omap3.so $d/system/lib/hw/
+cp -v $s/libEGL_POWERVR_SGX530_12*.so $d/system/lib/egl/libEGL_POWERVR_SGX530_125.so
+cp -v $s/libpvr2d.so $d/system/lib/
+cp -v $s/libsfutil.so $d/system/lib/
+cp -v $s/libfakehal.so $d/system/lib/
+cp -v $s/libpvrANDROID_WSEGL.so $d/system/lib/
+ln -fs /system/lib/egl/libEGL_POWERVR_SGX530_125.so $d/system/lib/egl/libEGL_POWERVR_SGX530_121.so
+
+if [ "$es" = "es5" ]; then
+  cp -v $s/libGLESv2_POWERVR_SGX530_125.so $d/system/lib/egl/
+  cp -v $s/libGLESv1_CM_POWERVR_SGX530_125.so $d/system/lib/egl/
+else
+  cp -v $s/libGLESv2_POWERVR_SGX530_121.so $d/system/lib/$es/libGLESv2_POWERVR_SGX530_121.so
+  cp -v $s/libGLESv1_CM_POWERVR_SGX530_121.so $d/system/lib/$es/libGLESv1_CM_POWERVR_SGX530_121.so
+fi
+cp -v $s/pvrsrvinit $d/system/bin/$es/
+cp -v $s/libPVRScopeServices.so $d/system/lib/$es/
+cp -v $s/libglslcompiler.so $d/system/lib/$es/
+cp -v $s/libsrv_um.so $d/system/lib/$es/
+cp -v $s/libIMGegl.so $d/system/lib/$es/
+
+ln -fs /vendor/pvr/pvrsrvinit $d/system/bin/
+ln -fs /vendor/pvr/libGLESv2_POWERVR_SGX530_121.so $d/system/lib/egl/
+ln -fs /vendor/pvr/libGLESv1_CM_POWERVR_SGX530_121.so $d/system/lib/egl/
+ln -fs /vendor/pvr/libPVRScopeServices.so $d/system/lib/
+ln -fs /vendor/pvr/libglslcompiler.so $d/system/lib/
+ln -fs /vendor/pvr/libsrv_um.so $d/system/lib/
+ln -fs /vendor/pvr/libIMGegl.so $d/system/lib/
+ln -fs /vendor/pvr/egl.cfg $d/system/lib/egl/
diff --git a/ueventd.omap3.rc b/ueventd.omap3.rc
new file mode 100644 (file)
index 0000000..1456104
--- /dev/null
@@ -0,0 +1,4 @@
+/dev/cmem                 0666   root       root
+/dev/dsplink              0666   root       root
+/dev/lpm0                 0666   root       root
+/dev/sdma                 0666   root       root
diff --git a/vold.fstab b/vold.fstab
new file mode 100644 (file)
index 0000000..d35ef3a
--- /dev/null
@@ -0,0 +1,16 @@
+## Vold 2.0 Generic fstab
+## - San Mehat (san@android.com)
+## 
+
+#######################
+## Regular device mount
+##
+## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...> 
+## label        - Label for the volume
+## mount_point  - Where the volume will be mounted
+## part         - Partition # (1 based), or 'auto' for first usable partition.
+## <sysfs_path> - List of sysfs paths to source devices
+######################
+
+dev_mount left_sdcard /mnt/sdcard auto /devices/platform/omap_hsmmc.0/mmc_host/mmc0
+dev_mount right_sdcard /mnt/sdcard2 auto /devices/platform/omap_hsmmc.1/mmc_host/mmc1
diff --git a/wpa_supplicant.conf b/wpa_supplicant.conf
new file mode 100644 (file)
index 0000000..a08eb33
--- /dev/null
@@ -0,0 +1,6 @@
+##### wpa_supplicant configuration file template #####
+update_config=1
+ctrl_interface=wlan0
+eapol_version=1
+ap_scan=1
+fast_reauth=1