Skip to content
Browse files

v2012.12: start from scratch, machine now named openpandora

  • Loading branch information...
0 parents commit 11484c512c9e3293287686fecf7a1d4a0f7cb509 @aTc aTc committed Mar 14, 2013
Showing with 1,842 additions and 0 deletions.
  1. +9 −0 conf/layer.conf
  2. +24 −0 conf/machine/openpandora.conf
  3. +27 −0 recipes-binary/openpandora-firmware/openpandora-firmware.bb
  4. +151 −0 recipes-binary/openpandora-firmware/openpandora-firmware/LICENCE
  5. +5 −0 recipes-binary/openpandora-firmware/openpandora-firmware/README
  6. +5 −0 recipes-binary/openpandora-firmware/openpandora-firmware/bluetooth-conf
  7. BIN recipes-binary/openpandora-firmware/openpandora-firmware/brf6300.bin
  8. BIN recipes-binary/openpandora-firmware/openpandora-firmware/wl1251-fw.bin
  9. +30 −0 recipes-bsp/u-boot/openpandora-u-boot-autoboot-sd.bb
  10. +3 −0 recipes-bsp/u-boot/openpandora-u-boot-autoboot-sd/autoboot.txt
  11. +41 −0 recipes-bsp/u-boot/pandora-uboot-scripts.bb
  12. +2 −0 recipes-bsp/u-boot/pandora-uboot-scripts/boot-bootchart-mmcblk0p2
  13. +2 −0 recipes-bsp/u-boot/pandora-uboot-scripts/boot-bootchart-mmcblk1p1
  14. +2 −0 recipes-bsp/u-boot/pandora-uboot-scripts/boot-mmcblk0p2
  15. +2 −0 recipes-bsp/u-boot/pandora-uboot-scripts/boot-mmcblk1p1
  16. +2 −0 recipes-bsp/u-boot/pandora-uboot-scripts/boot-ramdisk
  17. +68 −0 recipes-bsp/u-boot/u-boot.inc
  18. +23 −0 recipes-bsp/u-boot/u-boot_git.bbappend
  19. +73 −0 recipes-bsp/x-load/files/signGP.c
  20. +21 −0 recipes-bsp/x-load/signgp.bb
  21. +24 −0 recipes-bsp/x-load/x-load-openpandora_git.bb
  22. +46 −0 recipes-bsp/x-load/x-load.inc
  23. +2 −0 recipes-core/netbase/netbase-5.0/openpandora/hosts
  24. +15 −0 recipes-core/netbase/netbase-5.0/openpandora/interfaces
  25. +3 −0 recipes-core/netbase/netbase_5.0.bbappend
  26. +22 −0 recipes-core/systemd/systemd-compat-units.bbappend
  27. +381 −0 recipes-graphics/libgles/libgles-omap3.inc
  28. +7 −0 recipes-graphics/libgles/libgles-omap3/99-bufferclass.rules
  29. +17 −0 recipes-graphics/libgles/libgles-omap3/cputype
  30. +110 −0 recipes-graphics/libgles/libgles-omap3/rc.pvr
  31. +8 −0 recipes-graphics/libgles/libgles-omap3/sample.desktop
  32. +30 −0 recipes-graphics/libgles/libgles-omap3_4.00.00.01.bb
  33. +28 −0 recipes-graphics/libgles/omap3-sgx-modules/0001-Compile-fixes-for-recent-kernels.patch
  34. +31 −0 ...raphics/libgles/omap3-sgx-modules/0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch
  35. +23 −0 recipes-graphics/libgles/omap3-sgx-modules/0002-Compile-fixes-for-recent-kernels.patch
  36. +281 −0 recipes-graphics/libgles/omap3-sgx-modules/compile-against-3.2.1.patch
  37. +27 −0 recipes-graphics/libgles/omap3-sgx-modules/fix-2.6.27.patch
  38. +9 −0 recipes-graphics/libgles/omap3-sgx-modules/fix-makefile.patch
  39. +16 −0 recipes-graphics/libgles/omap3-sgx-modules/spinlock_3430.patch
  40. +65 −0 recipes-graphics/libgles/omap3-sgx-modules/update.patch
  41. +25 −0 recipes-graphics/libgles/omap3-sgx-modules_4.00.00.01.bb
  42. +72 −0 recipes-graphics/libgles/ti-eula-unpack.inc
  43. +6 −0 recipes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf
  44. +40 −0 recipes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf.d/10-evdev.conf
  45. +11 −0 recipes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf.d/20-omapfb.conf
  46. +5 −0 recipes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf.d/99-calibration.conf
  47. +23 −0 recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
  48. +25 −0 recipes-kernel/linux/linux-omap3-pandora_3.2.bb
9 conf/layer.conf
@@ -0,0 +1,9 @@
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory containing .bb and .bbappend files, add to BBFILES
+BBFILES := "${BBFILES} ${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend "
+
+BBFILE_COLLECTIONS += "openpandora"
+BBFILE_PATTERN_openpandora := "^${LAYERDIR}/"
+BBFILE_PRIORITY_openpandora = "6"
24 conf/machine/openpandora.conf
@@ -0,0 +1,24 @@
+#@TYPE: Machine
+#@NAME: OMAP3 based Pandora Handheld Console
+#@DESCRIPTION: Machine configuration for the Pandora http://www.openpandora.org/ Handheld Console
+#@MAINTAINER: John Willis
+
+require conf/machine/include/omap3.inc
+
+PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
+XSERVER = "xserver-xorg \
+ xf86-input-evdev \
+ xf86-input-mouse \
+ xf86-video-omapfb \
+ xf86-input-keyboard"
+
+
+
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-omap3-pandora"
+MACHINE_EXTRA_RRECOMMENDS = "kernel-modules openpandora-firmware openpandora-u-boot-autoboot-sd"
+
+PREFERRED_PROVIDER_x-load = "x-load-openpandora"
+PREFERRED_VERSION_libgles-omap3 = "4.00.00.01"
+PREFERRED_VERSION_omap3-sgx-modules = "4.00.00.01"
27 recipes-binary/openpandora-firmware/openpandora-firmware.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Install binary firmware for Bluetooth and WiFi into the image."
+LICENSE = "proprietary-binary"
+RRECOMMENDS_${PN} = "kernel-module-firmware-class"
+PR = "r5"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=c4073948801d7b82b41ddffd6c7288d0"
+SRC_URI = " \
+ file://LICENCE \
+ file://brf6300.bin \
+ file://wl1251-fw.bin \
+ file://bluetooth-conf \
+"
+
+SUMMARY = "This is required to support the Bluetooth and WiFi modules on the Pandora"
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${base_libdir}/firmware
+ install -m 0644 ${S}/brf6300.bin ${S}/wl1251-fw.bin ${D}${base_libdir}/firmware/
+ install -d ${D}${sysconfdir}/sysconfig
+ install -m 0755 ${S}/bluetooth-conf ${D}${sysconfdir}/sysconfig/bluetooth
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} += "${base_libdir}/firmware ${sysconfdir}/sysconfig"
+
+COMPATIBLE_MACHINE = "openpandora"
151 recipes-binary/openpandora-firmware/openpandora-firmware/LICENCE
@@ -0,0 +1,151 @@
+Texas Instruments Incorporated
+Technology and Software Publicly Available
+Software (Object Code) License Agreement
+
+
+IMPORTANT - PLEASE READ THE FOLLOWING LICENSE AGREEMENT CAREFULLY. THIS IS
+ A LEGALLY BINDING AGREEMENT. DO NOT DOWNLOAD THE LICENSED MATERIALS
+ UNLESS: (1) YOU ARE AUTHORIZED TO ACCEPT AND AGREE TO THE TERMS OF THIS
+ LICENSE AGREEMENT AND (2) YOU INTEND TO ENTER INTO AND TO BE BOUND BY
+ THE TERMS OF THIS AGREEMENT.
+
+This Software License Agreement ("Agreement") is a legal agreement between you
+ (either an individual or entity) and Texas Instruments Incorporated
+ ("TI"). The "Licensed Materials" subject to this Agreement include,
+ in whole or in part, the software programs that accompany this Agreement
+ and any "on-line" or electronic documentation associated with these
+ programs. By installing, copying or otherwise using the Licensed
+ Materials you agree to abide by the terms of this Agreement.
+ If you choose not to accept or agree with these terms, do not download
+ or install the Licensed Materials.
+
+
+1. Object Code License. TI hereby grants to you a limited, non-exclusive
+ license to reproduce and use the Licensed Materials provided to you in
+ object code format and to distribute an unlimited number of object or
+ executable copies of such Licensed Materials, provided that such object
+ or executable copies are used solely and exclusively on devices
+ manufactured by or for TI.
+
+2. Termination. This license is effective until terminated. Without prejudice
+ to any other rights, TI may terminate your right to use the Licensed
+ Materials under this Agreement if you fail to comply with the terms of
+ this Agreement. In such event, you shall destroy all copies of the
+ Licensed Materials, including all portions and derivatives thereof.
+
+3. Intellectual Property Rights. The Licensed Materials being provided to you
+ hereunder are being made publicly available by TI, even though they
+ contain copyrighted material of TI and its licensors, if applicable.
+ In no event may you alter, remove or destroy any copyright notice
+ included in the Licensed Materials. To the extent that any of the
+ Licensed Materials are provided in binary or object code only, you may
+ not unlock, decompile, reverse engineer, disassemble or otherwise
+ translate such binary or object code to human-perceivable form. The
+ source code of such reverse engineered code may contain TI trade secret
+ and other proprietary information. Further, nothing shall obligate TI
+ to provide you with source code for the Licensed Materials licensed to
+ you in binary or object code only under this Agreement. TI reserves all
+ rights not specifically granted under this Agreement.
+
+4. Warranties and Limitations. THE LICENSED MATERIALS ARE PROVIDED "AS IS". TI
+ MAKES NO WARRANTY OR REPRESENTATION, EXPRESS, IMPLIED OR STATUTORY,
+ INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTIBILITY, FITNESS FOR A
+ PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF
+ RESPONSES, RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF
+ TITLE, QUIET ENJOYMENT, QUIET POSESSION, AND NON-INFRINGEMENT OF ANY
+ THIRD PARTY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE LICENSED
+ MATERIALS OR USE OF THOSE MATERIALS.
+
+YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS MAY NOT BE INTENDED FOR
+ PRODUCTION APPLICATIONS AND MAY CONTAIN IRREGULARITIES AND DEFECTS NOT
+ FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU ACKNOWLEDGE AND AGREE
+ THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR CERTIFIED BY ANY
+ GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY OTHER THIRD
+ PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR
+ DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT
+ THAT YOU WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE
+ LICENSED MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR
+ ANY PROBLEMS OR FAILURES.
+
+IN NO EVENT SHALL TI, OR ANY APPLICABLE LICENSOR, BE LIABLE FOR ANY SPECIAL,
+ INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED
+ ON ANY THEORY OF LIABILITY, ARISING IN ANY WAY OUT OF THIS AGREEMENT,
+ OR YOUR USE OF THE LICENSED MATERIALS, WHETHER OR NOT TI HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE,
+ BUT ARE NOT LIMITED TO, COST OF REMOVAL OR REINSTALLATION, OUTSIDE
+ COMPUTER TIME, LABOR COSTS, LOSS OR CORRUPTION OF DATA, LOSS OF
+ GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR
+ INTERRUPTION OF BUSINESS OR ANY OTHER ECONOMIC LOSS. IN NO EVENT WILL
+ TI'S AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF YOUR USE
+ OF THE LICENSED MATERIALS EXCEED FIVE HUNDRED U.S. DOLLARS (US$500).
+
+Because some jurisdictions do not allow the exclusion or limitation of
+ incidental or consequential damages or limitation on how long an implied
+ warranty lasts, the above limitations or exclusions may not apply to
+ you.
+
+5. Export Control. Thesoftware programs and any "on-line" documentation as well
+ as any updates or upgrades to such software programs or documentation
+ may be subject to the export or import regulations of certain countries.
+ You agree to comply with all such regulations and acknowledge that you
+ have the responsibility to obtain any licenses or other authorizations
+ that may be required to export, re-export or import the Licensed
+ Materials.
+
+6. Governing Law, Jurisdiction and Severability. This Agreement will be
+ governed by and interpreted in accordance with the laws of the State of
+ Texas, without reference to that state's conflict of laws principles.
+ This Agreement shall not be governed by the United Nations Convention on
+ Contracts for the International Sale of Goods, nor shall it be governed
+ by the Uniform Computer Information Transactions Act (UCITA). Any
+ dispute arising out of or related to this Agreement will be brought in,
+ and each party consents to the exclusive jurisdiction and venue in the
+ state and federal courts sitting in Dallas Country, Texas. Each party
+ waives all defenses of lack of personal jurisdiction and forum
+ non-conveniens and agrees that process may be served on either party in
+ a manner authorized by applicable law or court rule. If for any reason
+ a court of competent jurisdiction finds any provision of the Agreement
+ to be unenforceable, that provision will be enforced to the maximum
+ extent possible to effectuate the intent of the parties and the
+ remainder of the Agreement shall continue in full force and effect.
+
+7. PRC Provisions. If you are located in the People's Republic of China ("PRC")
+ or if the Licensed Materials will be sent to the PRC, the following
+ provisions shall apply and shall supersede any other provisions in this
+ Agreement concerning the same subject matter as the following
+ provisions:
+
+ a. Registration Requirements. You shall be solely responsible for
+ performing all acts and obtaining all approvals that may be required in
+ connection with this Agreement by the government of the PRC, including
+ but not limited to registering pursuant to, and otherwise complying
+ with, the PRC Measures on the Administration of Software Products,
+ Management Regulations on Technology Import-Export, and Technology
+ Import and Export Contract Registration Management Rules. Upon receipt
+ of such approvals from the government authorities, you shall forward
+ evidence of all such approvals to TI for its records. In the event that
+ you fail to obtain any such approval or registration, you shall be
+ solely responsible for any and all losses, damages or costs resulting
+ therefrom, and shall indemnify TI for all such losses, damages or costs.
+
+ b. Governing Language. This Agreement is written and executed in
+ the English language. If a translation of this Agreement is required
+ for any purpose, including but not limited to registration of the
+ Agreement pursuant to any governmental laws, regulations or rules, you
+ shall be solely responsible for creating such translation. Any
+ translation of this Agreement into a language other than English is
+ intended solely in order to comply with such laws or for reference
+ purposes, and the English language version shall be authoritative and
+ controlling.
+
+8. Entire Agreement. This is the entire Agreement between you and TI and
+ supersedes any prior agreement between the parties related to the
+ subject matter of this Agreement. No amendment or modification of this
+ Agreement will be effective unless in writing and signed by a duly
+ authorized representative of TI. You hereby warrant and represent that
+ you have obtained all authorizations and other applicable consents
+ required empowering you to enter into this Agreement.
+
+1
+TILAW-#236402v3
+
5 recipes-binary/openpandora-firmware/openpandora-firmware/README
@@ -0,0 +1,5 @@
+Place OpenPandora firmware files in this dir. to build the openpandora-firmware package (needed for WiFi and BT support).
+
+brf6300.bin and wl1251-fw.bin
+
+This also contains a simple script to help bring up the Bluetooth interface on the system.
5 recipes-binary/openpandora-firmware/openpandora-firmware/bluetooth-conf
@@ -0,0 +1,5 @@
+BLUETOOTH=yes
+PORT=/dev/ttyS1
+SPEED=115200
+PROTO=texas
+PROBE=no
BIN recipes-binary/openpandora-firmware/openpandora-firmware/brf6300.bin
Binary file not shown.
BIN recipes-binary/openpandora-firmware/openpandora-firmware/wl1251-fw.bin
Binary file not shown.
30 recipes-bsp/u-boot/openpandora-u-boot-autoboot-sd.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "Helper U-Boot text script for the OpenPandora when booting from SD"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+DEPENDS = "u-boot"
+
+SRC_URI = " \
+ file://autoboot.txt \
+"
+
+PR = "r1"
+
+do_configure() {
+ cp ${WORKDIR}/autoboot.txt ${S}
+}
+
+do_compile() {
+}
+
+do_install() {
+ install -d ${D}/
+ for i in *.txt ; do
+ install -m 0644 $i ${D}/
+ done
+}
+
+FILES_${PN} += "/*.txt"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
3 recipes-bsp/u-boot/openpandora-u-boot-autoboot-sd/autoboot.txt
@@ -0,0 +1,3 @@
+setenv bootargs rw root=/dev/mmcblk0p1 rootwait vram=3000K omapfb.vram=0:3000K
+ext2load mmc 0:1 0x80300000 boot/uImage
+bootm 0x80300000
41 recipes-bsp/u-boot/pandora-uboot-scripts.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Helper uboot boot scripts for the OpenPandora"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+DEPENDS = "u-boot-mkimage-native"
+
+SRC_URI = " \
+ file://boot* \
+"
+
+PR = "r5"
+
+do_configure() {
+ cp ${WORKDIR}/boot* ${S}
+}
+
+do_compile() {
+ for i in boot* ; do
+ uboot-mkimage -A ${TARGET_ARCH} -O linux -T script -C none -a 0 -e 0 -n "OpenPandora $i" -d $i $i.scr
+ done
+}
+
+do_install() {
+ install -d ${D}/boot/u-boot-scripts
+ for i in *.scr ; do
+ install -m 0644 $i ${D}/boot/u-boot-scripts
+ done
+}
+
+FILES_${PN} += "/boot"
+
+addtask deploy before do_package after do_install
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ for i in *.scr ; do
+ cp $i ${DEPLOY_DIR_IMAGE}
+ done
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
2 recipes-bsp/u-boot/pandora-uboot-scripts/boot-bootchart-mmcblk0p2
@@ -0,0 +1,2 @@
+setenv bootargs debug root=/dev/mmcblk0p2 rw rootdelay=2 init=/sbin/bootchartd console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
+fatload mmc 0 0x80300000 uImage; bootm 0x80300000
2 recipes-bsp/u-boot/pandora-uboot-scripts/boot-bootchart-mmcblk1p1
@@ -0,0 +1,2 @@
+setenv bootargs debug root=/dev/mmcblk1p1 rw rootdelay=2 init=/sbin/bootchartd console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
+fatload mmc 0 0x80300000 uImage; bootm 0x80300000
2 recipes-bsp/u-boot/pandora-uboot-scripts/boot-mmcblk0p2
@@ -0,0 +1,2 @@
+setenv bootargs debug root=/dev/mmcblk0p2 rw rootdelay=2 console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
+fatload mmc 0 0x80300000 uImage; bootm 0x80300000
2 recipes-bsp/u-boot/pandora-uboot-scripts/boot-mmcblk1p1
@@ -0,0 +1,2 @@
+setenv bootargs debug root=/dev/mmcblk1p1 rw rootdelay=2 console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
+fatload mmc 0 0x80300000 uImage; bootm 0x80300000
2 recipes-bsp/u-boot/pandora-uboot-scripts/boot-ramdisk
@@ -0,0 +1,2 @@
+setenv bootargs debug console=ttyS2,115200n8 ramdisk_size=8192 root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M vram=6272K omapfb.vram=0:1500K
+fatload mmc 0 0x80300000 uImage; fatload mmc 0 0x81600000 rd-ext2.bin; bootm 0x80300000
68 recipes-bsp/u-boot/u-boot.inc
@@ -0,0 +1,68 @@
+DESCRIPTION = "U-Boot - the Universal Boot Loader"
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+PRIORITY = "optional"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b"
+
+PROVIDES = "virtual/bootloader"
+
+DEPENDS = "mtd-utils"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+PARALLEL_MAKE=""
+
+EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
+
+UBOOT_MACHINE ?= "${MACHINE}_config"
+UBOOT_BINARY ?= "u-boot.bin"
+UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
+UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
+UBOOT_MAKE_TARGET ?= "all"
+
+do_configure () {
+ oe_runmake ${UBOOT_MACHINE}
+}
+
+do_compile () {
+ unset LDFLAGS
+ unset CFLAGS
+ unset CPPFLAGS
+ oe_runmake ${UBOOT_MAKE_TARGET}
+ oe_runmake tools env
+}
+
+do_install () {
+ install -d ${D}/boot
+ install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+ ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+
+ if [ -e ${WORKDIR}/fw_env.config ] ; then
+ install -d ${D}${base_sbindir}
+ install -d ${D}${sysconfdir}
+ install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
+ install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
+ fi
+
+}
+
+FILES_${PN} = "/boot"
+# no gnu_hash in uboot.bin, by design, so skip QA
+INSANE_SKIP_${PN} = True
+
+PACKAGES += "${PN}-fw-utils"
+FILES_${PN}-fw-utils = "${sysconfdir} ${base_sbindir}"
+# u-boot doesn't use LDFLAGS for fw files, needs to get fixed, but until then:
+INSANE_SKIP_${PN}-fw-utils = True
+
+do_deploy () {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
+
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${UBOOT_SYMLINK}
+ ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
+}
+do_deploy[dirs] = "${S}"
+addtask deploy before do_package_stage after do_compile
23 recipes-bsp/u-boot/u-boot_git.bbappend
@@ -0,0 +1,23 @@
+# Extends the core U-Boot GIT recipe in meta-texasinstruments
+# to suit the OpenPandora GIT tree.
+
+# Also overwries the license checksum to suit the updated text file in our U-Boot snapshot.
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
+COMPATIBLE_MACHINE = "openpandora"
+DEFAULT_PREFERENCE_openpandora = "1"
+
+# Latest SRCREV.
+SRCREV_pn-${PN}_omap3-pandora = "55d0d2dd5d07fbfd57309997c38da5281b9824b5"
+
+PR ="r3"
+PV_openpandora = "omap3-pandora+${PR}+gitr${SRCREV}"
+
+SRC_URI_openpandora = "git://git.openpandora.org/pandora-u-boot.git;branch=pandora-2011.12;protocol=git \
+"
+
+UBOOT_MACHINE_openpandora = "omap3_pandora_config"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
73 recipes-bsp/x-load/files/signGP.c
@@ -0,0 +1,73 @@
+//
+// signGP.c
+// Read the x-load.bin file and write out the x-load.bin.ift file.
+// The signed image is the original pre-pended with the size of the image
+// and the load address. If not entered on command line, file name is
+// assumed to be x-load.bin in current directory and load address is
+// 0x40200800.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <malloc.h>
+
+
+main(int argc, char *argv[])
+{
+ int i;
+ char ifname[FILENAME_MAX], ofname[FILENAME_MAX], ch;
+ FILE *ifile, *ofile;
+ unsigned long loadaddr, len;
+ struct stat sinfo;
+
+
+ // Default to x-load.bin and 0x40200800.
+ strcpy(ifname, "x-load.bin");
+ loadaddr = 0x40200800;
+
+ if ((argc == 2) || (argc == 3))
+ strcpy(ifname, argv[1]);
+
+ if (argc == 3)
+ loadaddr = strtol(argv[2], NULL, 16);
+
+ // Form the output file name.
+ strcpy(ofname, ifname);
+ strcat(ofname, ".ift");
+
+ // Open the input file.
+ ifile = fopen(ifname, "rb");
+ if (ifile == NULL) {
+ printf("Cannot open %s\n", ifname);
+ exit(0);
+ }
+
+ // Get file length.
+ stat(ifname, &sinfo);
+ len = sinfo.st_size;
+
+ // Open the output file and write it.
+ ofile = fopen(ofname, "wb");
+ if (ofile == NULL) {
+ printf("Cannot open %s\n", ofname);
+ fclose(ifile);
+ exit(0);
+ }
+
+ // Pad 1 sector of zeroes.
+ //ch = 0x00;
+ //for (i=0; i<0x200; i++)
+ // fwrite(&ch, 1, 1, ofile);
+
+ fwrite(&len, 1, 4, ofile);
+ fwrite(&loadaddr, 1, 4, ofile);
+ for (i=0; i<len; i++) {
+ fread(&ch, 1, 1, ifile);
+ fwrite(&ch, 1, 1, ofile);
+ }
+
+ fclose(ifile);
+ fclose(ofile);
+}
21 recipes-bsp/x-load/signgp.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Tool to sign omap3 x-loader images"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+PR = "r1"
+
+SRC_URI = "file://signGP.c"
+
+do_compile() {
+ ${CC} ${CFLAGS} ${LDFLAGS} ${WORKDIR}/signGP.c -o signGP
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 signGP ${D}${bindir}
+}
+
+NATIVE_INSTALL_WORKS = "1"
+
+BBCLASSEXTEND = "native"
24 recipes-bsp/x-load/x-load-openpandora_git.bb
@@ -0,0 +1,24 @@
+require x-load.inc
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://README;beginline=1;endline=25;md5=ef08d08cb99057bbb5b9d6d0c5a4396f"
+
+COMPATIBLE_MACHINE = "openpandora"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/x-load-${MACHINE}/${MACHINE}"
+
+SRCREV = "6b7fb6dd9ccdf7c3c5ea2d1e476dafd852a0d47a"
+
+PROVIDES = "x-load"
+
+PV = "1.5.1+${PR}+gitr${SRCREV}"
+PR ="r1"
+PE = "1"
+
+SRC_URI = "git://git.openpandora.org/pandora-x-loader.git;branch=pandora-1.5.1;protocol=git"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+XLOAD_MACHINE = "pandora_config"
46 recipes-bsp/x-load/x-load.inc
@@ -0,0 +1,46 @@
+DESCRIPTION = "x-load bootloader loader"
+SECTION = "bootloaders"
+PRIORITY = "optional"
+LICENSE = "GPL"
+
+DEPENDS = "signgp-native"
+
+PARALLEL_MAKE=""
+
+EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
+
+XLOAD_MACHINE ?= "${MACHINE}_config"
+
+XLOAD_IMAGE ?= "x-load-${MACHINE}-${PV}-${PR}.bin.ift"
+XLOAD_SYMLINK ?= "x-load-${MACHINE}.bin.ift"
+XLOAD_USB_IMAGE ?= "x-load-usb-${MACHINE}-${PV}-${PR}.bin"
+XLOAD_USB_SYMLINK ?= "x-load-usb-${MACHINE}.bin"
+MLO_IMAGE ?= "MLO-${MACHINE}-${PV}-${PR}"
+MLO_SYMLINK ?= "MLO-${MACHINE}"
+
+do_compile () {
+ unset LDFLAGS
+ unset CFLAGS
+ unset CPPFLAGS
+ oe_runmake distclean
+ oe_runmake ${XLOAD_MACHINE}
+ oe_runmake
+}
+
+do_deploy () {
+ signGP ${S}/x-load.bin
+ install -d ${DEPLOY_DIR_IMAGE}
+ install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${XLOAD_IMAGE}
+ install ${S}/x-load.bin ${DEPLOY_DIR_IMAGE}/${XLOAD_USB_IMAGE}
+ install ${S}/x-load.bin.ift ${DEPLOY_DIR_IMAGE}/${MLO_IMAGE}
+
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${XLOAD_SYMLINK}
+ ln -sf ${XLOAD_IMAGE} ${XLOAD_SYMLINK}
+ rm -f ${XLOAD_USB_SYMLINK}
+ ln -sf ${XLOAD_USB_IMAGE} ${XLOAD_USB_SYMLINK}
+ rm -f ${MLO_SYMLINK}
+ ln -sf ${MLO_IMAGE} ${MLO_SYMLINK}
+}
+do_deploy[dirs] = "${S}"
+addtask deploy before do_build after do_compile
2 recipes-core/netbase/netbase-5.0/openpandora/hosts
@@ -0,0 +1,2 @@
+127.0.0.1 localhost.localdomain localhost openpandora op
+
15 recipes-core/netbase/netbase-5.0/openpandora/interfaces
@@ -0,0 +1,15 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wireless interfaces
+iface wlan0 inet dhcp
+ wireless_mode managed
+ wireless_essid any
+ wpa-driver wext
+ wpa-conf /etc/wpa_supplicant.conf
+
+# Bluetooth networking
+iface bnep0 inet dhcp
3 recipes-core/netbase/netbase_5.0.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+# Don't forget to bump PRINC if you update the extra files.
+PRINC = "1"
22 recipes-core/systemd/systemd-compat-units.bbappend
@@ -0,0 +1,22 @@
+PRINC := "${@int(PRINC) + 11}"
+
+SYSTEMD_DISABLED_SYSV_SERVICES = " \
+ busybox-udhcpc \
+ dnsmasq \
+ hwclock \
+ syslog \
+ syslog.busybox \
+ shr-splash \
+ crond \
+ keymap \
+ fbsetup \
+ populate-volatile \
+ mountall \
+ bootmisc \
+ mountnfs \
+ checkroot \
+ modutils \
+ fso-gpsd-sysv \
+ gpsd-sysv \
+ networking \
+"
381 recipes-graphics/libgles/libgles-omap3.inc
@@ -0,0 +1,381 @@
+DESCRIPTION = "libGLES for the omap3"
+LICENSE = "proprietary-binary"
+# 'TSPA.txt' might not be the best file to md5sum
+LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1"
+
+PR = "r25"
+
+COMPATIBLE_MACHINE = "(omap3|ti816x|ti33x)"
+
+DEPENDS = "virtual/libx11 libxau libxdmcp"
+
+PROVIDES += "virtual/egl"
+
+SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \
+ file://cputype \
+ file://rc.pvr \
+ file://sample.desktop \
+ file://99-bufferclass.rules \
+"
+
+S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}"
+
+# Logic to unpack installjammer file
+TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
+require ti-eula-unpack.inc
+
+BINLOCATION ?= "${S}/gfx_rel"
+ES2LOCATION ?= "${S}/gfx_rel_es2.x"
+ES3LOCATION ?= "${S}/gfx_rel_es3.x"
+ES5LOCATION ?= "${S}/gfx_rel_es5.x"
+ES6LOCATION ?= "${S}/gfx_rel_es6.x"
+ES8LOCATION ?= "${S}/gfx_rel_es8.x"
+
+do_configure() {
+ # Attempt to fix up the worst offenders for file permissions
+ for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do
+ chmod 0644 $i
+ done
+
+ # Attempt to create proper library softlinks
+ for sofile in $(find ${S} -name "lib*Open*.so") $(find ${S} -name "lib*srv*.so") $(find ${S} -name "lib*gl*.so") $(find ${S} -name "libpvr*.so") $(find ${S} -name "lib*GL*.so"); do
+ if [ "$(readlink -n ${sofile})" = "" ] ; then
+ mv $sofile ${sofile}.${IMGPV}
+ ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}
+ ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1}')
+ ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1 "." $2}')
+ fi
+ done
+
+ # Due to recursive make PLAT_* isn't always passed down correctly, so use sed to fix those
+ for mak in $(find ${S} -name "*.mak") ; do
+ sed -i -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g $mak
+ done
+
+ # clear out old stuff
+ find Binaries/ | xargs rm -f || true
+}
+
+# Force in GNU_HASH and paths to libs
+TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L${BINLOCATION} \
+-L${STAGING_DIR_TARGET}${libdir} -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir}"
+PARALLEL_MAKE = ""
+
+do_compile() {
+ export X11ROOT="${STAGING_DIR_HOST}/usr"
+ export TOOLCHAIN="${TOOLCHAIN_PATH}"
+ export PLATFORM="LinuxOMAP3"
+
+ export PLAT_CC="${CC}"
+ export PLAT_CPP="${CXX}"
+ export PLAR_AR="${AR}"
+
+ mkdir -p ${S}/demos/raw
+ mkdir -p ${S}/demos/x11
+
+ # Rebuild demos for both Raw and X11
+ for X11BUILD in 0 1 ; do
+ for demo in ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Demos/* ; do
+ cd $demo/OGLES/Build/LinuxGeneric
+ oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD
+ rm $demo/OGLES/Build/LinuxOMAP3/Release*/*.o
+ install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true
+ sed -e s:NAME:$(basename $demo): \
+ -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES/Build/LinuxOMAP3/ReleaseX11/*): \
+ ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
+ install -m 0755 $demo/OGLES/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true
+ done
+ for demo in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Demos/* ; do
+ cd $demo/OGLES2/Build/LinuxGeneric
+ oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD
+ rm -f $demo/OGLES2/Build/LinuxOMAP3/Release*/*.o
+ install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true
+ sed -e s:NAME:$(basename $demo): \
+ -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/*): \
+ ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
+ install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/demos/raw || true
+ done
+ done
+
+ mkdir -p ${S}/trainingcourses/raw
+ mkdir -p ${S}/trainingcourses/x11
+
+ find ${S} -name "*_org" -delete
+
+ # Build OGLES2 Trainingcourses for both Raw and X11
+ for X11BUILD in 0 1 ; do
+ for training in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/* ; do
+ if [ -e $training/OGLES2/Build/LinuxGeneric/Makefile ] ; then
+ cd $training/OGLES2/Build/LinuxGeneric
+ fi
+
+ if [ -e $training/OGLES2/Build/LinuxOMAP3/Makefile ] ; then
+ cd $training/OGLES2/Build/LinuxOMAP3
+ fi
+
+ oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD
+ rm -f $training/OGLES2/Build/LinuxOMAP3/Release*/*.o
+ install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/trainingcourses/x11 || true
+ install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/trainingcourses/raw || true
+ done
+ done
+
+}
+
+do_install () {
+ install -d ${D}${libdir}
+ cp -pPR ${BINLOCATION}/*.so* ${D}${libdir}
+ install -m 0644 ${BINLOCATION}/*.a ${D}${libdir}
+
+ install -d ${D}${bindir}/
+ install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/
+
+ install -m 0755 ${BINLOCATION}/*_test ${D}${bindir}/
+ install -m 0755 ${BINLOCATION}/gl* ${D}${bindir}/
+ install -m 0755 ${BINLOCATION}/p[dv]* ${D}${bindir}/
+ install -m 0755 ${BINLOCATION}/xgles1test1 ${D}${bindir}/
+
+ install -m 0755 ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true
+ cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/lib/*X11WS* ${D}${libdir} || true
+
+ install -d ${D}${includedir}
+ cp -pPR ${S}/GFX_Linux_KM/include4 ${D}${includedir}/
+ cp -pPR ${S}/GFX_Linux_KM/services4 ${D}${includedir}/
+
+ cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
+ cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/
+ cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES/ || true
+ cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES2/ || true
+ cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/v* ${D}${includedir}/ || true
+ cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/V* ${D}${includedir}/ || true
+ cp -pPr ${S}/include/*.h ${D}${includedir} || true
+ cp -pPr ${S}/include/wsegl/*.h ${D}${includedir} || true
+
+ install -d ${D}${sysconfdir}/init.d/
+ cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init
+
+ install -d ${D}${sysconfdir}
+ echo "[default]" > ${D}${sysconfdir}/powervr.ini
+ echo "WindowSystem=libpvrPVR2D_FRONTWSEGL.so.1" >> ${D}${sysconfdir}/powervr.ini
+
+ # The ES2.x, ES3.x, ES5.x and ES6.x CPUs have different SGX hardware, so we need to install multiple sets of userspace
+
+ install -d ${D}${libdir}/ES8.0
+ install -d ${D}${libdir}/ES6.0
+ install -d ${D}${libdir}/ES5.0
+ install -d ${D}${libdir}/ES3.0
+ install -d ${D}${libdir}/ES2.0
+
+ install -d ${D}${bindir}/ES8.0
+ install -d ${D}${bindir}/ES6.0
+ install -d ${D}${bindir}/ES5.0
+ install -d ${D}${bindir}/ES3.0
+ install -d ${D}${bindir}/ES2.0
+
+
+ if [ -e ${ES2LOCATION} ] ; then
+ cp -pPR ${ES2LOCATION}/lib*${IMGPV} ${D}${libdir}/ES2.0/
+ cp ${ES2LOCATION}/p[dv]* ${D}${bindir}/ES2.0/
+ fi
+
+ if [ -e ${ES3LOCATION} ] ; then
+ cp -pPR ${ES3LOCATION}/lib*${IMGPV} ${D}${libdir}/ES3.0/
+ cp ${ES3LOCATION}/p[dv]* ${D}${bindir}/ES3.0
+ fi
+
+ if [ -e ${ES5LOCATION} ] ; then
+ cp -pPR ${ES5LOCATION}/lib*${IMGPV} ${D}${libdir}/ES5.0/
+ cp ${ES5LOCATION}/p[dv]* ${D}${bindir}/ES5.0/
+ fi
+
+ if [ -e ${ES6LOCATION} ] ; then
+ cp -pPR ${ES6LOCATION}/lib*${IMGPV} ${D}${libdir}/ES6.0/
+ cp ${ES6LOCATION}/p[dv]* ${D}${bindir}/ES6.0/
+ fi
+
+ if [ -e ${ES8LOCATION} ] ; then
+ cp -pPR ${ES8LOCATION}/lib*${IMGPV} ${D}${libdir}/ES8.0/
+ cp ${ES8LOCATION}/p[dv]* ${D}${bindir}/ES8.0/
+ fi
+
+ rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true
+
+ install -d ${D}${prefix}/share/applications
+ cp ${WORKDIR}/*.desktop ${D}${prefix}/share/applications
+ rm ${D}${prefix}/share/applications/sample.desktop
+
+ install -d ${D}${bindir}/SGX/demos/X11/
+ install -d ${D}${bindir}/SGX/demos/Raw/
+ install -m 0755 ${S}/demos/x11/* ${D}${bindir}/SGX/demos/X11/
+ install -m 0755 ${S}/demos/raw/* ${D}${bindir}/SGX/demos/Raw/
+
+ install -d ${D}${bindir}/SGX/trainingcourses/Raw
+ install -d ${D}${bindir}/SGX/trainingcourses/X11
+ install -m 0755 ${S}/trainingcourses/x11/* ${D}${bindir}/SGX/trainingcourses/X11/
+ install -m 0755 ${S}/trainingcourses/raw/* ${D}${bindir}/SGX/trainingcourses/Raw/
+
+ # Delete objects and linker scripts hidden between the headers
+ find ${D} -name "*.o" -delete
+ find ${D} -name "*.o.cmd" -delete
+
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/99-bufferclass.rules ${D}${sysconfdir}/udev/rules.d/
+
+}
+
+PACKAGES =+ "${PN}-rawdemos \
+ ${PN}-x11demos \
+ ${PN}-rawtrainingcourses \
+ ${PN}-x11trainingcourses \
+"
+
+PACKAGES += "xserver-kdrive-powervrsgx \
+ ${PN}-tests "
+
+# Package the base libraries per silicon revision
+PACKAGES =+ "${PN}-es2 ${PN}-es3 ${PN}-es5 ${PN}-es6 ${PN}-es8"
+RRECOMMENDS_${PN} += "${PN}-es2 ${PN}-es3 ${PN}-es5 ${PN}-es6 ${PN}-es8"
+FILES_${PN}-es2 = "${libdir}/ES2*/* ${bindir}/ES2*/*"
+FILES_${PN}-es3 = "${libdir}/ES3*/* ${bindir}/ES3*/*"
+FILES_${PN}-es5 = "${libdir}/ES5*/* ${bindir}/ES5*/*"
+FILES_${PN}-es6 = "${libdir}/ES6*/* ${bindir}/ES6*/*"
+FILES_${PN}-es8 = "${libdir}/ES8*/* ${bindir}/ES8*/*"
+
+# Stop shlib code from picking a subpackage
+PRIVATE_LIBS_${PN}-es2 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
+PRIVATE_LIBS_${PN}-es3 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
+PRIVATE_LIBS_${PN}-es5 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
+PRIVATE_LIBS_${PN}-es6 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
+PRIVATE_LIBS_${PN}-es8 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
+
+PACKAGES =+ "${PN}-blitwsegl ${PN}-flipwsegl ${PN}-frontwsegl ${PN}-linuxfbwsegl ${PN}-x11wsegl ${PN}-driwsegl"
+FILES_${PN}-blitwsegl = "${libdir}/libpvrPVR2D_BLITWSEGL.so.*"
+FILES_${PN}-flipwsegl = "${libdir}/libpvrPVR2D_FLIPWSEGL.so.*"
+FILES_${PN}-frontwsegl = "${libdir}/libpvrPVR2D_FRONTWSEGL.so.*"
+FILES_${PN}-linuxfbwsegl = "${libdir}/libpvrPVR2D_LINUXFBWSEGL.so.*"
+FILES_${PN}-x11wsegl = "${libdir}/libpvrPVR2D_X11WSEGL.so*"
+FILES_${PN}-driwsegl = "${libdir}/libpvrPVR2D_DRIWSEGL.so*"
+
+PACKAGES =+ "${PN}-blitwsegl-es2 ${PN}-blitwsegl-es3 ${PN}-blitwsegl-es5 ${PN}-blitwsegl-es6 ${PN}-blitwsegl-es8 ${PN}-flipwsegl-es2 ${PN}-flipwsegl-es3 ${PN}-flipwsegl-es5 ${PN}-flipwsegl-es6 ${PN}-flipwsegl-es8 ${PN}-frontwsegl-es2 ${PN}-frontwsegl-es3 ${PN}-frontwsegl-es5 ${PN}-frontwsegl-es6 ${PN}-frontwsegl-es8 ${PN}-linuxfbwsegl-es2 ${PN}-linuxfbwsegl-es3 ${PN}-linuxfbwsegl-es5 ${PN}-linuxfbwsegl-es6 ${PN}-linuxfbwsegl-es8 ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8 ${PN}-driwsegl-es2 ${PN}-driwsegl-es3 ${PN}-driwsegl-es5 ${PN}-driwsegl-es6 ${PN}-driwsegl-es8"
+FILES_${PN}-blitwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_BLITWSEGL.so.*"
+FILES_${PN}-blitwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_BLITWSEGL.so.*"
+FILES_${PN}-blitwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_BLITWSEGL.so.*"
+FILES_${PN}-blitwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_BLITWSEGL.so.*"
+FILES_${PN}-blitwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_BLITWSEGL.so.*"
+RRECOMMENDS_${PN}-blitwsegl = " ${PN}-blitwsegl-es2 ${PN}-blitwsegl-es3 ${PN}-blitwsegl-es5 ${PN}-blitwsegl-es6 ${PN}-blitwsegl-es8"
+
+FILES_${PN}-flipwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_FLIPWSEGL.so.*"
+FILES_${PN}-flipwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_FLIPWSEGL.so.*"
+FILES_${PN}-flipwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_FLIPWSEGL.so.*"
+FILES_${PN}-flipwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_FLIPWSEGL.so.*"
+FILES_${PN}-flipwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_FLIPWSEGL.so.*"
+RRECOMMENDS_${PN}-flipwsegl = " ${PN}-flipwsegl-es2 ${PN}-flipwsegl-es3 ${PN}-flipwsegl-es5 ${PN}-flipwsegl-es6 ${PN}-flipwsegl-es8"
+
+FILES_${PN}-frontwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_FRONTWSEGL.so.*"
+FILES_${PN}-frontwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_FRONTWSEGL.so.*"
+FILES_${PN}-frontwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_FRONTWSEGL.so.*"
+FILES_${PN}-frontwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_FRONTWSEGL.so.*"
+FILES_${PN}-frontwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_FRONTWSEGL.so.*"
+RRECOMMENDS_${PN}-frontwsegl = " ${PN}-frontwsegl-es2 ${PN}-frontwsegl-es3 ${PN}-frontwsegl-es5 ${PN}-frontwsegl-es6 ${PN}-frontwsegl-es8"
+
+FILES_${PN}-linuxfbwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_LINUXFBWSEGL.so.*"
+FILES_${PN}-linuxfbwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_LINUXFBWSEGL.so.*"
+FILES_${PN}-linuxfbwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_LINUXFBWSEGL.so.*"
+FILES_${PN}-linuxfbwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_LINUXFBWSEGL.so.*"
+FILES_${PN}-linuxfbwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_LINUXFBWSEGL.so.*"
+RRECOMMENDS_${PN}-linuxfbwsegl = " ${PN}-linuxfbwsegl-es2 ${PN}-linuxfbwsegl-es3 ${PN}-linuxfbwsegl-es5 ${PN}-linuxfbwsegl-es6 ${PN}-linuxfbwsegl-es8"
+
+FILES_${PN}-x11wsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_X11WSEGL.so.*"
+FILES_${PN}-x11wsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_X11WSEGL.so.*"
+FILES_${PN}-x11wsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_X11WSEGL.so.*"
+FILES_${PN}-x11wsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_X11WSEGL.so.*"
+FILES_${PN}-x11wsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_X11WSEGL.so.*"
+RRECOMMENDS_${PN}-x11wsegl = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8"
+
+FILES_${PN}-driwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_DRIWSEGL.so.*"
+FILES_${PN}-driwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_DRIWSEGL.so.*"
+FILES_${PN}-driwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_DRIWSEGL.so.*"
+FILES_${PN}-driwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_DRIWSEGL.so.*"
+FILES_${PN}-driwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_DRIWSEGL.so.*"
+RRECOMMENDS_${PN}-driwsegl = " ${PN}-driwsegl-es2 ${PN}-driwsegl-es3 ${PN}-driwsegl-es5 ${PN}-driwsegl-es6 ${PN}-driwsegl-es8"
+
+CONFFILES_${PN} = "${sysconfdir}/powervr.ini"
+
+FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${libdir}/ES*/* ${bindir}/pvrsrvinit ${bindir}/cputype ${bindir}/*/*"
+
+FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
+FILES_${PN}-tests = "${bindir}/*"
+FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* \
+ ${libdir}/ES*/.debug ${bindir}/*/.debug\
+ ${bindir}/SGX/demos/*/.debug/* \
+ ${bindir}/SGX/trainingcourses/*/.debug/* \
+ "
+
+FILES_${PN}-rawdemos = "${bindir}/SGX/demos/Raw/*"
+FILES_${PN}-x11demos = "${bindir}/SGX/demos/X11/* ${prefix}/share/applications "
+RRECOMMENDS_${PN}-x11demos = "${PN}-x11wsegl"
+
+FILES_${PN}-rawtrainingcourses = "${bindir}/SGX/trainingcourses/Raw/*"
+FILES_${PN}-x11trainingcourses = "${bindir}/SGX/trainingcourses/X11/*"
+RRECOMMENDS_${PN}-x11trainingcourses = "${PN}-x11wsegl"
+
+# The libs need the kernel-modules
+RRECOMMENDS_${PN} = "omap3-sgx-modules"
+
+# The initscript calls fbset, cputype calls devmem2
+RDEPENDS_${PN} += "fbset devmem2"
+
+#HACK! These are binaries, so we can't guarantee that LDFLAGS match :(
+INSANE_SKIP_${PN} = "ldflags dev-so"
+INSANE_SKIP_${PN}-blitwsegl = "ldflags"
+INSANE_SKIP_${PN}-flipwsegl = "ldflags"
+INSANE_SKIP_${PN}-frontwsegl = "ldflags"
+INSANE_SKIP_${PN}-linuxfbwsegl = "ldflags"
+INSANE_SKIP_${PN}-x11wsegl = "ldflags dev-so"
+INSANE_SKIP_${PN}-driwsegl = "ldflags dev-so"
+INSANE_SKIP_${PN}-tests = "ldflags"
+INSANE_SKIP_xserver-kdrive-powervrsgx = "ldflags"
+
+# Quality control is really poor on these SDKs, so hack around the latest madness:
+FILES_${PN} += "${libdir}/*.so "
+FILES_${PN}-dev = "${includedir}"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "pvr-init"
+INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
+
+# Append to update-rc.d postinst
+pkg_postinst_${PN}_append() {
+rm -f $D${sysconfdir}/powervr-esrev
+
+ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0
+ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0
+}
+
+pkg_postinst_${PN}-blitwsegl() {
+rm -f $D${sysconfdir}/powervr-esrev
+}
+
+pkg_postinst_${PN}-flipwsegl() {
+rm -f $D${sysconfdir}/powervr-esrev
+}
+
+pkg_postinst_${PN}-frontwsegl() {
+rm -f $D${sysconfdir}/powervr-esrev
+}
+pkg_postinst_${PN}-linuxfbwsegl() {
+rm -f $D${sysconfdir}/powervr-esrev
+}
+
+pkg_postinst_${PN}-x11wsegl() {
+rm -f $D${sysconfdir}/powervr-esrev
+
+echo "[default]" > $D${sysconfdir}/powervr.ini
+echo "WindowSystem=libpvrPVR2D_X11WSEGL.so.1" >> $D${sysconfdir}/powervr.ini
+}
+
+pkg_postinst_${PN}-driwsegl() {
+rm -f $D${sysconfdir}/powervr-esrev
+}
+
7 recipes-graphics/libgles/libgles-omap3/99-bufferclass.rules
@@ -0,0 +1,7 @@
+# Give everyone access to bufferclass nodes and make a compatibility symlink for the first one
+SUBSYSTEM=="bccat", MODE="0666"
+KERNEL=="bccat0", SYMLINK+="bc_cat", MODE="0666"
+
+# Give everyone access to v4l nodes
+SUBSYSTEM=="video4linux", MODE="0666"
+
17 recipes-graphics/libgles/libgles-omap3/cputype
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+machine_id() { # return the machine ID
+ awk 'BEGIN { FS=": " } /Hardware/ \
+ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
+}
+
+if [ "$(machine_id)" = "ti8168evm" ] ; then
+ echo TI816x
+elif [ "$(machine_id)" = "am335xevm" ] ; then
+ echo TI33XX
+else
+ devmem2 0x4800244c | \
+ grep 'Read at address' | \
+ sed -e 's/.*): //' | \
+ sed -e 's/0x00005C00/OMAP3503/' -e 's/0x00001C00/OMAP3515/' -e 's/0x00004C00/OMAP3525/' -e 's/0x00000C00/OMAP3530/' -e 's/0x00005E00/OMAP3503/' -e 's/0x00001E00/OMAP3515/' -e 's/0x00004E00/OMAP3525/' -e 's/0x00000E00/OMAP3530/' -e 's/0x00000CC0/OMAP3530/'
+fi
110 recipes-graphics/libgles/libgles-omap3/rc.pvr
@@ -0,0 +1,110 @@
+#!/bin/sh
+PATH=$PATH:/usr/sbin
+
+# Check if an fb device is available. If not then just go ahead and
+# exit because we have no display.
+fbset > /dev/null 2>&1
+if [ "$?" == "1" ]
+then
+ # looks like there is no display, so let's exit
+ exit 0
+fi
+
+BITSPERPIXEL="$(fbset | grep geom | awk '{print $6}')"
+YRES="$(fbset | grep geom | awk '{print $3}')"
+
+CPUTYPE="$(cputype)"
+
+if [ "$1" = "" ]; then
+ echo PVR-INIT: Please use start, stop, or restart.
+ exit 1
+fi
+
+if [ "$1" = "stop" -o "$1" = "restart" ]; then
+ echo Stopping PVR
+ rmmod bufferclass_ti
+ rmmod omaplfb 2>/dev/null
+ rmmod pvrsrvkm 2>/dev/null
+fi
+
+if [ "$1" = "stop" ]; then
+ exit 0
+fi
+
+# Set RGBA ordering to something the drivers like
+if [ "$BITSPERPIXEL" = "32" ] ; then
+ fbset -rgba 8/16,8/8,8/0,8/24
+fi
+
+# Try to enable triple buffering when there's enough VRAM
+fbset -vyres $(expr $YRES \* 3)
+
+sgxprepare () {
+ echo Starting PVR
+ insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko")
+ modprobe omaplfb
+ modprobe bufferclass_ti
+
+ pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3`
+ bc_maj=`grep "bc" /proc/devices | cut -b1,2,3`
+
+ if [ -e /dev/pvrsrvkm ] ; then
+ rm -f /dev/pvrsrvkm
+ fi
+
+ mknod /dev/pvrsrvkm c $pvr_maj 0
+ chmod 666 /dev/pvrsrvkm
+
+ touch /etc/powervr-esrev
+
+ SAVED_ESREVISION="$(cat /etc/powervr-esrev)"
+}
+
+sgxfinish () {
+ if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then
+ echo -n "Starting SGX fixup for"
+ echo " ES${ES_REVISION}.x"
+ cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib
+ cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin
+ echo "${ES_REVISION}" > /etc/powervr-esrev
+ fi
+ /usr/bin/pvrsrvinit
+}
+
+case $CPUTYPE in
+"OMAP3530")
+ sgxprepare
+
+ devmem2 0x48004B48 w 0x2 > /dev/null
+ devmem2 0x48004B10 w 0x1 > /dev/null
+ devmem2 0x48004B00 w 0x2 > /dev/null
+
+ ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')"
+
+ sgxfinish
+ ;;
+"TI33XX")
+ sgxprepare
+
+ devmem2 0x44e01104 w 0x0 > /dev/null
+ devmem2 0x44e00904 w 0x2 > /dev/null
+
+ ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:8: | tail -n1 | awk -F': ' '{print $2}')"
+
+ sgxfinish
+ ;;
+"TI816x")
+ sgxprepare
+
+ devmem2 0x48180F04 w 0x0 > /dev/null
+ devmem2 0x48180900 w 0x2 > /dev/null
+ devmem2 0x48180920 w 0x2 > /dev/null
+
+ ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:6: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')"
+
+ sgxfinish
+ ;;
+*)
+ echo No SGX hardware, not starting PVR
+ ;;
+esac
8 recipes-graphics/libgles/libgles-omap3/sample.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=NAME Demo
+Comment=OGLES Demo
+Exec=EXEC
+Icon=star
+Type=Application
+Categories=Graphics;
+
30 recipes-graphics/libgles/libgles-omap3_4.00.00.01.bb
@@ -0,0 +1,30 @@
+BINLOCATION = "${S}/gfx_rel_es3.x"
+
+ES2LOCATION = "${S}/gfx_rel_es2.x"
+ES3LOCATION = "${S}/gfx_rel_es3.x"
+ES5LOCATION = "${S}/gfx_rel_es5.x"
+
+require libgles-omap3.inc
+
+# download required binary distribution from:
+# http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html
+# see libgles-omap3.inc for detailed installation instructions
+
+PR = "r4"
+
+SGXPV = "4_00_00_01"
+IMGPV = "1.4.14.2616"
+BINFILE := "Graphics_SDK_setuplinux_${SGXPV}.bin"
+
+SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/Graphics_SDK_setuplinux_${SGXPV}.bin \
+ file://cputype \
+ file://rc.pvr \
+ file://sample.desktop \
+ file://99-bufferclass.rules \
+"
+
+SRC_URI[md5sum] = "a027002dcd7164df467b1a315788d5fd"
+SRC_URI[sha256sum] = "62383d15e33adf9349afba063b0f2405a15aa6c4b0b5579b0abdf81db7580df7"
+
+S = "${WORKDIR}/Graphics_SDK_${SGXPV}"
+
28 recipes-graphics/libgles/omap3-sgx-modules/0001-Compile-fixes-for-recent-kernels.patch
@@ -0,0 +1,28 @@
+From ef693358e658a7cbab4d2696108d9d4240ab8096 Mon Sep 17 00:00:00 2001
+From: Mike Rapoport <mike@compulab.co.il>
+Date: Wed, 2 Dec 2009 10:13:15 +0200
+Subject: [PATCH] Compile fixes for recent kernels
+
+---
+ .../3rdparty/dc_omap3430_linux/omaplfb_linux.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
+index 935f78b..4d41829 100755
+--- a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
++++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
+@@ -57,7 +57,11 @@ extern int omap_dispc_request_irq(unsigned long, void (*)(void *), void *);
+ extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
+ extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
+ #else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
++#include <plat/display.h>
++#else
+ #include <mach/display.h>
++#endif
+ #include <linux/console.h>
+ #include <linux/fb.h>
+ #endif
+--
+1.6.4.4
+
31 ...libgles/omap3-sgx-modules/0001-OMAP3-SGX-TI-4.00.00.01-2.6.37-rc1-use-semaphore-ove.patch
@@ -0,0 +1,31 @@
+From f0fce3b189055bcf210c2811594ee9ab1b4e7e3c Mon Sep 17 00:00:00 2001
+From: Robert Nelson <robertcnelson@gmail.com>
+Date: Mon, 1 Nov 2010 10:23:52 -0500
+Subject: [PATCH] OMAP3 SGX TI 4.00.00.01 2.6.37-rc1 use semaphore over mutex
+
+Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
+
+Changes by Koen:
+
+Protect it with #if LINUX_VERSION_CODE => KERNEL_VERSION(2,6,36)
+
+---
+ .../omap3-sgx/services4/srvkm/common/resman.c | 2 +++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+--- /tmp/resman.c 2010-12-04 16:15:37.000000000 +0100
++++ GFX_Linux_KM/services4/srvkm/common/resman.c 2010-12-04 16:16:29.000000000 +0100
+@@ -46,7 +46,11 @@
+ #include <asm/semaphore.h>
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
++static DEFINE_SEMAPHORE(lock);
++#else
+ static DECLARE_MUTEX(lock);
++#endif
+
+ #define ACQUIRE_SYNC_OBJ do { \
+ if (in_interrupt()) { \
+--
+1.7.1
23 recipes-graphics/libgles/omap3-sgx-modules/0002-Compile-fixes-for-recent-kernels.patch
@@ -0,0 +1,23 @@
+--- /tmp/sysutils_linux.c 2010-10-14 09:46:08.000000000 +0200
++++ GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2010-10-14 09:47:20.000000000 +0200
+@@ -32,6 +32,12 @@
+ #include <asm/bug.h>
+ #include <linux/platform_device.h>
+
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,33))
++#include <linux/semaphore.h>
++#include <asm-generic/resource.h>
++#include <plat/omap-pm.h>
++#else
++
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
+ #include <linux/semaphore.h>
+ #include <plat/resource.h>
+@@ -49,6 +55,7 @@
+ #endif
+ #endif
+ #endif
++#endif
+
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) && \
+ (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,29))
281 recipes-graphics/libgles/omap3-sgx-modules/compile-against-3.2.1.patch
@@ -0,0 +1,281 @@
+diff -rupNb GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c GFX_Linux_KM.new/services4/3rdparty/bufferclass_ti/bc_cat.c
+--- GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c 2010-08-11 16:04:41.000000000 +0300
++++ GFX_Linux_KM.new/services4/3rdparty/bufferclass_ti/bc_cat.c 2012-03-24 17:40:09.221642784 +0200
+@@ -39,6 +39,9 @@
+
+ #include <linux/dma-mapping.h>
+
++#include <linux/version.h>
++#define omap_rev_lt_3_0() (omap_rev() < OMAP3430_REV_ES3_0)
++
+ #define DEVNAME "bccat"
+ #define DRVNAME DEVNAME
+ #define DEVICE_COUNT 1
+@@ -121,7 +124,14 @@ static int width_align;
+ static struct file_operations bc_cat_fops = {
+ .open = bc_open,
+ .release = bc_release,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
+ .ioctl = bc_ioctl,
++#else
++ .unlocked_ioctl = bc_ioctl,
++#ifdef CONFIG_COMPAT
++ .compat_ioctl = bc_ioctl,
++#endif
++#endif
+ .mmap = bc_mmap,
+ };
+
+diff -rupNb GFX_Linux_KM/services4/3rdparty/bufferclass_ti/modules.order GFX_Linux_KM.new/services4/3rdparty/bufferclass_ti/modules.order
+--- GFX_Linux_KM/services4/3rdparty/bufferclass_ti/modules.order 2010-09-09 12:25:35.000000000 +0300
++++ GFX_Linux_KM.new/services4/3rdparty/bufferclass_ti/modules.order 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-kernel//proj/AVME10/mahesh/Graphics/Netra/Graphics_SDK_4_00_00_01/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko
+diff -rupNb GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/modules.order GFX_Linux_KM.new/services4/3rdparty/dc_omap3430_linux/modules.order
+--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/modules.order 2010-09-09 12:25:36.000000000 +0300
++++ GFX_Linux_KM.new/services4/3rdparty/dc_omap3430_linux/modules.order 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-kernel//proj/AVME10/mahesh/Graphics/Netra/Graphics_SDK_4_00_00_01/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb.ko
+diff -rupNb GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c GFX_Linux_KM.new/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c
+--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2010-09-08 09:06:41.000000000 +0300
++++ GFX_Linux_KM.new/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2012-03-24 17:41:07.171175165 +0200
+@@ -235,9 +235,9 @@ static OMAP_ERROR UnblankDisplay(OMAPLFB
+ {
+ int res;
+
+- acquire_console_sem();
++ console_lock();
+ res = fb_blank(psDevInfo->psLINFBInfo, 0);
+- release_console_sem();
++ console_unlock();
+ #if !defined (CONFIG_OMAP2_DSS)
+ /* DSS2 returns error if unblank from a non-suspend state */
+ if (res != 0)
+@@ -1113,7 +1113,7 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF
+ OMAP_ERROR eError = OMAP_ERROR_GENERIC;
+ unsigned long FBSize;
+
+- acquire_console_sem();
++ console_lock();
+
+ if (fb_idx < 0 || fb_idx >= num_registered_fb)
+ {
+@@ -1253,7 +1253,7 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF
+ errModPut:
+ module_put(psLINFBOwner);
+ errRelSem:
+- release_console_sem();
++ console_unlock();
+ return eError;
+ }
+
+@@ -1262,7 +1262,7 @@ static void DeInitDev(OMAPLFB_DEVINFO *p
+ struct fb_info *psLINFBInfo = psDevInfo->psLINFBInfo;
+ struct module *psLINFBOwner;
+
+- acquire_console_sem();
++ console_lock();
+
+ psLINFBOwner = psLINFBInfo->fbops->owner;
+
+@@ -1273,7 +1273,7 @@ static void DeInitDev(OMAPLFB_DEVINFO *p
+
+ module_put(psLINFBOwner);
+
+- release_console_sem();
++ console_unlock();
+ }
+
+ OMAP_ERROR OMAPLFBInit(void)
+diff -rupNb GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c GFX_Linux_KM.new/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
+--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2012-03-26 22:23:48.537641318 +0300
++++ GFX_Linux_KM.new/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2012-03-24 17:42:17.063944507 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+-#include <linux/config.h>
++//#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+@@ -45,7 +45,7 @@
+ #include <asm/io.h>
+
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
+-#include <plat/display.h>
++#include <video/omapdss.h>
+ #else
+ #include <asm/arch-omap/display.h>
+ #endif
+@@ -57,7 +57,7 @@ extern void omap_dispc_free_irq(unsigned
+ extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
+ #else
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32))
+-#include <plat/display.h>
++#include <video/omapdss.h>
+ #else
+ #include <mach/display.h>
+ #endif
+diff -rupNb GFX_Linux_KM/services4/3rdparty/dc_ti8168_linux/modules.order GFX_Linux_KM.new/services4/3rdparty/dc_ti8168_linux/modules.order
+--- GFX_Linux_KM/services4/3rdparty/dc_ti8168_linux/modules.order 2010-09-08 17:44:40.000000000 +0300
++++ GFX_Linux_KM.new/services4/3rdparty/dc_ti8168_linux/modules.order 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-kernel//proj/AVME10/mahesh/Graphics/Netra/Graphics_SDK_4_00_00_01/GFX_Linux_KM/services4/3rdparty/dc_ti8168_linux/omaplfb.ko
+diff -rupNb GFX_Linux_KM/services4/srvkm/common/resman.c GFX_Linux_KM.new/services4/srvkm/common/resman.c
+--- GFX_Linux_KM/services4/srvkm/common/resman.c 2012-03-26 22:23:38.387715333 +0300
++++ GFX_Linux_KM.new/services4/srvkm/common/resman.c 2012-03-24 17:42:39.527096575 +0200
+@@ -29,7 +29,7 @@
+
+ #ifdef __linux__
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++//#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/event.c GFX_Linux_KM.new/services4/srvkm/env/linux/event.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/event.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/event.c 2012-03-24 17:43:16.340132850 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/mmap.c GFX_Linux_KM.new/services4/srvkm/env/linux/mmap.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/mmap.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/mmap.c 2012-03-24 17:43:16.343466155 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/mm.c GFX_Linux_KM.new/services4/srvkm/env/linux/mm.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/mm.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/mm.c 2012-03-24 17:43:16.373465914 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/mm.h GFX_Linux_KM.new/services4/srvkm/env/linux/mm.h
+--- GFX_Linux_KM/services4/srvkm/env/linux/mm.h 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/mm.h 2012-03-24 17:43:16.373465914 +0200
+@@ -28,7 +28,7 @@
+ #define __IMG_LINUX_MM_H__
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/module.c GFX_Linux_KM.new/services4/srvkm/env/linux/module.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/module.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/module.c 2012-03-24 17:43:16.376799220 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <linux/init.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/mutils.c GFX_Linux_KM.new/services4/srvkm/env/linux/mutils.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/mutils.c 2012-03-24 17:43:16.380132526 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+-#include <linux/config.h>
++//#include <linux/config.h>
+ #endif
+ #include <linux/version.h>
+
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/mutils.h GFX_Linux_KM.new/services4/srvkm/env/linux/mutils.h
+--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.h 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/mutils.h 2012-03-24 17:43:16.380132526 +0200
+@@ -28,7 +28,7 @@
+ #define __IMG_LINUX_MUTILS_H__
+
+ #ifndef AUTOCONF_INCLUDED
+-#include <linux/config.h>
++//#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c GFX_Linux_KM.new/services4/srvkm/env/linux/osfunc.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/osfunc.c 2012-03-24 17:43:52.139843966 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <linux/version.h>
+@@ -1516,7 +1516,7 @@ typedef struct TIMER_CALLBACK_DATA_TAG
+
+ static TIMER_CALLBACK_DATA sTimers[OS_MAX_TIMERS];
+
+-static spinlock_t sTimerStructLock = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(sTimerStructLock);
+
+ static IMG_VOID OSTimerCallbackWrapper(IMG_UINT32 ui32Data)
+ {
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/proc.c GFX_Linux_KM.new/services4/srvkm/env/linux/proc.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/proc.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/proc.c 2012-03-24 17:43:16.386799140 +0200
+@@ -25,7 +25,7 @@
+ ******************************************************************************/
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <linux/init.h>
+diff -rupNb GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c GFX_Linux_KM.new/services4/srvkm/env/linux/pvr_debug.c
+--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM.new/services4/srvkm/env/linux/pvr_debug.c 2012-03-24 17:43:16.390132446 +0200
+@@ -26,7 +26,7 @@
+
+
+ #ifndef AUTOCONF_INCLUDED
+- #include <linux/config.h>
++ //#include <linux/config.h>
+ #endif
+
+ #include <asm/io.h>
+diff -rupNb GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c GFX_Linux_KM.new/services4/system/omap3430/sysutils_linux.c
+--- GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c 2012-03-26 22:23:55.090926870 +0300
++++ GFX_Linux_KM.new/services4/system/omap3430/sysutils_linux.c 2012-03-24 17:45:44.752268587 +0200
+@@ -30,10 +30,11 @@
+ #include <linux/hardirq.h>
+ #include <linux/spinlock.h>
+ #include <asm/bug.h>
++#include <linux/smp.h>
+
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
+ #include <linux/semaphore.h>
+-#include <plat/resource.h>
++#include <asm/resource.h>
+ #include <plat/omap-pm.h>
+ #else
+
27 recipes-graphics/libgles/omap3-sgx-modules/fix-2.6.27.patch
@@ -0,0 +1,27 @@
+diff -ur GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c /tmp/gs/GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c
+--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2010-09-08 09:06:41.000000000 +0300
++++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2011-01-22 19:29:58.814352221 +0200
+@@ -56,7 +56,11 @@
+ extern void omap_dispc_free_irq(unsigned long, void (*)(void *), void *);
+ extern void omap_dispc_set_plane_base(int plane, IMG_UINT32 phys_addr);
+ #else
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32))
+ #include <plat/display.h>
++#else
++#include <mach/display.h>
++#endif
+ #include <linux/console.h>
+ #include <linux/fb.h>
+ static omap_dispc_isr_t *pOMAPLFBVSyncISRHandle = NULL;
+diff -ur GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c /tmp/gs/GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c
+--- GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c 2010-03-05 11:47:57.000000000 +0200
++++ GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c 2011-01-22 19:28:23.287592886 +0200
+@@ -39,8 +39,6 @@
+
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26))
+ #include <linux/semaphore.h>
+-#include <mach/resource.h>
+-#include <mach/omap-pm.h>
+ #else
+ #include <asm/semaphore.h>
+ #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22))
9 recipes-graphics/libgles/omap3-sgx-modules/fix-makefile.patch
@@ -0,0 +1,9 @@
+--- GFX_Linux_KM/Makefile.orig 2012-03-27 01:10:11.199588947 +0200
++++ GFX_Linux_KM/Makefile 2012-03-27 01:11:59.999588731 +0200
+@@ -1,4 +1,4 @@
+-export KERNELDIR = /opt/oe/stuff/build/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.29-r44/git/
++export KERNELDIR = ${KERNEL_SRC}
+
+ export KERNEL_PATH=$(KERNELDIR)
+ export KERNEL_SRC=$(KERNELDIR)
+
16 recipes-graphics/libgles/omap3-sgx-modules/spinlock_3430.patch
@@ -0,0 +1,16 @@
+diff -urwp GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c
+--- GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c 2011-01-22 23:30:40.725170013 +0200
++++ GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c 2010-09-08 12:03:13.000000000 +0300
+@@ -107,10 +149,10 @@ static IMG_VOID PowerLockUnwrap(SYS_SPEC
+ {
+ PVR_ASSERT(PowerLockWrappedOnCPU(psSysSpecData));
+
+- spin_unlock(&psSysSpecData->sPowerLock);
+-
+ atomic_set(&psSysSpecData->sPowerLockCPU, -1);
+
++ spin_unlock(&psSysSpecData->sPowerLock);
++
+ put_cpu();
+ }
+ }
65 recipes-graphics/libgles/omap3-sgx-modules/update.patch
@@ -0,0 +1,65 @@
+From: Koen Kooi <k-kooi@ti.com>
+Subject: omap3-sgx-modules: make it build with recent kernels
+
+This patch fixes 2 problems:
+
+1) use of omap_rev_*_*() to get ES revision, the patch adding that to the kernel was rejected
+2) removal of .ioctl from struct file_operations for BKL restructuring
+
+Signed-off-by: Koen Kooi <k-kooi@ti.com>
+
+--- /tmp/bc_cat.c 2010-12-04 16:18:19.000000000 +0100
++++ GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c 2010-12-04 16:21:34.000000000 +0100
+@@ -28,6 +28,7 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/fs.h>
++#include <linux/version.h>
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
+ #include <img_defs.h>
+@@ -79,7 +80,7 @@
+
+ static int bc_open(struct inode *i, struct file *f);
+ static int bc_release(struct inode *i, struct file *f);
+-static int bc_ioctl(struct inode *inode, struct file *file,
++static int bc_ioctl(struct file *file,
+ unsigned int cmd, unsigned long arg);
+ static int bc_mmap(struct file *filp, struct vm_area_struct *vma);
+
+@@ -121,8 +122,15 @@
+ static struct file_operations bc_cat_fops = {
+ .open = bc_open,
+ .release = bc_release,
+- .ioctl = bc_ioctl,
+- .mmap = bc_mmap,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
++ .ioctl = bc_ioctl,
++#else
++ .unlocked_ioctl = bc_ioctl,
++#ifdef CONFIG_COMPAT
++ .compat_ioctl = bc_ioctl,
++#endif
++#endif
++ .mmap = bc_mmap,
+ };
+
+
+@@ -492,7 +500,7 @@
+ #ifdef PLAT_TI8168
+ width_align = 8;
+ #else
+- width_align = cpu_is_omap3530() && omap_rev_lt_3_0() ? 32 : 8;
++ width_align = cpu_is_omap3530() && ( omap_rev() < OMAP3430_REV_ES3_0 ) ? 32 : 8;
+ #endif
+ major = register_chrdev(0, DEVNAME, &bc_cat_fops);
+
+@@ -690,7 +698,7 @@
+ return 0;
+ }
+
+-static int bc_ioctl(struct inode *inode, struct file *file,
++static int bc_ioctl(struct file *file,
+ unsigned int cmd, unsigned long arg)
+ {
+ BC_CAT_DEVINFO *devinfo;
25 recipes-graphics/libgles/omap3-sgx-modules_4.00.00.01.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs, nokia version"
+LICENSE = "GPLv2"
+
+PR ="r2"
+
+LIC_FILES_CHKSUM="file://pvr/COPYING;md5=a012d2cd535123cb36c0fb16763c13df"
+
+inherit module
+
+MACHINE_KERNEL_PR_append = "i"
+
+SRCREV = "227a3f2adb753847faba0a926ed7b75c70811826"
+SRC_URI = " \
+ git://git.openpandora.org/sgx.git;protocol=git;branch=nokia \
+"
+
+S = "${WORKDIR}/git"
+MAKE_TARGETS = " KERNELDIR=${STAGING_KERNEL_DIR} "
+
+do_install() {
+ mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
+ cp ${S}/pvr/pvrsrvkm.ko \
+ ${S}/pvr/omaplfb.ko \
+ ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
+}
72 recipes-graphics/libgles/ti-eula-unpack.inc
@@ -0,0 +1,72 @@
+# This file defines function used for unpacking the .bin file downloaded over
+# the http and display EULA.
+# BINFILE - name of the install jammer .bin file
+# TARFILE - name of the tar file inside the install jammer
+# TI_BIN_UNPK_CMDS - contains list of commands separated with colon to be
+# passed while unpacking the bin file. The keyword
+# workdir expands to WORKDIR and commands are appendded
+# with '\n'. Eg. TI_BIN_UNPK_CMDS="Y:Y: qY:workdir"
+# TI_BIN_UNPK_WDEXT - This variable extends workdir path, if user wants to put
+# the output in some internal directory
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('ti_bin_do_unpack', d)
+}
+
+TI_BIN_UNPK_WDEXT += ""
+python ti_bin_do_unpack() {
+
+ import os
+
+ localdata = bb.data.createCopy(d)
+ bb.data.update_data(localdata)
+
+ binfile = bb.data.getVar('BINFILE', localdata)
+ binfile = bb.data.expand(binfile, localdata)
+
+ # Change to the working directory
+ save_cwd = os.getcwd()
+ workdir = bb.data.getVar('WORKDIR', localdata)
+ workdir = bb.data.expand(workdir, localdata)
+ os.chdir(workdir)
+
+ # Get unpack commands
+ cmd_string = bb.data.getVar('TI_BIN_UNPK_CMDS', localdata)
+ cmd_list = cmd_string.split( ":" )
+
+ # Make the InstallJammer binary executable so we can run it
+ os.chmod(binfile, 0755)
+
+ # Run the InstallJammer binary and accept the EULA
+ filename = "HOME=%s ./%s --mode console" % (workdir, binfile)
+
+ # Test executable by printing installer version or help screen (--version currently broken for some installers)
+ # - this is currently broken in some IJ installers - comment out for now
+ #if os.system(filename + " --version") != 0:
+ # print "ERROR: ti-eula-unpack: failed to execute binary installer"
+ # raise bb.build.FuncFailed()
+
+ f = os.popen(filename,'w')
+ for cmd in cmd_list:
+ if cmd == "workdir":
+ wdext = bb.data.getVar('TI_BIN_UNPK_WDEXT', localdata)
+ wdext = bb.data.expand(wdext, localdata)
+ cmd = workdir+wdext
+ print >>f, "%s\n" % cmd
+ f.close()
+
+ # Expand the tarball that was created if required
+ tarfile = bb.data.getVar('TARFILE', localdata)
+ if bool(tarfile) == True:
+ tarfile = bb.data.expand(tarfile, localdata)
+ tcmd = 'tar x --no-same-owner -f %s -C %s' % (tarfile, workdir)
+ if os.system(tcmd) != 0:
+ print "ERROR: ti-eula-unpack: failed to extract tarfile"
+ raise bb.build.FuncFailed()
+
+ # Return to the previous directory
+ os.chdir(save_cwd)
+}
+
+
6 recipes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf
@@ -0,0 +1,6 @@
+# Initial xorg.conf for the OpenPandora
+# Most things are setup automatically by magic pixies in the system.
+#
+# It is suggested this file is not used any more and configuration
+# snippets are placed in xorg.conf.d instead.
+#
40 recipes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf.d/10-evdev.conf
@@ -0,0 +1,40 @@
+#
+# Catch-all evdev loader for udev-based systems
+# We don't simply match on any device since that also adds accelerometers
+# and other devices that we don't really want to use. The list below
+# matches everything but joysticks.
+
+Section "InputClass"
+ Identifier "evdev pointer catchall"
+ MatchIsPointer "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev keyboard catchall"
+ MatchIsKeyboard "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev touchpad catchall"
+ MatchIsTouchpad "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev tablet catchall"
+ MatchIsTablet "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
+
+Section "InputClass"
+ Identifier "evdev touchscreen catchall"
+ MatchIsTouchscreen "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+EndSection
11 recipes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf.d/20-omapfb.conf
@@ -0,0 +1,11 @@
+Section "Device"
+ Identifier "OMAPFB"
+ Driver "omapfb"
+ Option "fb" "/dev/fb0"
+EndSection
+
+Section "Device"
+ Identifier "FBDEV"
+ Driver "fbdev"
+ Option "ShadowFB" "false"
+EndSection
5 ...pes-graphics/xorg-xserver/xserver-xf86-config/openpandora/xorg.conf.d/99-calibration.conf
@@ -0,0 +1,5 @@
+Section "InputClass"
+ Identifier "calibration"
+ MatchProduct "touchscreen"
+ Option "Calibration" "3916 137 3782 201"
+EndSection
23 recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
@@ -0,0 +1,23 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+# Don't forget to bump PRINC if you update the extra files.
+PRINC = "3"
+
+THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
+FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
+
+SRC_URI_append_openpandora = " file://xorg.conf.d/10-evdev.conf \
+ file://xorg.conf.d/20-omapfb.conf \
+ file://xorg.conf.d/99-calibration.conf \
+"
+
+CONFFILES_${PN} += "${sysconfdir}/X11/xorg.conf.d/10-evdev.conf \
+ ${sysconfdir}/X11/xorg.conf.d/20-omapfb.conf \
+ ${sysconfdir}/X11/xorg.conf.d/99-calibration.conf \
+"
+
+do_install_append () {
+ install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
+ install -m 0644 ${WORKDIR}/xorg.conf.d/* ${D}/${sysconfdir}/X11/xorg.conf.d/
+}
+
+FILES_${PN} += "${sysconfdir}/X11/xorg.conf.d"
25 recipes-kernel/linux/linux-omap3-pandora_3.2.bb
@@ -0,0 +1,25 @@
+require recipes-kernel/linux/linux.inc
+
+DESCRIPTION = "Linux kernel for the OpenPandora handheld"
+KERNEL_IMAGETYPE = "uImage"
+
+COMPATIBLE_MACHINE = "openpandora"
+
+# This is on the pandora-3.2 branch
+SRCREV = "33f77242a125e36ab26776ba0bdb303a498edd3e"
+
+SRC_URI = " \
+ git://git.openpandora.org/pandora-kernel.git;protocol=git;branch=pandora-3.2 \
+"
+PV = "3.2.26-pandora+${PR}+git${SRCREV}"
+
+S = "${WORKDIR}/git"
+
+# NOTE: We pull in the default config from the OP kernel GIT tree and keep that config in sync the needs of OE in-tree.
+# It does mean we do not ship the usual defconfig in the OE tree.
+
+KERNEL_DEFCONFIG = "omap3_pandora_defconfig"
+
+do_configure_prepend() {
+ install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
+}

0 comments on commit 11484c5

Please sign in to comment.
Something went wrong with that request. Please try again.