Date   

[PATCH 1/1] meta-fishriver: remove crownbay specifics

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

The fishriver BSP was borrowing a few things from crownbay, but now
has its own branch, so remove the crownbay-specific items.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
meta-fishriver/README | 13 -------------
meta-fishriver/conf/machine/fishriver.conf | 4 ++--
.../linux/linux-yocto-stable_git.bbappend | 4 ++--
.../recipes-kernel/linux/linux-yocto_git.bbappend | 3 +--
4 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/meta-fishriver/README b/meta-fishriver/README
index 1ffbbf1..013f76e 100644
--- a/meta-fishriver/README
+++ b/meta-fishriver/README
@@ -11,19 +11,6 @@ Table of Contents
III. Booting the images in /binary


-I. Special notes on the meta-fishriver BSP layer
-================================================
-
-The meta-fishriver layer currently and temporarily uses the crownbay
-kernel branch. This will change once we have new patches and/or
-config changes for:
-
-- Zigbee
-- wifi
-- upstream gma500
-- EMGD?
-
-
II. Building the meta-fishriver BSP layer
=========================================

diff --git a/meta-fishriver/conf/machine/fishriver.conf b/meta-fishriver/conf/machine/fishriver.conf
index 05c9afe..371871f 100644
--- a/meta-fishriver/conf/machine/fishriver.conf
+++ b/meta-fishriver/conf/machine/fishriver.conf
@@ -38,5 +38,5 @@ GLIBC_EXTRA_OECONF = "--with-tls"
SRCREV_machine_pn-linux-yocto_fishriver ?= "0e3c3904bae04ef13db4049577d9512f7d0e6fa5"
SRCREV_meta_pn-linux-yocto_fishriver ?= "ceb1744ec55408cb637929a3f154379e42642890"

-SRCREV_machine_pn-linux-yocto-stable_crownbay ?= "56fe215d3f1a2cc3a5a26482ac9809ba44495695"
-SRCREV_meta_pn-linux-yocto-stable_crownbay ?= "ec26387cb168e9e0976999b528b5a9dd62e3157a"
+SRCREV_machine_pn-linux-yocto-stable_fishriver ?= "56fe215d3f1a2cc3a5a26482ac9809ba44495695"
+SRCREV_meta_pn-linux-yocto-stable_fishriver ?= "ec26387cb168e9e0976999b528b5a9dd62e3157a"
diff --git a/meta-fishriver/recipes-kernel/linux/linux-yocto-stable_git.bbappend b/meta-fishriver/recipes-kernel/linux/linux-yocto-stable_git.bbappend
index dcc4534..29399ba 100644
--- a/meta-fishriver/recipes-kernel/linux/linux-yocto-stable_git.bbappend
+++ b/meta-fishriver/recipes-kernel/linux/linux-yocto-stable_git.bbappend
@@ -1,5 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

-COMPATIBLE_MACHINE_fishriver = "crownbay"
-KMACHINE_fishriver = "crownbay"
+COMPATIBLE_MACHINE_fishriver = "fishriver"
+KMACHINE_fishriver = "fishriver"

diff --git a/meta-fishriver/recipes-kernel/linux/linux-yocto_git.bbappend b/meta-fishriver/recipes-kernel/linux/linux-yocto_git.bbappend
index ba38dbe..eec65d8 100644
--- a/meta-fishriver/recipes-kernel/linux/linux-yocto_git.bbappend
+++ b/meta-fishriver/recipes-kernel/linux/linux-yocto_git.bbappend
@@ -1,4 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
COMPATIBLE_MACHINE_fishriver = "fishriver"
-# zzzz /yocto/standard/crownbay->fishriver
-KMACHINE_fishriver = "yocto/standard/crownbay"
+KMACHINE_fishriver = "yocto/standard/fishriver"
--
1.7.0.4


[PATCH 0/1] meta-intel: fishriver updates

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

Updates to make use of the Ericsson 3G and new fishriver branch.

The following changes since commit e94dba8309874a82a570db60223d18b2c723c3a5:
Darren Hart (1):
linux-yocto*: correct FILESEXTRAPATHS assignment in all layers

are available in the git repository at:

git://git.yoctoproject.org/meta-intel.git tzanussi/fishriver-updates
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/fishriver-updates

Tom Zanussi (1):
meta-fishriver: remove crownbay specifics

meta-fishriver/README | 13 -------------
meta-fishriver/conf/machine/fishriver.conf | 4 ++--
.../linux/linux-yocto-stable_git.bbappend | 4 ++--
.../recipes-kernel/linux/linux-yocto_git.bbappend | 3 +--
4 files changed, 5 insertions(+), 19 deletions(-)


[PATCH 2/2][KERNEL] meta/fishriver: create initial BSP infrastructure

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

We now dedicate a branch to fishriver, which before now had been happy
with crownbay.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
meta/cfg/kernel-cache/bsp/fishriver/eg20t.cfg | 39 +++++++++++
.../bsp/fishriver/fishriver-standard.scc | 7 ++
meta/cfg/kernel-cache/bsp/fishriver/fishriver.cfg | 69 ++++++++++++++++++++
meta/cfg/kernel-cache/bsp/fishriver/fishriver.scc | 15 ++++
4 files changed, 130 insertions(+), 0 deletions(-)
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/eg20t.cfg
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/fishriver-standard.scc
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/fishriver.cfg
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/fishriver.scc

diff --git a/meta/cfg/kernel-cache/bsp/fishriver/eg20t.cfg b/meta/cfg/kernel-cache/bsp/fishriver/eg20t.cfg
new file mode 100644
index 0000000..225581c
--- /dev/null
+++ b/meta/cfg/kernel-cache/bsp/fishriver/eg20t.cfg
@@ -0,0 +1,39 @@
+# Hardware support for the Platform Controller Hub EG20T
+
+CONFIG_PCH_DMA=y
+CONFIG_PCH_UART_DMA=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PCH=y
+CONFIG_SERIAL_8250_PCH_DMA=y
+
+CONFIG_SERIAL_PCH_UART=y
+CONFIG_SERIAL_CORE=y
+
+CONFIG_SPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_TOPCLIFF_PCH=y
+
+CONFIG_MISC_DEVICES=y
+CONFIG_PCH_PHUB=y
+
+CONFIG_NETDEVICES=y
+CONFIG_NETDEV_1000=y
+CONFIG_PCH_GBE=y
+
+CONFIG_PCH_USBDEV=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_EG20T=y
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_GADGET_SELECTED=y
+
+CONFIG_I2C_EG20T=y
+
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_PCH=y
+
+CONFIG_PCH_IEEE1588=y
+
+CONFIG_CAN=y
+CONFIG_CAN_DEV=y
+CONFIG_PCH_CAN=y
diff --git a/meta/cfg/kernel-cache/bsp/fishriver/fishriver-standard.scc b/meta/cfg/kernel-cache/bsp/fishriver/fishriver-standard.scc
new file mode 100644
index 0000000..897eb3e
--- /dev/null
+++ b/meta/cfg/kernel-cache/bsp/fishriver/fishriver-standard.scc
@@ -0,0 +1,7 @@
+define KMACHINE fishriver
+define KTYPE standard
+define KARCH i386
+
+scc_leaf ktypes/standard fishriver
+
+include fishriver.scc
diff --git a/meta/cfg/kernel-cache/bsp/fishriver/fishriver.cfg b/meta/cfg/kernel-cache/bsp/fishriver/fishriver.cfg
new file mode 100644
index 0000000..5daa65b
--- /dev/null
+++ b/meta/cfg/kernel-cache/bsp/fishriver/fishriver.cfg
@@ -0,0 +1,69 @@
+CONFIG_X86_32=y
+CONFIG_MATOM=y
+CONFIG_PRINTK=y
+
+# Basic hardware support for the box - network, USB, PCI, sound
+CONFIG_NETDEVICES=y
+CONFIG_ATA=y
+CONFIG_ATA_GENERIC=y
+CONFIG_ATA_SFF=y
+CONFIG_PCI=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_R8169=y
+CONFIG_PATA_SCH=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_NET=y
+CONFIG_USB_UHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_HDA_INTEL=y
+CONFIG_SATA_AHCI=y
+
+# Make sure these are on, otherwise the bootup won't be fun
+CONFIG_EXT3_FS=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_MODULES=y
+CONFIG_SHMEM=y
+CONFIG_TMPFS=y
+CONFIG_PACKET=y
+
+# These are needed for the Poulsbo kernel modules
+CONFIG_I2C=y
+CONFIG_AGP=y
+CONFIG_VFAT_FS=y
+CONFIG_PM=y
+CONFIG_ACPI=y
+CONFIG_FB=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_INPUT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_IVTV=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L2_COMMON=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_VIDEO_FB_IVTV=y
+
+# Needed for booting (and using) USB memory sticks
+CONFIG_USB_STORAGE=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_RD_GZIP=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
diff --git a/meta/cfg/kernel-cache/bsp/fishriver/fishriver.scc b/meta/cfg/kernel-cache/bsp/fishriver/fishriver.scc
new file mode 100644
index 0000000..0abde0d
--- /dev/null
+++ b/meta/cfg/kernel-cache/bsp/fishriver/fishriver.scc
@@ -0,0 +1,15 @@
+kconf hardware fishriver.cfg
+kconf hardware fishriver.cfg
+
+git merge yocto/emgd
+
+include features/intel-e1xxxx/intel-e1xxxx.scc
+include features/drm-emgd/drm-emgd.scc
+include features/dmaengine/dmaengine.scc
+include features/serial/8250.scc
+include features/ericsson-3g/f5521gw.scc
+
+include features/logbuf/size-normal.scc
+
+include features/latencytop/latencytop.scc
+include features/profiling/profiling.scc
--
1.7.0.4


[PATCH 1/2][KERNEL] meta: add ericsson-3g f5521gw feature

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

For use initially by the fishriver bsp.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
.../kernel-cache/features/ericsson-3g/f5521gw.cfg | 3 +++
.../kernel-cache/features/ericsson-3g/f5521gw.scc | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
create mode 100644 meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.cfg
create mode 100644 meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.scc

diff --git a/meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.cfg b/meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.cfg
new file mode 100644
index 0000000..141435e
--- /dev/null
+++ b/meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.cfg
@@ -0,0 +1,3 @@
+CONFIG_USB_ACM=m
+CONFIG_USB_WDM=m
+CONFIG_USB_CDC_NCM=m
diff --git a/meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.scc b/meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.scc
new file mode 100644
index 0000000..f98d479
--- /dev/null
+++ b/meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.scc
@@ -0,0 +1,3 @@
+kconf hardware f5521gw.cfg
+
+include features/usb-net/usb-net.scc
--
1.7.0.4


[PATCH 0/2][KERNEL] meta-intel: fishriver updates

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

This patchset adds an ericsson 3g feature and also creates a separate
bsp for fishriver, which had previously been hijacking crownbay.

Please pull into linux-yocto-2.6.37.

Pull URL: git://git.yoctoproject.org/linux-yocto-2.6.37-contrib
Branch: tzanussi/yocto/standard/fishriver
Browse: http://git.yoctoproject.org/cgit.cgi/linux-yocto-2.6.37-contrib/log/?h=tzanussi/yocto/standard/fishriver

Tom Zanussi (2):
meta: add ericsson-3g f5521gw feature
meta/fishriver: create initial BSP infrastructure

meta/cfg/kernel-cache/bsp/fishriver/eg20t.cfg | 39 +++++++++++
.../bsp/fishriver/fishriver-standard.scc | 7 ++
meta/cfg/kernel-cache/bsp/fishriver/fishriver.cfg | 69 ++++++++++++++++++++
meta/cfg/kernel-cache/bsp/fishriver/fishriver.scc | 15 ++++
.../kernel-cache/features/ericsson-3g/f5521gw.cfg | 3 +
.../kernel-cache/features/ericsson-3g/f5521gw.scc | 3 +
6 files changed, 136 insertions(+), 0 deletions(-)
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/eg20t.cfg
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/fishriver-standard.scc
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/fishriver.cfg
create mode 100644 meta/cfg/kernel-cache/bsp/fishriver/fishriver.scc
create mode 100644 meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.cfg
create mode 100644 meta/cfg/kernel-cache/features/ericsson-3g/f5521gw.scc


[PATCH 2/2][KERNEL] USB CDC NCM host driver

tom.zanussi@...
 

From: Alexey Orishko

The patch provides USB CDC NCM host driver support in the Linux Kernel.

Changes:
drivers/net/usb/cdc_ncm.c:
- initial submission of the CDC NCM host driver;
- verified on Intel 32/64 bit, Intel Atom, ST-Ericsson U8500 (ARM)
- throughput measured over 100 Mbits duplex;
- driver supports 16-bit NTB format only, but it is more than enough for
transfers up to 64K;
- driver can handle up to 32 datagrams in received NTB;
- timer is used to collect several packets in Tx direction

drivers/net/usb/Kconfig:
- a new entry to compile CDC NCM host driver
drivers/net/usb/Makefile:
- a new entry to compile CDC NCM host driver

commit 900d495a189dc3ff5952b98a77d18e3018f8286c upstream

Signed-off-by: Alexey Orishko
Signed-off-by: David S. Miller
Integrated-by: Dongxiao Xu
---
drivers/net/usb/Kconfig | 19 +
drivers/net/usb/Makefile | 1 +
drivers/net/usb/cdc_ncm.c | 1213 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 1233 insertions(+), 0 deletions(-)
create mode 100644 drivers/net/usb/cdc_ncm.c

diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 52ffabe..6f600cc 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -196,6 +196,25 @@ config USB_NET_CDC_EEM
IEEE 802 "local assignment" bit is set in the address, a "usbX"
name is used instead.

+config USB_NET_CDC_NCM
+ tristate "CDC NCM support"
+ depends on USB_USBNET
+ default y
+ help
+ This driver provides support for CDC NCM (Network Control Model
+ Device USB Class Specification). The CDC NCM specification is
+ available from <http://www.usb.org/>.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module.
+
+ This driver should work with at least the following devices:
+ * ST-Ericsson M700 LTE FDD/TDD Mobile Broadband Modem (ref. design)
+ * ST-Ericsson M5730 HSPA+ Mobile Broadband Modem (reference design)
+ * ST-Ericsson M570 HSPA+ Mobile Broadband Modem (reference design)
+ * ST-Ericsson M343 HSPA Mobile Broadband Modem (reference design)
+ * Ericsson F5521gw Mobile Broadband Module
+
config USB_NET_DM9601
tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices"
depends on USB_USBNET
diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
index a19b025..cac1703 100644
--- a/drivers/net/usb/Makefile
+++ b/drivers/net/usb/Makefile
@@ -26,4 +26,5 @@ obj-$(CONFIG_USB_CDC_PHONET) += cdc-phonet.o
obj-$(CONFIG_USB_IPHETH) += ipheth.o
obj-$(CONFIG_USB_SIERRA_NET) += sierra_net.o
obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o
+obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
new file mode 100644
index 0000000..593c104
--- /dev/null
+++ b/drivers/net/usb/cdc_ncm.c
@@ -0,0 +1,1213 @@
+/*
+ * cdc_ncm.c
+ *
+ * Copyright (C) ST-Ericsson 2010
+ * Contact: Alexey Orishko <alexey.orishko@...>
+ * Original author: Hans Petter Selasky <hans.petter.selasky@...>
+ *
+ * USB Host Driver for Network Control Model (NCM)
+ * http://www.usb.org/developers/devclass_docs/NCM10.zip
+ *
+ * The NCM encoding, decoding and initialization logic
+ * derives from FreeBSD 8.x. if_cdce.c and if_cdcereg.h
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose this file to be licensed under the terms
+ * of the GNU General Public License (GPL) Version 2 or the 2-clause
+ * BSD license listed below:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/netdevice.h>
+#include <linux/ctype.h>
+#include <linux/ethtool.h>
+#include <linux/workqueue.h>
+#include <linux/mii.h>
+#include <linux/crc32.h>
+#include <linux/usb.h>
+#include <linux/version.h>
+#include <linux/timer.h>
+#include <linux/spinlock.h>
+#include <linux/atomic.h>
+#include <linux/usb/usbnet.h>
+#include <linux/usb/cdc.h>
+
+#define DRIVER_VERSION "30-Nov-2010"
+
+/* CDC NCM subclass 3.2.1 */
+#define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10
+
+/* Maximum NTB length */
+#define CDC_NCM_NTB_MAX_SIZE_TX 16384 /* bytes */
+#define CDC_NCM_NTB_MAX_SIZE_RX 16384 /* bytes */
+
+/* Minimum value for MaxDatagramSize, ch. 6.2.9 */
+#define CDC_NCM_MIN_DATAGRAM_SIZE 1514 /* bytes */
+
+#define CDC_NCM_MIN_TX_PKT 512 /* bytes */
+
+/* Default value for MaxDatagramSize */
+#define CDC_NCM_MAX_DATAGRAM_SIZE 2048 /* bytes */
+
+/*
+ * Maximum amount of datagrams in NCM Datagram Pointer Table, not counting
+ * the last NULL entry. Any additional datagrams in NTB would be discarded.
+ */
+#define CDC_NCM_DPT_DATAGRAMS_MAX 32
+
+/* Restart the timer, if amount of datagrams is less than given value */
+#define CDC_NCM_RESTART_TIMER_DATAGRAM_CNT 3
+
+/* The following macro defines the minimum header space */
+#define CDC_NCM_MIN_HDR_SIZE \
+ (sizeof(struct usb_cdc_ncm_nth16) + sizeof(struct usb_cdc_ncm_ndp16) + \
+ (CDC_NCM_DPT_DATAGRAMS_MAX + 1) * sizeof(struct usb_cdc_ncm_dpe16))
+
+struct connection_speed_change {
+ __le32 USBitRate; /* holds 3GPP downlink value, bits per second */
+ __le32 DSBitRate; /* holds 3GPP uplink value, bits per second */
+} __attribute__ ((packed));
+
+struct cdc_ncm_data {
+ struct usb_cdc_ncm_nth16 nth16;
+ struct usb_cdc_ncm_ndp16 ndp16;
+ struct usb_cdc_ncm_dpe16 dpe16[CDC_NCM_DPT_DATAGRAMS_MAX + 1];
+};
+
+struct cdc_ncm_ctx {
+ struct cdc_ncm_data rx_ncm;
+ struct cdc_ncm_data tx_ncm;
+ struct usb_cdc_ncm_ntb_parameters ncm_parm;
+ struct timer_list tx_timer;
+
+ const struct usb_cdc_ncm_desc *func_desc;
+ const struct usb_cdc_header_desc *header_desc;
+ const struct usb_cdc_union_desc *union_desc;
+ const struct usb_cdc_ether_desc *ether_desc;
+
+ struct net_device *netdev;
+ struct usb_device *udev;
+ struct usb_host_endpoint *in_ep;
+ struct usb_host_endpoint *out_ep;
+ struct usb_host_endpoint *status_ep;
+ struct usb_interface *intf;
+ struct usb_interface *control;
+ struct usb_interface *data;
+
+ struct sk_buff *tx_curr_skb;
+ struct sk_buff *tx_rem_skb;
+
+ spinlock_t mtx;
+
+ u32 tx_timer_pending;
+ u32 tx_curr_offset;
+ u32 tx_curr_last_offset;
+ u32 tx_curr_frame_num;
+ u32 rx_speed;
+ u32 tx_speed;
+ u32 rx_max;
+ u32 tx_max;
+ u32 max_datagram_size;
+ u16 tx_max_datagrams;
+ u16 tx_remainder;
+ u16 tx_modulus;
+ u16 tx_ndp_modulus;
+ u16 tx_seq;
+ u16 connected;
+ u8 data_claimed;
+ u8 control_claimed;
+};
+
+static void cdc_ncm_tx_timeout(unsigned long arg);
+static const struct driver_info cdc_ncm_info;
+static struct usb_driver cdc_ncm_driver;
+static struct ethtool_ops cdc_ncm_ethtool_ops;
+
+static const struct usb_device_id cdc_devs[] = {
+ { USB_INTERFACE_INFO(USB_CLASS_COMM,
+ USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
+ .driver_info = (unsigned long)&cdc_ncm_info,
+ },
+ {
+ },
+};
+
+MODULE_DEVICE_TABLE(usb, cdc_devs);
+
+static void
+cdc_ncm_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *info)
+{
+ struct usbnet *dev = netdev_priv(net);
+
+ strncpy(info->driver, dev->driver_name, sizeof(info->driver));
+ strncpy(info->version, DRIVER_VERSION, sizeof(info->version));
+ strncpy(info->fw_version, dev->driver_info->description,
+ sizeof(info->fw_version));
+ usb_make_path(dev->udev, info->bus_info, sizeof(info->bus_info));
+}
+
+static int
+cdc_ncm_do_request(struct cdc_ncm_ctx *ctx, struct usb_cdc_notification *req,
+ void *data, u16 flags, u16 *actlen, u16 timeout)
+{
+ int err;
+
+ err = usb_control_msg(ctx->udev, (req->bmRequestType & USB_DIR_IN) ?
+ usb_rcvctrlpipe(ctx->udev, 0) :
+ usb_sndctrlpipe(ctx->udev, 0),
+ req->bNotificationType, req->bmRequestType,
+ req->wValue,
+ req->wIndex, data,
+ req->wLength, timeout);
+
+ if (err < 0) {
+ if (actlen)
+ *actlen = 0;
+ return err;
+ }
+
+ if (actlen)
+ *actlen = err;
+
+ return 0;
+}
+
+static u8 cdc_ncm_setup(struct cdc_ncm_ctx *ctx)
+{
+ struct usb_cdc_notification req;
+ u32 val;
+ __le16 max_datagram_size;
+ u8 flags;
+ u8 iface_no;
+ int err;
+
+ iface_no = ctx->control->cur_altsetting->desc.bInterfaceNumber;
+
+ req.bmRequestType = USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE;
+ req.bNotificationType = USB_CDC_GET_NTB_PARAMETERS;
+ req.wValue = 0;
+ req.wIndex = cpu_to_le16(iface_no);
+ req.wLength = cpu_to_le16(sizeof(ctx->ncm_parm));
+
+ err = cdc_ncm_do_request(ctx, &req, &ctx->ncm_parm, 0, NULL, 1000);
+ if (err) {
+ pr_debug("failed GET_NTB_PARAMETERS\n");
+ return 1;
+ }
+
+ /* read correct set of parameters according to device mode */
+ ctx->rx_max = le32_to_cpu(ctx->ncm_parm.dwNtbInMaxSize);
+ ctx->tx_max = le32_to_cpu(ctx->ncm_parm.dwNtbOutMaxSize);
+ ctx->tx_remainder = le16_to_cpu(ctx->ncm_parm.wNdpOutPayloadRemainder);
+ ctx->tx_modulus = le16_to_cpu(ctx->ncm_parm.wNdpOutDivisor);
+ ctx->tx_ndp_modulus = le16_to_cpu(ctx->ncm_parm.wNdpOutAlignment);
+
+ if (ctx->func_desc != NULL)
+ flags = ctx->func_desc->bmNetworkCapabilities;
+ else
+ flags = 0;
+
+ pr_debug("dwNtbInMaxSize=%u dwNtbOutMaxSize=%u "
+ "wNdpOutPayloadRemainder=%u wNdpOutDivisor=%u "
+ "wNdpOutAlignment=%u flags=0x%x\n",
+ ctx->rx_max, ctx->tx_max, ctx->tx_remainder, ctx->tx_modulus,
+ ctx->tx_ndp_modulus, flags);
+
+ /* max count of tx datagrams without terminating NULL entry */
+ ctx->tx_max_datagrams = CDC_NCM_DPT_DATAGRAMS_MAX;
+
+ /* verify maximum size of received NTB in bytes */
+ if ((ctx->rx_max <
+ (CDC_NCM_MIN_HDR_SIZE + CDC_NCM_MIN_DATAGRAM_SIZE)) ||
+ (ctx->rx_max > CDC_NCM_NTB_MAX_SIZE_RX)) {
+ pr_debug("Using default maximum receive length=%d\n",
+ CDC_NCM_NTB_MAX_SIZE_RX);
+ ctx->rx_max = CDC_NCM_NTB_MAX_SIZE_RX;
+ }
+
+ /* verify maximum size of transmitted NTB in bytes */
+ if ((ctx->tx_max <
+ (CDC_NCM_MIN_HDR_SIZE + CDC_NCM_MIN_DATAGRAM_SIZE)) ||
+ (ctx->tx_max > CDC_NCM_NTB_MAX_SIZE_TX)) {
+ pr_debug("Using default maximum transmit length=%d\n",
+ CDC_NCM_NTB_MAX_SIZE_TX);
+ ctx->tx_max = CDC_NCM_NTB_MAX_SIZE_TX;
+ }
+
+ /*
+ * verify that the structure alignment is:
+ * - power of two
+ * - not greater than the maximum transmit length
+ * - not less than four bytes
+ */
+ val = ctx->tx_ndp_modulus;
+
+ if ((val < USB_CDC_NCM_NDP_ALIGN_MIN_SIZE) ||
+ (val != ((-val) & val)) || (val >= ctx->tx_max)) {
+ pr_debug("Using default alignment: 4 bytes\n");
+ ctx->tx_ndp_modulus = USB_CDC_NCM_NDP_ALIGN_MIN_SIZE;
+ }
+
+ /*
+ * verify that the payload alignment is:
+ * - power of two
+ * - not greater than the maximum transmit length
+ * - not less than four bytes
+ */
+ val = ctx->tx_modulus;
+
+ if ((val < USB_CDC_NCM_NDP_ALIGN_MIN_SIZE) ||
+ (val != ((-val) & val)) || (val >= ctx->tx_max)) {
+ pr_debug("Using default transmit modulus: 4 bytes\n");
+ ctx->tx_modulus = USB_CDC_NCM_NDP_ALIGN_MIN_SIZE;
+ }
+
+ /* verify the payload remainder */
+ if (ctx->tx_remainder >= ctx->tx_modulus) {
+ pr_debug("Using default transmit remainder: 0 bytes\n");
+ ctx->tx_remainder = 0;
+ }
+
+ /* adjust TX-remainder according to NCM specification. */
+ ctx->tx_remainder = ((ctx->tx_remainder - ETH_HLEN) &
+ (ctx->tx_modulus - 1));
+
+ /* additional configuration */
+
+ /* set CRC Mode */
+ req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
+ req.bNotificationType = USB_CDC_SET_CRC_MODE;
+ req.wValue = cpu_to_le16(USB_CDC_NCM_CRC_NOT_APPENDED);
+ req.wIndex = cpu_to_le16(iface_no);
+ req.wLength = 0;
+
+ err = cdc_ncm_do_request(ctx, &req, NULL, 0, NULL, 1000);
+ if (err)
+ pr_debug("Setting CRC mode off failed\n");
+
+ /* set NTB format */
+ req.bmRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
+ req.bNotificationType = USB_CDC_SET_NTB_FORMAT;
+ req.wValue = cpu_to_le16(USB_CDC_NCM_NTB16_FORMAT);
+ req.wIndex = cpu_to_le16(iface_no);
+ req.wLength = 0;
+
+ err = cdc_ncm_do_request(ctx, &req, NULL, 0, NULL, 1000);
+ if (err)
+ pr_debug("Setting NTB format to 16-bit failed\n");
+
+ /* set Max Datagram Size (MTU) */
+ req.bmRequestType = USB_TYPE_CLASS | USB_DIR_IN | USB_RECIP_INTERFACE;
+ req.bNotificationType = USB_CDC_GET_MAX_DATAGRAM_SIZE;
+ req.wValue = 0;
+ req.wIndex = cpu_to_le16(iface_no);
+ req.wLength = cpu_to_le16(2);
+
+ err = cdc_ncm_do_request(ctx, &req, &max_datagram_size, 0, NULL, 1000);
+ if (err) {
+ pr_debug(" GET_MAX_DATAGRAM_SIZE failed, using size=%u\n",
+ CDC_NCM_MIN_DATAGRAM_SIZE);
+ /* use default */
+ ctx->max_datagram_size = CDC_NCM_MIN_DATAGRAM_SIZE;
+ } else {
+ ctx->max_datagram_size = le16_to_cpu(max_datagram_size);
+
+ if (ctx->max_datagram_size < CDC_NCM_MIN_DATAGRAM_SIZE)
+ ctx->max_datagram_size = CDC_NCM_MIN_DATAGRAM_SIZE;
+ else if (ctx->max_datagram_size > CDC_NCM_MAX_DATAGRAM_SIZE)
+ ctx->max_datagram_size = CDC_NCM_MAX_DATAGRAM_SIZE;
+ }
+
+ if (ctx->netdev->mtu != (ctx->max_datagram_size - ETH_HLEN))
+ ctx->netdev->mtu = ctx->max_datagram_size - ETH_HLEN;
+
+ return 0;
+}
+
+static void
+cdc_ncm_find_endpoints(struct cdc_ncm_ctx *ctx, struct usb_interface *intf)
+{
+ struct usb_host_endpoint *e;
+ u8 ep;
+
+ for (ep = 0; ep < intf->cur_altsetting->desc.bNumEndpoints; ep++) {
+
+ e = intf->cur_altsetting->endpoint + ep;
+ switch (e->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
+ case USB_ENDPOINT_XFER_INT:
+ if (usb_endpoint_dir_in(&e->desc)) {
+ if (ctx->status_ep == NULL)
+ ctx->status_ep = e;
+ }
+ break;
+
+ case USB_ENDPOINT_XFER_BULK:
+ if (usb_endpoint_dir_in(&e->desc)) {
+ if (ctx->in_ep == NULL)
+ ctx->in_ep = e;
+ } else {
+ if (ctx->out_ep == NULL)
+ ctx->out_ep = e;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+static void cdc_ncm_free(struct cdc_ncm_ctx *ctx)
+{
+ if (ctx == NULL)
+ return;
+
+ del_timer_sync(&ctx->tx_timer);
+
+ if (ctx->data_claimed) {
+ usb_set_intfdata(ctx->data, NULL);
+ usb_driver_release_interface(driver_of(ctx->intf), ctx->data);
+ }
+
+ if (ctx->control_claimed) {
+ usb_set_intfdata(ctx->control, NULL);
+ usb_driver_release_interface(driver_of(ctx->intf),
+ ctx->control);
+ }
+
+ if (ctx->tx_rem_skb != NULL) {
+ dev_kfree_skb_any(ctx->tx_rem_skb);
+ ctx->tx_rem_skb = NULL;
+ }
+
+ if (ctx->tx_curr_skb != NULL) {
+ dev_kfree_skb_any(ctx->tx_curr_skb);
+ ctx->tx_curr_skb = NULL;
+ }
+
+ kfree(ctx);
+}
+
+static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)
+{
+ struct cdc_ncm_ctx *ctx;
+ struct usb_driver *driver;
+ u8 *buf;
+ int len;
+ int temp;
+ u8 iface_no;
+
+ ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
+ if (ctx == NULL)
+ goto error;
+
+ memset(ctx, 0, sizeof(*ctx));
+
+ init_timer(&ctx->tx_timer);
+ spin_lock_init(&ctx->mtx);
+ ctx->netdev = dev->net;
+
+ /* store ctx pointer in device data field */
+ dev->data[0] = (unsigned long)ctx;
+
+ /* get some pointers */
+ driver = driver_of(intf);
+ buf = intf->cur_altsetting->extra;
+ len = intf->cur_altsetting->extralen;
+
+ ctx->udev = dev->udev;
+ ctx->intf = intf;
+
+ /* parse through descriptors associated with control interface */
+ while ((len > 0) && (buf[0] > 2) && (buf[0] <= len)) {
+
+ if (buf[1] != USB_DT_CS_INTERFACE)
+ goto advance;
+
+ switch (buf[2]) {
+ case USB_CDC_UNION_TYPE:
+ if (buf[0] < sizeof(*(ctx->union_desc)))
+ break;
+
+ ctx->union_desc =
+ (const struct usb_cdc_union_desc *)buf;
+
+ ctx->control = usb_ifnum_to_if(dev->udev,
+ ctx->union_desc->bMasterInterface0);
+ ctx->data = usb_ifnum_to_if(dev->udev,
+ ctx->union_desc->bSlaveInterface0);
+ break;
+
+ case USB_CDC_ETHERNET_TYPE:
+ if (buf[0] < sizeof(*(ctx->ether_desc)))
+ break;
+
+ ctx->ether_desc =
+ (const struct usb_cdc_ether_desc *)buf;
+
+ dev->hard_mtu =
+ le16_to_cpu(ctx->ether_desc->wMaxSegmentSize);
+
+ if (dev->hard_mtu <
+ (CDC_NCM_MIN_DATAGRAM_SIZE - ETH_HLEN))
+ dev->hard_mtu =
+ CDC_NCM_MIN_DATAGRAM_SIZE - ETH_HLEN;
+
+ else if (dev->hard_mtu >
+ (CDC_NCM_MAX_DATAGRAM_SIZE - ETH_HLEN))
+ dev->hard_mtu =
+ CDC_NCM_MAX_DATAGRAM_SIZE - ETH_HLEN;
+ break;
+
+ case USB_CDC_NCM_TYPE:
+ if (buf[0] < sizeof(*(ctx->func_desc)))
+ break;
+
+ ctx->func_desc = (const struct usb_cdc_ncm_desc *)buf;
+ break;
+
+ default:
+ break;
+ }
+advance:
+ /* advance to next descriptor */
+ temp = buf[0];
+ buf += temp;
+ len -= temp;
+ }
+
+ /* check if we got everything */
+ if ((ctx->control == NULL) || (ctx->data == NULL) ||
+ (ctx->ether_desc == NULL))
+ goto error;
+
+ /* claim interfaces, if any */
+ if (ctx->data != intf) {
+ temp = usb_driver_claim_interface(driver, ctx->data, dev);
+ if (temp)
+ goto error;
+ ctx->data_claimed = 1;
+ }
+
+ if (ctx->control != intf) {
+ temp = usb_driver_claim_interface(driver, ctx->control, dev);
+ if (temp)
+ goto error;
+ ctx->control_claimed = 1;
+ }
+
+ iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber;
+
+ /* reset data interface */
+ temp = usb_set_interface(dev->udev, iface_no, 0);
+ if (temp)
+ goto error;
+
+ /* initialize data interface */
+ if (cdc_ncm_setup(ctx))
+ goto error;
+
+ /* configure data interface */
+ temp = usb_set_interface(dev->udev, iface_no, 1);
+ if (temp)
+ goto error;
+
+ cdc_ncm_find_endpoints(ctx, ctx->data);
+ cdc_ncm_find_endpoints(ctx, ctx->control);
+
+ if ((ctx->in_ep == NULL) || (ctx->out_ep == NULL) ||
+ (ctx->status_ep == NULL))
+ goto error;
+
+ dev->net->ethtool_ops = &cdc_ncm_ethtool_ops;
+
+ usb_set_intfdata(ctx->data, dev);
+ usb_set_intfdata(ctx->control, dev);
+ usb_set_intfdata(ctx->intf, dev);
+
+ temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress);
+ if (temp)
+ goto error;
+
+ dev_info(&dev->udev->dev, "MAC-Address: "
+ "0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
+ dev->net->dev_addr[0], dev->net->dev_addr[1],
+ dev->net->dev_addr[2], dev->net->dev_addr[3],
+ dev->net->dev_addr[4], dev->net->dev_addr[5]);
+
+ dev->in = usb_rcvbulkpipe(dev->udev,
+ ctx->in_ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ dev->out = usb_sndbulkpipe(dev->udev,
+ ctx->out_ep->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ dev->status = ctx->status_ep;
+ dev->rx_urb_size = ctx->rx_max;
+
+ /*
+ * We should get an event when network connection is "connected" or
+ * "disconnected". Set network connection in "disconnected" state
+ * (carrier is OFF) during attach, so the IP network stack does not
+ * start IPv6 negotiation and more.
+ */
+ netif_carrier_off(dev->net);
+ ctx->tx_speed = ctx->rx_speed = 0;
+ return 0;
+
+error:
+ cdc_ncm_free((struct cdc_ncm_ctx *)dev->data[0]);
+ dev->data[0] = 0;
+ dev_info(&dev->udev->dev, "Descriptor failure\n");
+ return -ENODEV;
+}
+
+static void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf)
+{
+ struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
+ struct usb_driver *driver;
+
+ if (ctx == NULL)
+ return; /* no setup */
+
+ driver = driver_of(intf);
+
+ usb_set_intfdata(ctx->data, NULL);
+ usb_set_intfdata(ctx->control, NULL);
+ usb_set_intfdata(ctx->intf, NULL);
+
+ /* release interfaces, if any */
+ if (ctx->data_claimed) {
+ usb_driver_release_interface(driver, ctx->data);
+ ctx->data_claimed = 0;
+ }
+
+ if (ctx->control_claimed) {
+ usb_driver_release_interface(driver, ctx->control);
+ ctx->control_claimed = 0;
+ }
+
+ cdc_ncm_free(ctx);
+}
+
+static void cdc_ncm_zero_fill(u8 *ptr, u32 first, u32 end, u32 max)
+{
+ if (first >= max)
+ return;
+ if (first >= end)
+ return;
+ if (end > max)
+ end = max;
+ memset(ptr + first, 0, end - first);
+}
+
+static struct sk_buff *
+cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb)
+{
+ struct sk_buff *skb_out;
+ u32 rem;
+ u32 offset;
+ u32 last_offset;
+ u16 n = 0;
+ u8 timeout = 0;
+
+ /* if there is a remaining skb, it gets priority */
+ if (skb != NULL)
+ swap(skb, ctx->tx_rem_skb);
+ else
+ timeout = 1;
+
+ /*
+ * +----------------+
+ * | skb_out |
+ * +----------------+
+ * ^ offset
+ * ^ last_offset
+ */
+
+ /* check if we are resuming an OUT skb */
+ if (ctx->tx_curr_skb != NULL) {
+ /* pop variables */
+ skb_out = ctx->tx_curr_skb;
+ offset = ctx->tx_curr_offset;
+ last_offset = ctx->tx_curr_last_offset;
+ n = ctx->tx_curr_frame_num;
+
+ } else {
+ /* reset variables */
+ skb_out = alloc_skb(ctx->tx_max, GFP_ATOMIC);
+ if (skb_out == NULL) {
+ if (skb != NULL) {
+ dev_kfree_skb_any(skb);
+ ctx->netdev->stats.tx_dropped++;
+ }
+ goto exit_no_skb;
+ }
+
+ /* make room for NTH and NDP */
+ offset = ALIGN(sizeof(struct usb_cdc_ncm_nth16),
+ ctx->tx_ndp_modulus) +
+ sizeof(struct usb_cdc_ncm_ndp16) +
+ (ctx->tx_max_datagrams + 1) *
+ sizeof(struct usb_cdc_ncm_dpe16);
+
+ /* store last valid offset before alignment */
+ last_offset = offset;
+ /* align first Datagram offset correctly */
+ offset = ALIGN(offset, ctx->tx_modulus) + ctx->tx_remainder;
+ /* zero buffer till the first IP datagram */
+ cdc_ncm_zero_fill(skb_out->data, 0, offset, offset);
+ n = 0;
+ ctx->tx_curr_frame_num = 0;
+ }
+
+ for (; n < ctx->tx_max_datagrams; n++) {
+ /* check if end of transmit buffer is reached */
+ if (offset >= ctx->tx_max)
+ break;
+
+ /* compute maximum buffer size */
+ rem = ctx->tx_max - offset;
+
+ if (skb == NULL) {
+ skb = ctx->tx_rem_skb;
+ ctx->tx_rem_skb = NULL;
+
+ /* check for end of skb */
+ if (skb == NULL)
+ break;
+ }
+
+ if (skb->len > rem) {
+ if (n == 0) {
+ /* won't fit, MTU problem? */
+ dev_kfree_skb_any(skb);
+ skb = NULL;
+ ctx->netdev->stats.tx_dropped++;
+ } else {
+ /* no room for skb - store for later */
+ if (ctx->tx_rem_skb != NULL) {
+ dev_kfree_skb_any(ctx->tx_rem_skb);
+ ctx->netdev->stats.tx_dropped++;
+ }
+ ctx->tx_rem_skb = skb;
+ skb = NULL;
+
+ /* loop one more time */
+ timeout = 1;
+ }
+ break;
+ }
+
+ memcpy(((u8 *)skb_out->data) + offset, skb->data, skb->len);
+
+ ctx->tx_ncm.dpe16[n].wDatagramLength = cpu_to_le16(skb->len);
+ ctx->tx_ncm.dpe16[n].wDatagramIndex = cpu_to_le16(offset);
+
+ /* update offset */
+ offset += skb->len;
+
+ /* store last valid offset before alignment */
+ last_offset = offset;
+
+ /* align offset correctly */
+ offset = ALIGN(offset, ctx->tx_modulus) + ctx->tx_remainder;
+
+ /* zero padding */
+ cdc_ncm_zero_fill(skb_out->data, last_offset, offset,
+ ctx->tx_max);
+ dev_kfree_skb_any(skb);
+ skb = NULL;
+ }
+
+ /* free up any dangling skb */
+ if (skb != NULL) {
+ dev_kfree_skb_any(skb);
+ skb = NULL;
+ ctx->netdev->stats.tx_dropped++;
+ }
+
+ ctx->tx_curr_frame_num = n;
+
+ if (n == 0) {
+ /* wait for more frames */
+ /* push variables */
+ ctx->tx_curr_skb = skb_out;
+ ctx->tx_curr_offset = offset;
+ ctx->tx_curr_last_offset = last_offset;
+ goto exit_no_skb;
+
+ } else if ((n < ctx->tx_max_datagrams) && (timeout == 0)) {
+ /* wait for more frames */
+ /* push variables */
+ ctx->tx_curr_skb = skb_out;
+ ctx->tx_curr_offset = offset;
+ ctx->tx_curr_last_offset = last_offset;
+ /* set the pending count */
+ if (n < CDC_NCM_RESTART_TIMER_DATAGRAM_CNT)
+ ctx->tx_timer_pending = 2;
+ goto exit_no_skb;
+
+ } else {
+ /* frame goes out */
+ /* variables will be reset at next call */
+ }
+
+ /* check for overflow */
+ if (last_offset > ctx->tx_max)
+ last_offset = ctx->tx_max;
+
+ /* revert offset */
+ offset = last_offset;
+
+ /*
+ * If collected data size is less or equal CDC_NCM_MIN_TX_PKT bytes,
+ * we send buffers as it is. If we get more data, it would be more
+ * efficient for USB HS mobile device with DMA engine to receive a full
+ * size NTB, than canceling DMA transfer and receiving a short packet.
+ */
+ if (offset > CDC_NCM_MIN_TX_PKT)
+ offset = ctx->tx_max;
+
+ /* final zero padding */
+ cdc_ncm_zero_fill(skb_out->data, last_offset, offset, ctx->tx_max);
+
+ /* store last offset */
+ last_offset = offset;
+
+ if ((last_offset < ctx->tx_max) && ((last_offset %
+ le16_to_cpu(ctx->out_ep->desc.wMaxPacketSize)) == 0)) {
+ /* force short packet */
+ *(((u8 *)skb_out->data) + last_offset) = 0;
+ last_offset++;
+ }
+
+ /* zero the rest of the DPEs plus the last NULL entry */
+ for (; n <= CDC_NCM_DPT_DATAGRAMS_MAX; n++) {
+ ctx->tx_ncm.dpe16[n].wDatagramLength = 0;
+ ctx->tx_ncm.dpe16[n].wDatagramIndex = 0;
+ }
+
+ /* fill out 16-bit NTB header */
+ ctx->tx_ncm.nth16.dwSignature = cpu_to_le32(USB_CDC_NCM_NTH16_SIGN);
+ ctx->tx_ncm.nth16.wHeaderLength =
+ cpu_to_le16(sizeof(ctx->tx_ncm.nth16));
+ ctx->tx_ncm.nth16.wSequence = cpu_to_le16(ctx->tx_seq);
+ ctx->tx_ncm.nth16.wBlockLength = cpu_to_le16(last_offset);
+ ctx->tx_ncm.nth16.wFpIndex = ALIGN(sizeof(struct usb_cdc_ncm_nth16),
+ ctx->tx_ndp_modulus);
+
+ memcpy(skb_out->data, &(ctx->tx_ncm.nth16), sizeof(ctx->tx_ncm.nth16));
+ ctx->tx_seq++;
+
+ /* fill out 16-bit NDP table */
+ ctx->tx_ncm.ndp16.dwSignature =
+ cpu_to_le32(USB_CDC_NCM_NDP16_NOCRC_SIGN);
+ rem = sizeof(ctx->tx_ncm.ndp16) + ((ctx->tx_curr_frame_num + 1) *
+ sizeof(struct usb_cdc_ncm_dpe16));
+ ctx->tx_ncm.ndp16.wLength = cpu_to_le16(rem);
+ ctx->tx_ncm.ndp16.wNextFpIndex = 0; /* reserved */
+
+ memcpy(((u8 *)skb_out->data) + ctx->tx_ncm.nth16.wFpIndex,
+ &(ctx->tx_ncm.ndp16),
+ sizeof(ctx->tx_ncm.ndp16));
+
+ memcpy(((u8 *)skb_out->data) + ctx->tx_ncm.nth16.wFpIndex +
+ sizeof(ctx->tx_ncm.ndp16),
+ &(ctx->tx_ncm.dpe16),
+ (ctx->tx_curr_frame_num + 1) *
+ sizeof(struct usb_cdc_ncm_dpe16));
+
+ /* set frame length */
+ skb_put(skb_out, last_offset);
+
+ /* return skb */
+ ctx->tx_curr_skb = NULL;
+ return skb_out;
+
+exit_no_skb:
+ return NULL;
+}
+
+static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx)
+{
+ /* start timer, if not already started */
+ if (timer_pending(&ctx->tx_timer) == 0) {
+ ctx->tx_timer.function = &cdc_ncm_tx_timeout;
+ ctx->tx_timer.data = (unsigned long)ctx;
+ ctx->tx_timer.expires = jiffies + ((HZ + 999) / 1000);
+ add_timer(&ctx->tx_timer);
+ }
+}
+
+static void cdc_ncm_tx_timeout(unsigned long arg)
+{
+ struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)arg;
+ u8 restart;
+
+ spin_lock(&ctx->mtx);
+ if (ctx->tx_timer_pending != 0) {
+ ctx->tx_timer_pending--;
+ restart = 1;
+ } else
+ restart = 0;
+
+ spin_unlock(&ctx->mtx);
+
+ if (restart)
+ cdc_ncm_tx_timeout_start(ctx);
+ else if (ctx->netdev != NULL)
+ usbnet_start_xmit(NULL, ctx->netdev);
+}
+
+static struct sk_buff *
+cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
+{
+ struct sk_buff *skb_out;
+ struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
+ u8 need_timer = 0;
+
+ /*
+ * The Ethernet API we are using does not support transmitting
+ * multiple Ethernet frames in a single call. This driver will
+ * accumulate multiple Ethernet frames and send out a larger
+ * USB frame when the USB buffer is full or when a single jiffies
+ * timeout happens.
+ */
+ if (ctx == NULL)
+ goto error;
+
+ spin_lock(&ctx->mtx);
+ skb_out = cdc_ncm_fill_tx_frame(ctx, skb);
+ if (ctx->tx_curr_skb != NULL)
+ need_timer = 1;
+ spin_unlock(&ctx->mtx);
+
+ /* Start timer, if there is a remaining skb */
+ if (need_timer)
+ cdc_ncm_tx_timeout_start(ctx);
+
+ if (skb_out)
+ dev->net->stats.tx_packets += ctx->tx_curr_frame_num;
+ return skb_out;
+
+error:
+ if (skb != NULL)
+ dev_kfree_skb_any(skb);
+
+ return NULL;
+}
+
+static int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
+{
+ struct sk_buff *skb;
+ struct cdc_ncm_ctx *ctx;
+ int sumlen;
+ int actlen;
+ int temp;
+ int nframes;
+ int x;
+ int offset;
+
+ ctx = (struct cdc_ncm_ctx *)dev->data[0];
+ if (ctx == NULL)
+ goto error;
+
+ actlen = skb_in->len;
+ sumlen = CDC_NCM_NTB_MAX_SIZE_RX;
+
+ if (actlen < (sizeof(ctx->rx_ncm.nth16) + sizeof(ctx->rx_ncm.ndp16))) {
+ pr_debug("frame too short\n");
+ goto error;
+ }
+
+ memcpy(&(ctx->rx_ncm.nth16), ((u8 *)skb_in->data),
+ sizeof(ctx->rx_ncm.nth16));
+
+ if (le32_to_cpu(ctx->rx_ncm.nth16.dwSignature) !=
+ USB_CDC_NCM_NTH16_SIGN) {
+ pr_debug("invalid NTH16 signature <%u>\n",
+ le32_to_cpu(ctx->rx_ncm.nth16.dwSignature));
+ goto error;
+ }
+
+ temp = le16_to_cpu(ctx->rx_ncm.nth16.wBlockLength);
+ if (temp > sumlen) {
+ pr_debug("unsupported NTB block length %u/%u\n", temp, sumlen);
+ goto error;
+ }
+
+ temp = le16_to_cpu(ctx->rx_ncm.nth16.wFpIndex);
+ if ((temp + sizeof(ctx->rx_ncm.ndp16)) > actlen) {
+ pr_debug("invalid DPT16 index\n");
+ goto error;
+ }
+
+ memcpy(&(ctx->rx_ncm.ndp16), ((u8 *)skb_in->data) + temp,
+ sizeof(ctx->rx_ncm.ndp16));
+
+ if (le32_to_cpu(ctx->rx_ncm.ndp16.dwSignature) !=
+ USB_CDC_NCM_NDP16_NOCRC_SIGN) {
+ pr_debug("invalid DPT16 signature <%u>\n",
+ le32_to_cpu(ctx->rx_ncm.ndp16.dwSignature));
+ goto error;
+ }
+
+ if (le16_to_cpu(ctx->rx_ncm.ndp16.wLength) <
+ USB_CDC_NCM_NDP16_LENGTH_MIN) {
+ pr_debug("invalid DPT16 length <%u>\n",
+ le32_to_cpu(ctx->rx_ncm.ndp16.dwSignature));
+ goto error;
+ }
+
+ nframes = ((le16_to_cpu(ctx->rx_ncm.ndp16.wLength) -
+ sizeof(struct usb_cdc_ncm_ndp16)) /
+ sizeof(struct usb_cdc_ncm_dpe16));
+ nframes--; /* we process NDP entries except for the last one */
+
+ pr_debug("nframes = %u\n", nframes);
+
+ temp += sizeof(ctx->rx_ncm.ndp16);
+
+ if ((temp + nframes * (sizeof(struct usb_cdc_ncm_dpe16))) > actlen) {
+ pr_debug("Invalid nframes = %d\n", nframes);
+ goto error;
+ }
+
+ if (nframes > CDC_NCM_DPT_DATAGRAMS_MAX) {
+ pr_debug("Truncating number of frames from %u to %u\n",
+ nframes, CDC_NCM_DPT_DATAGRAMS_MAX);
+ nframes = CDC_NCM_DPT_DATAGRAMS_MAX;
+ }
+
+ memcpy(&(ctx->rx_ncm.dpe16), ((u8 *)skb_in->data) + temp,
+ nframes * (sizeof(struct usb_cdc_ncm_dpe16)));
+
+ for (x = 0; x < nframes; x++) {
+ offset = le16_to_cpu(ctx->rx_ncm.dpe16[x].wDatagramIndex);
+ temp = le16_to_cpu(ctx->rx_ncm.dpe16[x].wDatagramLength);
+
+ /*
+ * CDC NCM ch. 3.7
+ * All entries after first NULL entry are to be ignored
+ */
+ if ((offset == 0) || (temp == 0)) {
+ if (!x)
+ goto error; /* empty NTB */
+ break;
+ }
+
+ /* sanity checking */
+ if (((offset + temp) > actlen) ||
+ (temp > CDC_NCM_MAX_DATAGRAM_SIZE) || (temp < ETH_HLEN)) {
+ pr_debug("invalid frame detected (ignored)"
+ "offset[%u]=%u, length=%u, skb=%p\n",
+ x, offset, temp, skb);
+ if (!x)
+ goto error;
+ break;
+
+ } else {
+ skb = skb_clone(skb_in, GFP_ATOMIC);
+ skb->len = temp;
+ skb->data = ((u8 *)skb_in->data) + offset;
+ skb_set_tail_pointer(skb, temp);
+ usbnet_skb_return(dev, skb);
+ }
+ }
+ return 1;
+error:
+ return 0;
+}
+
+static void
+cdc_ncm_speed_change(struct cdc_ncm_ctx *ctx,
+ struct connection_speed_change *data)
+{
+ uint32_t rx_speed = le32_to_cpu(data->USBitRate);
+ uint32_t tx_speed = le32_to_cpu(data->DSBitRate);
+
+ /*
+ * Currently the USB-NET API does not support reporting the actual
+ * device speed. Do print it instead.
+ */
+ if ((tx_speed != ctx->tx_speed) || (rx_speed != ctx->rx_speed)) {
+ ctx->tx_speed = tx_speed;
+ ctx->rx_speed = rx_speed;
+
+ if ((tx_speed > 1000000) && (rx_speed > 1000000)) {
+ printk(KERN_INFO KBUILD_MODNAME
+ ": %s: %u mbit/s downlink "
+ "%u mbit/s uplink\n",
+ ctx->netdev->name,
+ (unsigned int)(rx_speed / 1000000U),
+ (unsigned int)(tx_speed / 1000000U));
+ } else {
+ printk(KERN_INFO KBUILD_MODNAME
+ ": %s: %u kbit/s downlink "
+ "%u kbit/s uplink\n",
+ ctx->netdev->name,
+ (unsigned int)(rx_speed / 1000U),
+ (unsigned int)(tx_speed / 1000U));
+ }
+ }
+}
+
+static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
+{
+ struct cdc_ncm_ctx *ctx;
+ struct usb_cdc_notification *event;
+
+ ctx = (struct cdc_ncm_ctx *)dev->data[0];
+
+ if (urb->actual_length < sizeof(*event))
+ return;
+
+ /* test for split data in 8-byte chunks */
+ if (test_and_clear_bit(EVENT_STS_SPLIT, &dev->flags)) {
+ cdc_ncm_speed_change(ctx,
+ (struct connection_speed_change *)urb->transfer_buffer);
+ return;
+ }
+
+ event = urb->transfer_buffer;
+
+ switch (event->bNotificationType) {
+ case USB_CDC_NOTIFY_NETWORK_CONNECTION:
+ /*
+ * According to the CDC NCM specification ch.7.1
+ * USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
+ * sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
+ */
+ ctx->connected = event->wValue;
+
+ printk(KERN_INFO KBUILD_MODNAME ": %s: network connection:"
+ " %sconnected\n",
+ ctx->netdev->name, ctx->connected ? "" : "dis");
+
+ if (ctx->connected)
+ netif_carrier_on(dev->net);
+ else {
+ netif_carrier_off(dev->net);
+ ctx->tx_speed = ctx->rx_speed = 0;
+ }
+ break;
+
+ case USB_CDC_NOTIFY_SPEED_CHANGE:
+ if (urb->actual_length <
+ (sizeof(*event) + sizeof(struct connection_speed_change)))
+ set_bit(EVENT_STS_SPLIT, &dev->flags);
+ else
+ cdc_ncm_speed_change(ctx,
+ (struct connection_speed_change *) &event[1]);
+ break;
+
+ default:
+ dev_err(&dev->udev->dev, "NCM: unexpected "
+ "notification 0x%02x!\n", event->bNotificationType);
+ break;
+ }
+}
+
+static int cdc_ncm_check_connect(struct usbnet *dev)
+{
+ struct cdc_ncm_ctx *ctx;
+
+ ctx = (struct cdc_ncm_ctx *)dev->data[0];
+ if (ctx == NULL)
+ return 1; /* disconnected */
+
+ return !ctx->connected;
+}
+
+static int
+cdc_ncm_probe(struct usb_interface *udev, const struct usb_device_id *prod)
+{
+ return usbnet_probe(udev, prod);
+}
+
+static void cdc_ncm_disconnect(struct usb_interface *intf)
+{
+ struct usbnet *dev = usb_get_intfdata(intf);
+
+ if (dev == NULL)
+ return; /* already disconnected */
+
+ usbnet_disconnect(intf);
+}
+
+static int cdc_ncm_manage_power(struct usbnet *dev, int status)
+{
+ dev->intf->needs_remote_wakeup = status;
+ return 0;
+}
+
+static const struct driver_info cdc_ncm_info = {
+ .description = "CDC NCM",
+ .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET,
+ .bind = cdc_ncm_bind,
+ .unbind = cdc_ncm_unbind,
+ .check_connect = cdc_ncm_check_connect,
+ .manage_power = cdc_ncm_manage_power,
+ .status = cdc_ncm_status,
+ .rx_fixup = cdc_ncm_rx_fixup,
+ .tx_fixup = cdc_ncm_tx_fixup,
+};
+
+static struct usb_driver cdc_ncm_driver = {
+ .name = "cdc_ncm",
+ .id_table = cdc_devs,
+ .probe = cdc_ncm_probe,
+ .disconnect = cdc_ncm_disconnect,
+ .suspend = usbnet_suspend,
+ .resume = usbnet_resume,
+ .supports_autosuspend = 1,
+};
+
+static struct ethtool_ops cdc_ncm_ethtool_ops = {
+ .get_drvinfo = cdc_ncm_get_drvinfo,
+ .get_link = usbnet_get_link,
+ .get_msglevel = usbnet_get_msglevel,
+ .set_msglevel = usbnet_set_msglevel,
+ .get_settings = usbnet_get_settings,
+ .set_settings = usbnet_set_settings,
+ .nway_reset = usbnet_nway_reset,
+};
+
+static int __init cdc_ncm_init(void)
+{
+ printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION "\n");
+ return usb_register(&cdc_ncm_driver);
+}
+
+module_init(cdc_ncm_init);
+
+static void __exit cdc_ncm_exit(void)
+{
+ usb_deregister(&cdc_ncm_driver);
+}
+
+module_exit(cdc_ncm_exit);
+
+MODULE_AUTHOR("Hans Petter Selasky");
+MODULE_DESCRIPTION("USB CDC NCM host driver");
+MODULE_LICENSE("Dual BSD/GPL");
--
1.7.0.4


[PATCH 1/2][KERNEL] usbnet: changes for upcoming cdc_ncm driver

tom.zanussi@...
 

From: Alexey Orishko

Changes:
include/linux/usb/usbnet.h:
- a new flag to indicate driver's capability to accumulate IP packets in Tx
direction and extract several packets from single skb in Rx direction.
drivers/net/usb/usbnet.c:
- the procedure of counting packets in usbnet was updated due to the
accumulating of IP packets in the driver
- no short packets are sent if indicated by the flag in driver_info
structure

commit 073285fd392f6dc901da7c698d46e1e2a7e26436 upstream

Signed-off-by: Alexey Orishko
Signed-off-by: David S. Miller
Integrated-by: Dongxiao Xu
---
drivers/net/usb/usbnet.c | 45 ++++++++++++++++++++++++++++++-------------
include/linux/usb/usbnet.h | 6 +++++
2 files changed, 37 insertions(+), 14 deletions(-)

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index c04d49e..cff74b8 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -391,14 +391,19 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb)
goto error;
// else network stack removes extra byte if we forced a short packet

- if (skb->len)
- usbnet_skb_return (dev, skb);
- else {
- netif_dbg(dev, rx_err, dev->net, "drop\n");
-error:
- dev->net->stats.rx_errors++;
- skb_queue_tail (&dev->done, skb);
+ if (skb->len) {
+ /* all data was already cloned from skb inside the driver */
+ if (dev->driver_info->flags & FLAG_MULTI_PACKET)
+ dev_kfree_skb_any(skb);
+ else
+ usbnet_skb_return(dev, skb);
+ return;
}
+
+ netif_dbg(dev, rx_err, dev->net, "drop\n");
+error:
+ dev->net->stats.rx_errors++;
+ skb_queue_tail(&dev->done, skb);
}

/*-------------------------------------------------------------------------*/
@@ -971,7 +976,8 @@ static void tx_complete (struct urb *urb)
struct usbnet *dev = entry->dev;

if (urb->status == 0) {
- dev->net->stats.tx_packets++;
+ if (!(dev->driver_info->flags & FLAG_MULTI_PACKET))
+ dev->net->stats.tx_packets++;
dev->net->stats.tx_bytes += entry->length;
} else {
dev->net->stats.tx_errors++;
@@ -1044,8 +1050,13 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
if (info->tx_fixup) {
skb = info->tx_fixup (dev, skb, GFP_ATOMIC);
if (!skb) {
- netif_dbg(dev, tx_err, dev->net, "can't tx_fixup skb\n");
- goto drop;
+ if (netif_msg_tx_err(dev)) {
+ netif_dbg(dev, tx_err, dev->net, "can't tx_fixup skb\n");
+ goto drop;
+ } else {
+ /* cdc_ncm collected packet; waits for more */
+ goto not_drop;
+ }
}
}
length = skb->len;
@@ -1067,13 +1078,18 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
/* don't assume the hardware handles USB_ZERO_PACKET
* NOTE: strictly conforming cdc-ether devices should expect
* the ZLP here, but ignore the one-byte packet.
+ * NOTE2: CDC NCM specification is different from CDC ECM when
+ * handling ZLP/short packets, so cdc_ncm driver will make short
+ * packet itself if needed.
*/
if (length % dev->maxpacket == 0) {
if (!(info->flags & FLAG_SEND_ZLP)) {
- urb->transfer_buffer_length++;
- if (skb_tailroom(skb)) {
- skb->data[skb->len] = 0;
- __skb_put(skb, 1);
+ if (!(info->flags & FLAG_MULTI_PACKET)) {
+ urb->transfer_buffer_length++;
+ if (skb_tailroom(skb)) {
+ skb->data[skb->len] = 0;
+ __skb_put(skb, 1);
+ }
}
} else
urb->transfer_flags |= URB_ZERO_PACKET;
@@ -1122,6 +1138,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
netif_dbg(dev, tx_err, dev->net, "drop, code %d\n", retval);
drop:
dev->net->stats.tx_dropped++;
+not_drop:
if (skb)
dev_kfree_skb_any (skb);
usb_free_urb (urb);
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 7ae27a4..44842c8 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -97,6 +97,12 @@ struct driver_info {

#define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */

+/*
+ * Indicates to usbnet, that USB driver accumulates multiple IP packets.
+ * Affects statistic (counters) and short packet handling.
+ */
+#define FLAG_MULTI_PACKET 0x1000
+
/* init device ... can sleep, or cause probe() failure */
int (*bind)(struct usbnet *, struct usb_interface *);

--
1.7.0.4


[PATCH 0/2][KERNEL] Add Ericsson 3G patches

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

This patchset adds the kernel patches needed for Ericsson 3G support,
needed by fishriver.

Please pull into linux-yocto-2.6.37.

Pull URL: git://git.yoctoproject.org/linux-yocto-2.6.37-contrib
Branch: tzanussi/fishriver-3g
Browse: http://git.yoctoproject.org/cgit.cgi/linux-yocto-2.6.37-contrib/log/?h=tzanussi/fishriver-3g

Alexey Orishko (2):
usbnet: changes for upcoming cdc_ncm driver
USB CDC NCM host driver

drivers/net/usb/Kconfig | 19 +
drivers/net/usb/Makefile | 1 +
drivers/net/usb/cdc_ncm.c | 1213 ++++++++++++++++++++++++++++++++++++++++++++
drivers/net/usb/usbnet.c | 45 ++-
include/linux/usb/usbnet.h | 6 +
5 files changed, 1270 insertions(+), 14 deletions(-)
create mode 100644 drivers/net/usb/cdc_ncm.c


Re: [poky] Weekly Test Report for Yocto 1.1 M1 RC2 - 20110528

Saul Wold <sgw@...>
 

On 06/01/2011 12:03 PM, Liu, Song wrote:
I don’t see anyone reply to this. Which bug is opened for the
Beagleboard BSP build failure? It seem to be a critical issue.

Tom, shall you or someone else look into this?
Darren and I are looking into this, the 3 beagleboard bugs are
1) qt4-x11-free does not compile, which blocks -sdk images, there is a
gcc patch that I am working to integrate today (1130), which has been
know about and I had a partial work around that was rejected.

2) Wrong terminal is getting set someplace, Darren and Beth are looking
at that. (1131)

3) qemu-config blocks non-gplv3 build, this was know and a fix just went
into master.

more below.

Song

*From:*poky-bounces@...
[mailto:poky-bounces@...] *On Behalf Of *Xu, Jiajun
*Sent:* Tuesday, May 31, 2011 8:41 AM
*To:* poky@...; yocto@...
*Subject:* [poky] Weekly Test Report for Yocto 1.1 M1 RC2 - 20110528

Hi all,

This is the weekly test report for Yocto 1.1 M1 RC2 build. There is no
new bugs found in this testing. 3 BLOCK issues found in RC1 are fixed.
The only one block issue is beagleboard build failed on autobuilder.
There are still 9 old open bugs. Grub installation fail on 3 intel BSPs.
Graphics testing on sugarbay is blocked.
One question about the sugarbay, was how was this tested before, or is
this a new requirement? If it's new then it's not really blocking, the
question is should mesa-demos be on all environments or just on targets
that need them? In which case this should be added to a sugarbay
specific build.

For bug fixing, the keyboard not work issue and toolchain not built out
issue are fixed. Meanwhile, the cvs compile issue is marked as INVALID
because it also fails on native. We also remove sudoku-savant compile
test in qemu because such error may be caused by limited memory in qemu.

If there is no new build for M1, QA will continue fullpass testing
against RC2.

*Test Summary*

*---------------------------------------*







*Test Result Summary*



*Component*



*Target*



*Status*



*Comments*



*BSP*



SugarBay



GOOD



Graphics testing is blocked; soft keyboard will be triggered with
terminal icon;



 



CrownBay



GOOD



Grub installation failed;



 



JasperForest



GOOD



Everything runs well



 



Blacksand



GOOD



Grub installation failed; S3 does not work;



 



eMenlow



GOOD



System installation failed; S3 does not work;



 



Beagleboard



BLOCK



Build failed



 



Routerstationpro



GOOD



Everything runs well



 



Mpc8315e-rdb



GOOD



Everything runs well



*QEMU*



qemux86



GOOD



Everything runs well



 



qemux86-64



GOOD



Everything runs well



 



qemuarm



GOOD



Everything runs well



 



qemuppc



GOOD



unfs does not work with qemuppc



 



qemumips



GOOD



Everything runs well



*ADT*



 



Buggy



unfs does not work with qemuppc





**

 



Critical bugs, more than 50% test cases are blocked



 



Only Normal, Minor or Enhancement bugs, less than 10% test cases failed



 



Normal, Major and Critical bugs, more than 10% test cases failed





*Detailed Test Result for each component*



*Target*



*Total TCs***



*Not Run*



*Passed***



*Failed***



*Not testable (Blocked)***



*Sugarbay Sato-SDK*



55



0



53



1 (bug 1101)



1 (bug 1112)



*Crownbay Sato-SDK*



54



0



49



1 (bug 1099)



4



*Jasperforest LSB-SDK*



31



0



31



0



0



*n450 Sato-SDK*



54



0



48



2 (bug 613, 1099)



4



*eMenlow Sato-SDK*



54



0



48



2 (bug 1099, 503)



4



*Routerstationpro Sato-SDK*



29



0



29



0



0



*Mpc8315e-rdb Sato-SDK*



30



0



26



4 (bug 766)



0



*Qemux86-64 Sato*



27



0



27



0



0



*Qemux86-64 Sato-SDK*



30



0



30



0



0



*Qemux86 Sato*



27



0



27



0



0



*Qemux86 Sato-SDK*



30



0



30



0



0



*Qemumips Sato*



26



0



26



0



0



*Qemumips Sato-SDK*



32



0



32



0



0



*Qemuppc Sato*



20



0



19



0



1 (bug 414)



*Qemuppc Sato-SDK*



26



0



25



0



1 (bug 414)



*Qemuarm Sato*



26



0



26



0



0



*Qemuarm Sato-SDK*



32



0



32



0



0



*ADT*



6



0



5



1 (bug 414)



0



*Total*



589



0



563



11



15





**






* You can check the detailed test result in attachment for each target.

** The failed/blocked case number is listed with failed cases’ bug number.

*Commit Information*

*---------------------------------------*

Tree/Branch: Poky/1.1_M1

Poky Commit: 4ff7af11ef69849ef9c16f585eae58ac920b222b

Meta Branch: 1.1_M1

Meta Commit: fc719f0cd6530ce15148b4aa274f1644b461b298

*Issue Summary*

*---------------------------------------*

*Component*



*Bug Number*



*Target Milestone*

*System & Core OS*



*Installation & Boot*



Bug 1099: [blacksand/emenlow/crownbay] grub install failed with sato-sdk
live image



1.1 M2

*Power Mangement*



Bug 613: [Blacksand]system cannot enter S3 standby mode



1.1

Bug 503: [emenlow] system cannot enter S3 standby mode



1.1

*Others*



Bug 1101: keyboard pop up when clicking terminal icon



1.0 M2

Bug 1107: Open or add person in contacts may segfault on sugarbay/blacksand



1.1 M2

Bug 1097: The mouse can not click accurate to the icons in qemumips X



1.1 M2

*Graphics*



Bug 1112: [sugarbay] mesa-demos should be added into sato image for
graphics testing



Not specified

Bug 883: [Sugarbay] GFX 3D game test fail to run with sugarbay BSP image
due to libsdl.so



1.1

*Multimedia*



Works well in sugarbay/n450/eMenlow/crownbay



 

*ADT*



Bug 414: [PPC] kernel panic when booting poky-image-sdk-qemuppc through UNFS



1.1 M3

Verified Fixed Bugs:

1.Bug 1100 <http://bugzilla.pokylinux.org/show_bug.cgi?id=1100>:
[emenlow/crownbay-noemgd] X window could not start up with sato-sdk image

2.Bug 1108 <http://bugzilla.pokylinux.org/show_bug.cgi?id=1108>:
keyboard could not work in qemux86/x86-64

3.Bug 1093 <http://bugzilla.pokylinux.org/show_bug.cgi?id=1093>:
meta-toolchain-gmae: eglibc fails to build with 4.6

Best Regards,

Jiajun



_______________________________________________
poky mailing list
poky@...
https://lists.yoctoproject.org/listinfo/poky


Re: Weekly Test Report for Yocto 1.1 M1 RC2 - 20110528

Darren Hart <darren.hart@...>
 

On 06/01/2011 12:03 PM, Liu, Song wrote:
I don’t see anyone reply to this. Which bug is opened for the
Beagleboard BSP build failure? It seem to be a critical issue.



Tom, shall you or someone else look into this?
I am responsible for the Yocto beagleboard support. I was just asking to
get the bugs opened so I can track them.

--
Darren




Song



*From:*poky-bounces@...
[mailto:poky-bounces@...] *On Behalf Of *Xu, Jiajun
*Sent:* Tuesday, May 31, 2011 8:41 AM
*To:* poky@...; yocto@...
*Subject:* [poky] Weekly Test Report for Yocto 1.1 M1 RC2 - 20110528



Hi all,

This is the weekly test report for Yocto 1.1 M1 RC2 build. There
is no new bugs found in this testing. 3 BLOCK issues found in RC1 are
fixed. The only one block issue is beagleboard build failed on
autobuilder. There are still 9 old open bugs. Grub installation fail on
3 intel BSPs. Graphics testing on sugarbay is blocked.

For bug fixing, the keyboard not work issue and toolchain not
built out issue are fixed. Meanwhile, the cvs compile issue is marked as
INVALID because it also fails on native. We also remove sudoku-savant
compile test in qemu because such error may be caused by limited memory
in qemu.

If there is no new build for M1, QA will continue fullpass
testing against RC2.



*Test Summary*

*---------------------------------------*







*Test Result Summary*





*Component*



*Target*



*Status*



*Comments*





*BSP*



SugarBay



GOOD



Graphics testing is blocked; soft keyboard will be triggered with
terminal icon;





 



CrownBay



GOOD



Grub installation failed;





 



JasperForest



GOOD



Everything runs well





 



Blacksand



GOOD



Grub installation failed; S3 does not work;





 



eMenlow



GOOD



System installation failed; S3 does not work;





 



Beagleboard



BLOCK



Build failed





 



Routerstationpro



GOOD



Everything runs well





 



Mpc8315e-rdb



GOOD



Everything runs well





*QEMU*



qemux86



GOOD



Everything runs well





 



qemux86-64



GOOD



Everything runs well





 



qemuarm



GOOD



Everything runs well





 



qemuppc



GOOD



unfs does not work with qemuppc





 



qemumips



GOOD



Everything runs well





*ADT*



 



Buggy



unfs does not work with qemuppc







* *

 



Critical bugs, more than 50% test cases are blocked





 



Only Normal, Minor or Enhancement bugs, less than 10% test cases failed





 



Normal, Major and Critical bugs, more than 10% test cases failed







*Detailed Test Result for each component*





*Target*



*Total TCs***



*Not Run*



*Passed***



*Failed***



*Not testable (Blocked)***





*Sugarbay Sato-SDK*



55



0



53



1 (bug 1101)



1 (bug 1112)





*Crownbay Sato-SDK*



54



0



49



1 (bug 1099)



4





*Jasperforest LSB-SDK*



31



0



31



0



0





*n450 Sato-SDK*



54



0



48



2 (bug 613, 1099)



4





*eMenlow Sato-SDK*



54



0



48



2 (bug 1099, 503)



4





*Routerstationpro Sato-SDK*



29



0



29



0



0





*Mpc8315e-rdb Sato-SDK*



30



0



26



4 (bug 766)



0





*Qemux86-64 Sato*



27



0



27



0



0





*Qemux86-64 Sato-SDK*



30



0



30



0



0





*Qemux86 Sato*



27



0



27



0



0





*Qemux86 Sato-SDK*



30



0



30



0



0





*Qemumips Sato*



26



0



26



0



0





*Qemumips Sato-SDK*



32



0



32



0



0





*Qemuppc Sato*



20



0



19



0



1 (bug 414)





*Qemuppc Sato-SDK*



26



0



25



0



1 (bug 414)





*Qemuarm Sato*



26



0



26



0



0





*Qemuarm Sato-SDK*



32



0



32



0



0





*ADT*



6



0



5



1 (bug 414)



0





*Total*



589



0



563



11



15







* *






* You can check the detailed test result in attachment for each target.

** The failed/blocked case number is listed with failed cases’ bug number.



*Commit Information*

*---------------------------------------*

Tree/Branch: Poky/1.1_M1

Poky Commit: 4ff7af11ef69849ef9c16f585eae58ac920b222b

Meta Branch: 1.1_M1

Meta Commit: fc719f0cd6530ce15148b4aa274f1644b461b298



*Issue Summary*

*---------------------------------------*

*Component*



*Bug Number*



*Target Milestone*

*System & Core OS*



*Installation & Boot*



Bug 1099: [blacksand/emenlow/crownbay] grub install failed with sato-sdk
live image



1.1 M2

*Power Mangement*



Bug 613: [Blacksand]system cannot enter S3 standby mode



1.1

Bug 503: [emenlow] system cannot enter S3 standby mode



1.1

*Others*



Bug 1101: keyboard pop up when clicking terminal icon



1.0 M2

Bug 1107: Open or add person in contacts may segfault on sugarbay/blacksand



1.1 M2

Bug 1097: The mouse can not click accurate to the icons in qemumips X



1.1 M2

*Graphics*



Bug 1112: [sugarbay] mesa-demos should be added into sato image for
graphics testing



Not specified

Bug 883: [Sugarbay] GFX 3D game test fail to run with sugarbay BSP image
due to libsdl.so



1.1

*Multimedia*



Works well in sugarbay/n450/eMenlow/crownbay



 

*ADT*



Bug 414: [PPC] kernel panic when booting poky-image-sdk-qemuppc through UNFS



1.1 M3



Verified Fixed Bugs:

1. Bug 1100 <http://bugzilla.pokylinux.org/show_bug.cgi?id=1100>:
[emenlow/crownbay-noemgd] X window could not start up with sato-sdk image

2. Bug 1108 <http://bugzilla.pokylinux.org/show_bug.cgi?id=1108>:
keyboard could not work in qemux86/x86-64

3. Bug 1093 <http://bugzilla.pokylinux.org/show_bug.cgi?id=1093>:
meta-toolchain-gmae: eglibc fails to build with 4.6



Best Regards,

Jiajun



_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


Re: [PATCH 0/6] meta-intel: emgd updrade

Darren Hart <dvhart@...>
 

On 06/01/2011 12:55 PM, tom.zanussi@... wrote:
From: Tom Zanussi <tom.zanussi@...>

This patchset upgrades emgd to 1.6 Gold.

The following changes since commit e94dba8309874a82a570db60223d18b2c723c3a5:
Darren Hart (1):
linux-yocto*: correct FILESEXTRAPATHS assignment in all layers

are available in the git repository at:

git://git.yoctoproject.org/meta-intel.git tzanussi/emgd-1.6-upgrade
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/emgd-1.6-upgrade

Tom Zanussi (6):
meta-crownbay: new recipe for emgd 1.6 driver binaries
meta-intel: add xserver-xf86-dri-lite_1.9.3 to common
meta-crownbay: add common to BBFILES
meta-crownbay: update crownbay.conf
meta-crownbay: remove obsolete graphics recipes
meta-crownbay: update README with new build instructions.
With the exception of the patch upstream fields and giving Scott R a
chance to review the README, these look good to me. With those addressed:

Acked-by: Darren Hart <dvhart@...>

--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


Re: [PATCH 6/6] meta-crownbay: update README with new build instructions.

Darren Hart <dvhart@...>
 

Hi Tom,

If you haven't already, I would suggest running the README changes past
Scott R, even if you commit this first. Getting Scott involved should
help keep our documentation precise, correct from a tech writing point
of view, as well as help keep it consistent throughout the project.

--
Darren

On 06/01/2011 12:56 PM, tom.zanussi@... wrote:
From: Tom Zanussi <tom.zanussi@...>

EMGD 1.6 added a new non-clickthrough Linux tarball download; this
changes the README to make use of it and also updates new directory
naming, etc.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
meta-crownbay/README | 95 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 77 insertions(+), 18 deletions(-)

diff --git a/meta-crownbay/README b/meta-crownbay/README
index bb1e0c3..89056ed 100644
--- a/meta-crownbay/README
+++ b/meta-crownbay/README
@@ -6,7 +6,7 @@ The Crown Bay platform consists of the Intel Atom Z6xx processor,
plus the Intel EG20T Platform Controller Hub (Tunnel Creek + Topcliff).

It also supports the E6xx embedded on-chip graphics via the Intel
-Embedded Media and Graphics Driver (EMGD) 1.5 Gold Driver.
+Embedded Media and Graphics Driver (EMGD) 1.6 Gold Driver.

Table of Contents
=================
@@ -33,7 +33,7 @@ bblayers.conf e.g.:
The meta-crownbay layer contains support for two different machine
configurations. These configurations are identical except for the fact
that the one prefixed with 'crownbay' makes use of the
-Intel-proprietary EMGD 1.5 graphics driver, while the one prefixed
+Intel-proprietary EMGD 1.6 graphics driver, while the one prefixed
with 'crownbay-noemgd' does not.

If you want to enable the layer that supports EMGD graphics add
@@ -73,19 +73,71 @@ userspace drivers when building the "crownbay" machine (but not when
building the "crownbay-noemgd" machine). If you got the BSP from the
'BSP Downloads' section of the Yocto website, the EMGD binaries needed
to perform the build will already be present in the BSP, located in
-the recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin directory, and
+the recipes-graphics/xorg-xserver/emgd-driver-bin-1.6 directory, and
you can ignore the rest of this section.

If you didn't get the BSP from the 'BSP Downloads' section of the
-Yocto website, you'll need to download the a Windows executable from
-the official EMGD website, extract the binaries from it, and copy them
-to the proper location in the meta-crownbay layer.
+Yocto website, you have two choices:
+
+- You can download a tarball containing an rpm that contains the
+ binaries and extract the binaries from that, and copy them to the
+ proper location in the meta-crownbay layer.
+
+- You can download a Windows executable from the official EMGD
+ website, extract the binaries from it, and copy them to the proper
+ location in the meta-crownbay layer.
+
+The following subsections describe each option in detail.
+
+
+IIa Downloading and extracting the binaries using the EMGD Linux tarball
+------------------------------------------------------------------------
+
+The first step of the process is to download the EMGD 1.6 Gold Driver.
+Here is the current link to the URL which it can be downloaded from:
+
+http://edc.intel.com/Software/Downloads/EMGD/
+
+In the Download Now tab, select:
+
+Intel® architecture-based product: Linux Tar Ball
+Operating System: MeeGo 1.0 IVI Linux (kernel 2.6.33.3, X.server 1.8.0)
+
+That will give you a large tar file:
+
+Lin_EMGD_1_6_RC_1922.tar
+
+Extract the files in the tar file, which will in turn give you a
+directory named IEMGD_HEAD_Linux.
+
+The binaries are contained in an rpm file; you can extract the
+binaries from the rpm file using rpm2cpio and cpio:
+
+$ cd IEMGD_HEAD_Linux/MeeGo1.2
+$ rpm2cpio emgd-bin-1922-1.6.i586.rpm > emgd-bin-1922-1.6.i586.cpio
+$ mkdir extracted; cd extracted
+$ cpio -idv < ../poky-image-minimal-initramfs-emenlow.cpio
+
+Finally, you can copy the xorg-xserver binaries to the
+emgd-driver-bin-1.6 directory in the meta-crownbay layer:
+
+$ cp -a usr/lib meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6
+
+You also need to copy the IEMGD License.txt file to the same directory:
+
+$ cp IEMGD_HEAD_Linux/License/License.txt meta-crownbay/recipes/xorg-xserver/emgd-driver-bin-1.6
+
+At this point, you should be able to build meta-crownbay images as usual.
+
+
+IIb Extracting the binaries using the graphical ced application
+---------------------------------------------------------------

These steps require that you run a graphical application in Windows.
Windows 7 was used for these instructions, but it shouldn't matter
which version of Windows you use.

-The first step of the process is to download the EMGD 1.5 Gold Driver.
+The first step of the process is to download the EMGD 1.6 Gold Driver.
Here is the current link to the URL which it can be downloaded from:

http://edc.intel.com/Software/Downloads/EMGD/
@@ -97,14 +149,14 @@ Operating System: MeeGo 1.0 IVI Linux (kernel 2.6.33.3, X.server 1.8.0)

That will give you a large zip file:

-IEMGD_1_5_GOLD_ALL_1742.zip
+IEMGD_1_6_GOLD_1922.zip

Extract the files in the zip file, which will in turn give you a large
.exe file:

-IEMGD_1_5_GOLD_ALL_1742.exe
+IEMGD_1_6_GOLD_ALL_1922.exe

-Run IEMGD_1_5_GOLD_ALL_1742.exe to install, accept licenses, etc.
+Run IEMGD_1_6_GOLD_ALL_1922.exe to install, accept licenses, etc.

If it says to install watcom, follow the instructions to do that.

@@ -157,32 +209,39 @@ system, and uncompress/untar it:

$ tar cvfz IEMGD_HEAD_Linux.tgz

-Finally, copy Xorg-xserver binaries in the Meego1.0 driver directory
-to the xserver-xf86-emgd-bin directory in the meta-crownbay layer:
+The binaries are contained in an rpm file; you can extract the
+binaries from the rpm file using rpm2cpio and cpio:
+
+$ cd IEMGD_HEAD_Linux/MeeGo1.2
+$ rpm2cpio emgd-bin-1922-1.6.i586.rpm > emgd-bin-1922-1.6.i586.cpio
+$ mkdir extracted; cd extracted
+$ cpio -idv < ../poky-image-minimal-initramfs-emenlow.cpio
+
+Finally, you can copy the xorg-xserver binaries to the
+emgd-driver-bin-1.6 directory in the meta-crownbay layer:

-$ cp IEMGD_HEAD_Linux/MeeGo1.0/driver/Xorg-xserver-1.7.99/* meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin
+$ cp -a usr/lib meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6

You also need to copy the IEMGD License.txt file to the same directory:

-$ cp IEMGD_HEAD_Linux/License/License.txt meta-crownbay/recipes/xorg-xserver/xserver-xf86-emgd-bin
+$ cp IEMGD_HEAD_Linux/License/License.txt meta-crownbay/recipes/xorg-xserver/emgd-driver-bin-1.6

At this point, you should be able to build meta-crownbay images as usual.

----

For reference, the EMGD Driver documentation is also available at the
-above link (it's also part of the installation).
+above link.

The specific text of the document is:

User Guide: Intel® Embedded Media and Graphics Driver, EFI Video
-Driver, EPOG, and Video BIOS v1.5 for Windows* XP and Linux* Provides
+Driver, EPOG, and Video BIOS v1.6 for Windows* XP and Linux* Provides
installation requirements/procedures & describes the vbios/firmware,
configuration options, & functionality of Intel® EMGD under Windows* &
Linux*. Refer to guide for details.

-File Type/Size: PDF 3,340KB
-Version: 008 : October 2010
+April 2011


II. Booting the images in /binary



_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


Re: [PATCH 2/6] meta-intel: add xserver-xf86-dri-lite_1.9.3 to common

Darren Hart <dvhart@...>
 

Hi Tom,

A quick glance suggests most of these patches need the upstream status
fields added to them.

http://wiki.yoctoproject.org/wiki/Best_Known_Methods_%28BKMs%29_for_Package_Updating#Patch_Comments

Per Saul's email to the poky list on 04/05/2011 "Patch Comments and
Upstream-Status"

--
Darren

On 06/01/2011 12:55 PM, tom.zanussi@... wrote:
From: Tom Zanussi <tom.zanussi@...>

emgd 1.6 requires xserver 1.9.3, which is no longer in meta, and it
needs to be shared by multiple BSPs, so add it to common.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
.../cache-xkbcomp-output-for-fast-start-up.patch | 358 ++++++++++++++++++++
.../xserver-xf86-dri-lite/crosscompile.patch | 20 ++
.../xserver-xf86-dri-lite/doublefix.patch | 13 +
.../xserver-xf86-dri-lite/drmfix.patch | 13 +
.../xserver-xf86-dri-lite/fix_macros.patch | 21 ++
.../xserver-xf86-dri-lite/fix_macros1.patch | 22 ++
.../fix_open_max_preprocessor_error.patch | 13 +
.../libdri-xinerama-symbol.patch | 50 +++
.../xserver-xf86-dri-lite/macro_tweak.patch | 28 ++
.../xserver-xf86-dri-lite/nodolt.patch | 12 +
.../xorg-server-disable-dri_sarea.patch | 12 +
.../xorg-server-enable-dri2.patch | 23 ++
.../xserver-1.5.0-bg-none-root.patch | 156 +++++++++
.../xserver-DRI2Swapbuffer.patch | 179 ++++++++++
.../xserver-xf86-dri-lite/xserver-boottime.patch | 38 ++
.../xserver-xf86-dri-lite/xserver-no-root-2.patch | 105 ++++++
.../xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb | 19 +
17 files changed, 1082 insertions(+), 0 deletions(-)
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
create mode 100755 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
create mode 100755 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb

diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
new file mode 100644
index 0000000..b121bba
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
@@ -0,0 +1,358 @@
+From 0f70ba9d3412b17ac4e08e33e1be3c226c06ea54 Mon Sep 17 00:00:00 2001
+From: Yan Li <yan.i.li@...>
+Date: Tue, 12 May 2009 17:49:07 +0800
+Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v5 for 1.6.1
+Organization: Intel
+
+xkbcomp outputs will be cached in files with hashed keymap as
+names. This saves boot time for around 1s on commodity netbooks.
+
+Signed-off-by: Yan Li <yan.i.li@...>
+---
+ configure.ac | 6 +-
+ xkb/README.compiled | 8 +-
+ xkb/ddxLoad.c | 192 +++++++++++++++++++++++++++++++++++++++++---------
+ 3 files changed, 164 insertions(+), 42 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4c4c797..7a5020a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -476,9 +476,9 @@ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [
+ AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
+ [ XKBPATH="$withval" ],
+ [ XKBPATH="${datadir}/X11/xkb" ])
+-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
++AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
+ [ XKBOUTPUT="$withval" ],
+- [ XKBOUTPUT="compiled" ])
++ [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
+ AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH],
+ [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]),
+ [ SERVERCONFIG="$withval" ],
+@@ -1757,7 +1757,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir])
+ XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
+
+ if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then
+- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
++ AC_MSG_ERROR([xkb-output must be an absolute path.])
+ fi
+
+ # XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
+diff --git a/xkb/README.compiled b/xkb/README.compiled
+index 71caa2f..a4a2ae0 100644
+--- a/xkb/README.compiled
++++ b/xkb/README.compiled
+@@ -4,10 +4,10 @@ current keymap and/or any scratch keymaps used by clients. The X server
+ or some other tool might destroy or replace the files in this directory,
+ so it is not a safe place to store compiled keymaps for long periods of
+ time. The default keymap for any server is usually stored in:
+- X<num>-default.xkm
+-where <num> is the display number of the server in question, which makes
+-it possible for several servers *on the same host* to share the same
+-directory.
++ server-<SHA1>.xkm
++
++where <SHA1> is the SHA1 hash of keymap source, so that compiled
++keymap of different keymap sources are stored in different files.
+
+ Unless the X server is modified, sharing this directory between servers on
+ different hosts could cause problems.
+diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
+index 4d5dfb6..60a68af 100644
+--- a/xkb/ddxLoad.c
++++ b/xkb/ddxLoad.c
+@@ -32,6 +32,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #include <xkb-config.h>
+ #endif
+
++#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
++# include <sha1.h>
++#else /* Use OpenSSL's libcrypto */
++# include <stddef.h> /* buggy openssl/sha.h wants size_t */
++# include <openssl/sha.h>
++#endif
+ #include <stdio.h>
+ #include <ctype.h>
+ #define NEED_EVENTS 1
+@@ -46,24 +52,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #define XKBSRV_NEED_FILE_FUNCS
+ #include <xkbsrv.h>
+ #include <X11/extensions/XI.h>
++#include <errno.h>
+ #include "xkb.h"
+
+ #if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
+ #include <paths.h>
+ #endif
+
+- /*
+- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
+- * relative to the top-level XKB configuration directory.
+- * Making the server write to a subdirectory of that directory
+- * requires some work in the general case (install procedure
+- * has to create links to /var or somesuch on many machines),
+- * so we just compile into /usr/tmp for now.
+- */
+-#ifndef XKM_OUTPUT_DIR
+-#define XKM_OUTPUT_DIR "compiled/"
+-#endif
+-
+ #define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
+ #define ERROR_PREFIX "\"> \""
+ #define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
+@@ -179,6 +174,45 @@ OutputDirectory(
+ }
+
+ static Bool
++Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input)
++{
++ int i;
++ unsigned char sha1[SHA_DIGEST_LENGTH];
++
++#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
++ SHA1_CTX ctx;
++
++ SHA1Init (&ctx);
++ SHA1Update (&ctx, input, strlen(input));
++ SHA1Final (sha1, &ctx);
++#else /* Use OpenSSL's libcrypto */
++ SHA_CTX ctx;
++ int success;
++
++ success = SHA1_Init (&ctx);
++ if (! success)
++ return BadAlloc;
++
++ success = SHA1_Update (&ctx, input, strlen(input));
++ if (! success)
++ return BadAlloc;
++
++ success = SHA1_Final (sha1, &ctx);
++ if (! success)
++ return BadAlloc;
++#endif
++
++ /* convert sha1 to sha1_asc */
++ for(i=0; i<SHA_DIGEST_LENGTH; ++i) {
++ sprintf(sha1Asc+i*2, "%02X", sha1[i]);
++ }
++
++ return Success;
++}
++
++/* call xkbcomp and compile XKB keymap, return xkm file name in
++ nameRtrn */
++static Bool
+ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ XkbComponentNamesPtr names,
+ unsigned want,
+@@ -187,7 +221,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ int nameRtrnLen)
+ {
+ FILE * out;
+- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
++ char * buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
++ char * tmpXkmFile = NULL;
++ char * canonicalXkmFileName = NULL;
++ char sha1Asc[SHA_DIGEST_LENGTH*2+1], xkbKeyMapBuf[100*1024];
++ int ret, result;
+
+ const char *emptystring = "";
+ const char *xkbbasedirflag = emptystring;
+@@ -198,16 +236,70 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ /* WIN32 has no popen. The input must be stored in a file which is
+ used as input for xkbcomp. xkbcomp does not read from stdin. */
+ char tmpname[PATH_MAX];
+- const char *xkmfile = tmpname;
++ const char *xkbfile = tmpname;
+ #else
+- const char *xkmfile = "-";
++ const char *xkbfile = "-";
+ #endif
+
+- snprintf(keymap, sizeof(keymap), "server-%s", display);
++ /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
++ of which SHA1 is generated and used as result xkm file name */
++ memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
++ out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
++ if (NULL == out) {
++ ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
++ return False;
++ }
++ ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
++ if (fclose(out) !=0)
++ {
++ ErrorF("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
++ return False;
++ }
++#ifdef DEBUG
++ if (xkbDebugFlags) {
++ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
++ fputs(xkbKeyMapBuf, stderr);
++ }
++#endif
++ if (!ret) {
++ ErrorF("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
++ return False;
++ }
++
++ DebugF("[xkb] computing SHA1 of keymap\n");
++ if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
++ snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
++ }
++ else {
++ ErrorF("[xkb] Computing SHA1 of keymap failed, "
++ "using display name instead as xkm file name\n");
++ snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
++ }
+
+- XkbEnsureSafeMapName(keymap);
++ XkbEnsureSafeMapName(xkmfile);
+ OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+
++ /* set nameRtrn, fail if it's too small */
++ if ((strlen(xkmfile)+1 > nameRtrnLen) && nameRtrn) {
++ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
++ return False;
++ }
++ strncpy(nameRtrn, xkmfile, nameRtrnLen);
++
++ /* if the xkm file already exists, reuse it */
++ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
++ if (access(canonicalXkmFileName, R_OK) == 0) {
++ /* yes, we can reuse the old xkm file */
++ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
++ result = True;
++ goto _ret;
++ }
++ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
++
++ /* continue to call xkbcomp to compile the keymap. to avoid race
++ condition, we compile it to a tmpfile then rename it to
++ xkmfile */
++
+ #ifdef WIN32
+ strcpy(tmpname, Win32TempDir());
+ strcat(tmpname, "\\xkb_XXXXXX");
+@@ -230,19 +322,30 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ }
+ }
+
++ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) {
++ ErrorF("[xkb] Can't generate temp xkm file name");
++ result = False;
++ goto _ret;
++ }
++
+ buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
+- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
++ "-em1 %s -emp %s -eml %s \"%s\"",
+ xkbbindir, xkbbindirsep,
+ ( (xkbDebugFlags < 2) ? 1 :
+ ((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
+- xkbbasedirflag, xkmfile,
++ xkbbasedirflag, xkbfile,
+ PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
+- xkm_output_dir, keymap);
++ tmpXkmFile);
+
+ if (xkbbasedirflag != emptystring) {
+ xfree(xkbbasedirflag);
+ }
+
++ /* there's a potential race condition between calling tempnam()
++ and invoking xkbcomp to write the result file (potential temp
++ file name conflicts), but since xkbcomp is a standalone
++ program, we have to live with this */
++
+ #ifndef WIN32
+ out= Popen(buf,"w");
+ #else
+@@ -250,31 +353,43 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ #endif
+
+ if (out!=NULL) {
+-#ifdef DEBUG
+- if (xkbDebugFlags) {
+- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
+- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
++ /* write XKBKeyMapBuf to xkbcomp */
++ if (EOF==fputs(xkbKeyMapBuf, out))
++ {
++ ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
++ result = False;
++ goto _ret;
+ }
+-#endif
+- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
+ #ifndef WIN32
+ if (Pclose(out)==0)
+ #else
+ if (fclose(out)==0 && System(buf) >= 0)
+ #endif
+ {
++ /* xkbcomp success */
+ if (xkbDebugFlags)
+ DebugF("[xkb] xkb executes: %s\n",buf);
+- if (nameRtrn) {
+- strncpy(nameRtrn,keymap,nameRtrnLen);
+- nameRtrn[nameRtrnLen-1]= '\0';
++
++ /* if canonicalXkmFileName already exists now, we simply
++ overwrite it, this is OK */
++ ret = rename(tmpXkmFile, canonicalXkmFileName);
++ if (0 != ret) {
++ ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
++ tmpXkmFile, canonicalXkmFileName,
++ strerror(errno));
++
++ /* in case of error, don't unlink tmpXkmFile, leave it
++ for debugging */
++
++ result = False;
++ goto _ret;
+ }
+- if (buf != NULL)
+- xfree (buf);
+- return True;
++
++ result = True;
++ goto _ret;
+ }
+ else
+- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
++ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
+ #ifdef WIN32
+ /* remove the temporary file */
+ unlink(tmpname);
+@@ -289,9 +404,17 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ }
+ if (nameRtrn)
+ nameRtrn[0]= '\0';
++ result = False;
++
++_ret:
++ if (tmpXkmFile)
++ free(tmpXkmFile);
++ if (canonicalXkmFileName)
++ xfree(canonicalXkmFileName);
+ if (buf != NULL)
+ xfree (buf);
+- return False;
++
++ return result;
+ }
+
+ static FILE *
+@@ -375,7 +498,6 @@ unsigned missing;
+ DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
+ }
+ fclose(file);
+- (void) unlink (fileName);
+ return (need|want)&(~missing);
+ }
+
+--
+1.5.6.5
+
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
new file mode 100644
index 0000000..8b82de2
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
@@ -0,0 +1,20 @@
+diff --git a/configure.ac b/configure.ac
+index b3b752c..600500b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -523,13 +523,9 @@ dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
+ dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross
+ dnl compiling, assume default font path uses standard FONTROOTDIR directories.
+ DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
+-if test "$cross_compiling" != yes; then
+- AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
+- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
+- [case $host_os in
++ case $host_os in
+ darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
+- esac])
+-fi
++ esac
+ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
+ [ FONTPATH="$withval" ],
+ [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
new file mode 100644
index 0000000..092a712
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.6.0/hw/xfree86/common/Makefile.am
+===================================================================
+--- xorg-server-1.6.0.orig/hw/xfree86/common/Makefile.am 2010-02-01 14:04:53.247789918 +0000
++++ xorg-server-1.6.0/hw/xfree86/common/Makefile.am 2010-02-01 14:05:27.787817002 +0000
+@@ -46,7 +46,7 @@
+ sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
+ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \
+ xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \
+- $(XVSDKINCS) xorgVersion.h \
++ xorgVersion.h \
+ xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h
+
+ DISTCLEANFILES = xf86Build.h
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
new file mode 100644
index 0000000..a62a767
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am
+===================================================================
+--- xorg-server-1.4.orig/hw/xfree86/os-support/linux/Makefile.am 2007-08-23 21:04:53.000000000 +0200
++++ xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am 2008-03-13 18:27:23.000000000 +0100
+@@ -41,7 +41,7 @@
+
+ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
+
+-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
++INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
+
+ # FIXME: These need to be added to the build
+ LNX_EXTRA_SRCS = \
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
new file mode 100644
index 0000000..eed491b
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
@@ -0,0 +1,21 @@
+We need to insert the sysroot path into compiler commandlines for this
+kind of variable use, otherwise we're looking into /usr/include/.
+
+RP - 26/11/09
+
+Index: git/xorg-server.m4
+===================================================================
+--- git.orig/xorg-server.m4 2009-11-10 12:04:34.000000000 +0000
++++ git/xorg-server.m4 2009-11-27 00:05:02.000000000 +0000
+@@ -28,9 +28,10 @@
+ # Checks for the $1 define in xorg-server.h (from the sdk). If it
+ # is defined, then add $1 to $REQUIRED_MODULES.
+
++m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$])
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`pkg-config --variable=sdkdir xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
new file mode 100644
index 0000000..94852f0
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
@@ -0,0 +1,22 @@
+We need to insert the sysroot path into compiler commandlines for this
+kind of variable use, otherwise we're looking into /usr/include/.
+
+RP - 26/11/09
+
+Index: git/xorg-server.m4
+===================================================================
+--- git.orig/xorg-server.m4 2010-02-05 10:00:55.000000000 +0000
++++ git/xorg-server.m4 2010-02-05 10:02:12.000000000 +0000
+@@ -28,10 +28,11 @@
+ # Checks for the $1 define in xorg-server.h (from the sdk). If it
+ # is defined, then add $1 to $REQUIRED_MODULES.
+
++m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$])
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
new file mode 100644
index 0000000..565832e
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
@@ -0,0 +1,13 @@
+Index: git/os/osdep.h
+===================================================================
+--- git.orig/os/osdep.h 2008-10-07 18:38:21.000000000 +0100
++++ git/os/osdep.h 2008-10-07 18:39:36.000000000 +0100
+@@ -92,7 +92,7 @@
+ * like sysconf(_SC_OPEN_MAX) is not supported.
+ */
+
+-#if OPEN_MAX <= 256
++#if 0
+ #define MAXSOCKS (OPEN_MAX - 1)
+ #else
+ #define MAXSOCKS 256
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
new file mode 100644
index 0000000..db29da9
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
@@ -0,0 +1,50 @@
+Index: xorg-server-1.5.0/hw/xfree86/dri/dri.c
+===================================================================
+--- xorg-server-1.5.0.orig/hw/xfree86/dri/dri.c 2008-09-24 17:43:04.000000000 +0100
++++ xorg-server-1.5.0/hw/xfree86/dri/dri.c 2008-09-24 17:46:38.000000000 +0100
+@@ -73,10 +73,6 @@
+
+ #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
+
+-#if !defined(PANORAMIX)
+-extern Bool noPanoramiXExtension;
+-#endif
+-
+ static int DRIEntPrivIndex = -1;
+ static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
+ static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
+@@ -307,7 +303,6 @@
+ drm_context_t * reserved;
+ int reserved_count;
+ int i;
+- Bool xineramaInCore = FALSE;
+ DRIEntPrivPtr pDRIEntPriv;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ DRIContextFlags flags = 0;
+@@ -320,20 +315,13 @@
+ return FALSE;
+ }
+
+- /*
+- * If Xinerama is on, don't allow DRI to initialise. It won't be usable
+- * anyway.
+- */
+- if (xf86LoaderCheckSymbol("noPanoramiXExtension"))
+- xineramaInCore = TRUE;
+-
+- if (xineramaInCore) {
+- if (!noPanoramiXExtension) {
+- DRIDrvMsg(pScreen->myNum, X_WARNING,
+- "Direct rendering is not supported when Xinerama is enabled\n");
+- return FALSE;
+- }
++#if defined(PANORAMIX)
++ if (!noPanoramiXExtension) {
++ DRIDrvMsg(pScreen->myNum, X_WARNING,
++ "Direct rendering is not supported when Xinerama is enabled\n");
++ return FALSE;
+ }
++#endif
+
+ if (!DRIOpenDRMMaster(pScrn, pDRIInfo->SAREASize,
+ pDRIInfo->busIdString,
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
new file mode 100644
index 0000000..cd408c7
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
@@ -0,0 +1,28 @@
+This is the revised version of files/macro_tweak.patch for
+xorg-server 1.8.99.904.
+
+the files/macro_tweak.patch can not removed now since it is used by
+xserver-kdrive-1.7.99.2 and xserver-xf86-lite_1.7.99.2. Once they
+are all upgraded to 1.8.99.904, the the files/macro_tweak.patch
+can be safely replace by this patch.
+
+Signed-off-by: Yu Ke <ke.yu@...>
+
+diff --git a/xorg-server.m4 b/xorg-server.m4
+index bdecf62..040fdb8 100644
+--- a/xorg-server.m4
++++ b/xorg-server.m4
+@@ -28,10 +28,12 @@ dnl
+ # Checks for the $1 define in xorg-server.h (from the sdk). If it
+ # is defined, then add $1 to $REQUIRED_MODULES.
+
++m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
++
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
new file mode 100644
index 0000000..6b34032
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
@@ -0,0 +1,12 @@
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
++++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
+@@ -62,7 +62,6 @@
+ AC_LIBTOOL_WIN32_DLL
+ AC_DISABLE_STATIC
+ AC_PROG_LIBTOOL
+-DOLT
+ AC_PROG_MAKE_SET
+ PKG_PROG_PKG_CONFIG
+ AC_PROG_LEX
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
new file mode 100755
index 0000000..3d2fa16
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
@@ -0,0 +1,12 @@
+diff -urN xorg-server-1.5.99.1/hw/xfree86/dri2/dri2.c xorg-server-1.5.99.1.new/hw/xfree86/dri2/dri2.c
+--- xorg-server-1.5.99.1/hw/xfree86/dri2/dri2.c 2008-09-01 03:26:37.000000000 +0800
++++ xorg-server-1.5.99.1.new/hw/xfree86/dri2/dri2.c 2008-09-18 00:28:16.000000000 +0800
+@@ -39,7 +39,7 @@
+ #include "scrnintstr.h"
+ #include "windowstr.h"
+ #include "dri2.h"
+-#include <GL/internal/dri_sarea.h>
++//#include <GL/internal/dri_sarea.h>
+
+ #include "xf86.h"
+
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
new file mode 100755
index 0000000..7ff3658
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
@@ -0,0 +1,23 @@
+commit 67b9b3a77a8b86eef03af36a0f4be3a07411efee
+Author: Eric Anholt <eric@...>
+Date: Thu Sep 11 16:18:17 2008 -0700
+
+ Enable DRI2 build.
+
+diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
+index eff2c31..98d7ec8 100644
+--- a/hw/xfree86/Makefile.am
++++ b/hw/xfree86/Makefile.am
+@@ -4,9 +4,9 @@ if DRI
+ DRI_SUBDIR = dri
+ endif
+
+-#if DRI2
+-#DRI2_SUBDIR = dri2
+-#endif
++if DRI2
++DRI2_SUBDIR = dri2
++endif
+
+ if XF86UTILS
+ XF86UTILS_SUBDIR = utils
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
new file mode 100644
index 0000000..ef53689
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
@@ -0,0 +1,156 @@
+From a3e15680da24cb8259f6a83dee0c930dab024290 Mon Sep 17 00:00:00 2001
+From: Kristian <krh@...>
+Date: Fri, 15 Aug 2008 15:15:14 +1000
+Subject: [PATCH] Add nr for background=none root
+
+---
+ dix/globals.c | 1 +
+ dix/window.c | 22 ++++++++++++----------
+ hw/xfree86/common/xf86Init.c | 11 +++++++++++
+ hw/xfree86/common/xf86str.h | 5 ++++-
+ include/opaque.h | 1 +
+ os/utils.c | 3 +++
+ 6 files changed, 32 insertions(+), 11 deletions(-)
+
+diff --git a/dix/globals.c b/dix/globals.c
+index 973dc43..dbd76bb 100644
+--- a/dix/globals.c
++++ b/dix/globals.c
+@@ -141,6 +141,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
+ CursorPtr rootCursor;
+ Bool party_like_its_1989 = FALSE;
+ Bool whiteRoot = FALSE;
++Bool bgNoneRoot = FALSE;
+
+ int cursorScreenDevPriv[MAXSCREENS];
+
+diff --git a/dix/window.c b/dix/window.c
+index c31fa87..8bb178d 100644
+--- a/dix/window.c
++++ b/dix/window.c
+@@ -482,23 +482,24 @@ InitRootWindow(WindowPtr pWin)
+ pWin->cursorIsNone = FALSE;
+ pWin->optional->cursor = rootCursor;
+ rootCursor->refcnt++;
+-
++ pWin->backingStore = defaultBackingStore;
++ pWin->forcedBS = (defaultBackingStore != NotUseful);
+
+ if (party_like_its_1989) {
+ MakeRootTile(pWin);
+ backFlag |= CWBackPixmap;
++ pScreen->ChangeWindowAttributes(pWin, backFlag);
++ } else if (bgNoneRoot) {
++ /* nothing, handled in xf86CreateRootWindow */
+ } else {
+ if (whiteRoot)
+ pWin->background.pixel = pScreen->whitePixel;
+ else
+ pWin->background.pixel = pScreen->blackPixel;
+ backFlag |= CWBackPixel;
+- }
+
+- pWin->backingStore = defaultBackingStore;
+- pWin->forcedBS = (defaultBackingStore != NotUseful);
+- /* We SHOULD check for an error value here XXX */
+- (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
++ pScreen->ChangeWindowAttributes(pWin, backFlag);
++ }
+
+ MapWindow(pWin, serverClient);
+ }
+diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
+index 236c00b..083a6ac 100644
+--- a/hw/xfree86/common/xf86Init.c
++++ b/hw/xfree86/common/xf86Init.c
+@@ -79,6 +79,7 @@
+ #ifdef RENDER
+ #include "picturestr.h"
+ #endif
++#include "xace.h"
+
+ #include "globals.h"
+
+@@ -328,6 +329,7 @@ xf86CreateRootWindow(WindowPtr pWin)
+ int ret = TRUE;
+ int err = Success;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ RootWinPropPtr pProp;
+ CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
+ dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
+@@ -381,6 +383,15 @@ xf86CreateRootWindow(WindowPtr pWin)
+ }
+ }
+
++ if (bgNoneRoot && pScrn->canDoBGNoneRoot || 1) {
++ pWin->backgroundState = XaceBackgroundNoneState(pWin);
++ pWin->background.pixel = pScreen->whitePixel;
++ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
++ } else {
++ pWin->background.pixel = pScreen->blackPixel;
++ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
++ }
++
+ #ifdef DEBUG
+ ErrorF("xf86CreateRootWindow() returns %d\n", ret);
+ #endif
+diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
+index 904c369..8c38f69 100644
+--- a/hw/xfree86/common/xf86str.h
++++ b/hw/xfree86/common/xf86str.h
+@@ -531,7 +531,7 @@ typedef struct _confdrirec {
+ } confDRIRec, *confDRIPtr;
+
+ /* These values should be adjusted when new fields are added to ScrnInfoRec */
+-#define NUM_RESERVED_INTS 16
++#define NUM_RESERVED_INTS 15
+ #define NUM_RESERVED_POINTERS 15
+ #define NUM_RESERVED_FUNCS 11
+
+@@ -959,6 +959,9 @@ typedef struct _ScrnInfoRec {
+ ClockRangesPtr clockRanges;
+ int adjustFlags;
+
++ /* -nr support */
++ int canDoBGNoneRoot;
++
+ /*
+ * These can be used when the minor ABI version is incremented.
+ * The NUM_* parameters must be reduced appropriately to keep the
+diff --git a/include/opaque.h b/include/opaque.h
+index 07a0715..be1577b 100644
+--- a/include/opaque.h
++++ b/include/opaque.h
+@@ -71,6 +71,7 @@ extern Bool defeatAccessControl;
+ extern long maxBigRequestSize;
+ extern Bool party_like_its_1989;
+ extern Bool whiteRoot;
++extern Bool bgNoneRoot;
+
+ extern Bool CoreDump;
+
+diff --git a/os/utils.c b/os/utils.c
+index b100949..c41b45b 100644
+--- a/os/utils.c
++++ b/os/utils.c
+@@ -515,6 +515,7 @@ void UseMsg(void)
+ #endif
+ ErrorF("-nolisten string don't listen on protocol\n");
+ ErrorF("-noreset don't reset after last client exists\n");
++ ErrorF("-nr create root window with no background\n");
+ ErrorF("-reset reset after last client exists\n");
+ ErrorF("-p # screen-saver pattern duration (minutes)\n");
+ ErrorF("-pn accept failure to listen on all ports\n");
+@@ -859,6 +860,8 @@ ProcessCommandLine(int argc, char *argv[])
+ defaultBackingStore = WhenMapped;
+ else if ( strcmp( argv[i], "-wr") == 0)
+ whiteRoot = TRUE;
++ else if ( strcmp( argv[i], "-nr") == 0)
++ bgNoneRoot = TRUE;
+ else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
+ if(++i < argc) {
+ long reqSizeArg = atol(argv[i]);
+--
+1.5.3.4
+
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
new file mode 100644
index 0000000..2754170
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
@@ -0,0 +1,179 @@
+diff --git a/glx/glxdri2.c b/glx/glxdri2.c
+index 146ea82..3b5338b 100644
+--- a/glx/glxdri2.c
++++ b/glx/glxdri2.c
+@@ -70,6 +70,7 @@ struct __GLXDRIscreen {
+
+ const __DRIcoreExtension *core;
+ const __DRIdri2Extension *dri2;
++ const __DRI2flushExtension *flush;
+ const __DRIcopySubBufferExtension *copySubBuffer;
+ const __DRIswapControlExtension *swapControl;
+ const __DRItexBufferExtension *texBuffer;
+@@ -135,10 +136,14 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *drawable,
+ static GLboolean
+ __glXDRIdrawableSwapBuffers(__GLXdrawable *drawable)
+ {
+- __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
++ __GLXDRIdrawable *priv = (__GLXDRIdrawable *) drawable;
++ __GLXDRIscreen *screen = priv->screen;
++
++ if (!DRI2SwapBuffers(drawable->pDraw))
++ return FALSE;
+
+- __glXDRIdrawableCopySubBuffer(drawable, 0, 0,
+- private->width, private->height);
++ if (screen->flush->flushInvalidate)
++ (*screen->flush->flushInvalidate)(priv->driDrawable);
+
+ return TRUE;
+ }
+diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
+index 580383d..23e6467 100644
+--- a/hw/xfree86/dri2/dri2.c
++++ b/hw/xfree86/dri2/dri2.c
+@@ -70,6 +70,7 @@ typedef struct _DRI2Screen {
+ DRI2CreateBufferProcPtr CreateBuffer;
+ DRI2DestroyBufferProcPtr DestroyBuffer;
+ DRI2CopyRegionProcPtr CopyRegion;
++ DRI2SwapBuffersProcPtr SwapBuffers;
+
+ HandleExposuresProcPtr HandleExposures;
+ } DRI2ScreenRec, *DRI2ScreenPtr;
+@@ -422,6 +423,49 @@ DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
+ return Success;
+ }
+
++Bool
++DRI2SwapBuffers(DrawablePtr pDraw)
++{
++ DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen);
++ DRI2DrawablePtr pPriv;
++ DRI2BufferPtr pDestBuffer, pSrcBuffer;
++ int i;
++
++ pPriv = DRI2GetDrawable(pDraw);
++ if (pPriv == NULL)
++ return FALSE;
++
++ pDestBuffer = NULL;
++ pSrcBuffer = NULL;
++ for (i = 0; i < pPriv->bufferCount; i++)
++ {
++ if (pPriv->buffers[i]->attachment == DRI2BufferFrontLeft)
++ pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i];
++ if (pPriv->buffers[i]->attachment == DRI2BufferBackLeft)
++ pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i];
++ }
++ if (pSrcBuffer == NULL || pDestBuffer == NULL)
++ return FALSE;
++
++ if (ds->SwapBuffers) {
++ if ((*ds->SwapBuffers)(pDraw, pDestBuffer, pSrcBuffer))
++ return TRUE;
++ }
++
++ BoxRec box;
++ RegionRec region;
++
++ box.x1 = 0;
++ box.y1 = 0;
++ box.x2 = pDraw->width;
++ box.y2 = pDraw->height;
++ REGION_INIT(drawable->pDraw->pScreen, &region, &box, 0);
++ if (DRI2CopyRegion(pDraw, &region, DRI2BufferFrontLeft, DRI2BufferBackLeft) != Success)
++ return FALSE;
++
++ return TRUE;
++}
++
+ void
+ DRI2DestroyDrawable(DrawablePtr pDraw)
+ {
+@@ -538,6 +582,9 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
+ }
+ ds->CopyRegion = info->CopyRegion;
+
++ if (info->version >= 3)
++ ds->SwapBuffers = info->SwapBuffers;
++
+ dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds);
+
+ xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n");
+diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
+index f369267..e2784dd 100644
+--- a/hw/xfree86/dri2/dri2.h
++++ b/hw/xfree86/dri2/dri2.h
+@@ -67,6 +67,10 @@ typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw,
+ DRI2BufferPtr pDestBuffer,
+ DRI2BufferPtr pSrcBuffer);
+
++typedef Bool (*DRI2SwapBuffersProcPtr)(DrawablePtr pDraw,
++ DRI2BufferPtr pFrontBuffer,
++ DRI2BufferPtr pBackBuffer);
++
+ typedef void (*DRI2WaitProcPtr)(WindowPtr pWin,
+ unsigned int sequence);
+
+@@ -90,6 +94,7 @@ typedef struct {
+ DRI2CreateBuffersProcPtr CreateBuffers;
+ DRI2DestroyBuffersProcPtr DestroyBuffers;
+ DRI2CopyRegionProcPtr CopyRegion;
++ DRI2SwapBuffersProcPtr SwapBuffers;
+ DRI2WaitProcPtr Wait;
+
+ /**
+@@ -153,4 +158,6 @@ extern _X_EXPORT DRI2Buffer2Ptr *DRI2GetBuffersWithFormat(DrawablePtr pDraw,
+ int *width, int *height, unsigned int *attachments, int count,
+ int *out_count);
+
++extern _X_EXPORT Bool DRI2SwapBuffers(DrawablePtr pDraw);
++
+ #endif
+diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
+index 3c06174..67b419b 100644
+--- a/hw/xfree86/dri2/dri2ext.c
++++ b/hw/xfree86/dri2/dri2ext.c
+@@ -81,7 +81,7 @@ ProcDRI2QueryVersion(ClientPtr client)
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.majorVersion = 1;
+- rep.minorVersion = 1;
++ rep.minorVersion = 2;
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+@@ -323,6 +323,24 @@ ProcDRI2CopyRegion(ClientPtr client)
+ }
+
+ static int
++ProcDRI2SwapBuffers(ClientPtr client)
++{
++ REQUEST(xDRI2SwapBuffersReq);
++ DrawablePtr pDrawable;
++ int status;
++
++ REQUEST_SIZE_MATCH(xDRI2SwapBuffersReq);
++
++ if (!validDrawable(client, stuff->drawable, &pDrawable, &status))
++ return status;
++
++ if (!DRI2SwapBuffers(pDrawable))
++ return BadAlloc;
++
++ return client->noClientException;
++}
++
++static int
+ ProcDRI2Dispatch (ClientPtr client)
+ {
+ REQUEST(xReq);
+@@ -350,6 +368,8 @@ ProcDRI2Dispatch (ClientPtr client)
+ return ProcDRI2CopyRegion(client);
+ case X_DRI2GetBuffersWithFormat:
+ return ProcDRI2GetBuffersWithFormat(client);
++ case X_DRI2SwapBuffers:
++ return ProcDRI2SwapBuffers(client);
+ default:
+ return BadRequest;
+ }
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
new file mode 100644
index 0000000..efc85a4
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
@@ -0,0 +1,38 @@
+diff --git a/os/log.c b/os/log.c
+index 0860847..2c46f1a 100644
+--- a/os/log.c
++++ b/os/log.c
+@@ -255,6 +255,33 @@ LogVWrite(int verb, const char *f, va_list args)
+ static char tmpBuffer[1024];
+ int len = 0;
+
++ struct timeval time;
++ time_t tv_sec;
++ suseconds_t tv_usec;
++ static Bool first = TRUE;
++ static time_t start_tv_sec;
++ static suseconds_t start_usec;
++ int diff_sec, diff_usec;
++
++ gettimeofday(&time, NULL);
++ tv_sec = time.tv_sec;
++ tv_usec = time.tv_usec;
++ if (first == TRUE) {
++ start_tv_sec = tv_sec;
++ start_usec = tv_usec;
++ first = FALSE;
++ }
++ diff_sec = (int)difftime(tv_sec, start_tv_sec);
++ diff_usec = (tv_usec - start_usec);
++ if (diff_usec < 0) {
++ diff_sec--;
++ diff_usec += 1000000;
++ }
++ sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
++ len = strlen(tmpBuffer);
++ if (logFile)
++ fwrite(tmpBuffer, len, 1, logFile);
++
+ /*
+ * Since a va_list can only be processed once, write the string to a
+ * buffer, and then write the buffer out to the appropriate output
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
new file mode 100644
index 0000000..afc94dc
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
@@ -0,0 +1,105 @@
+diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
+index 7f40857..cf58c01 100644
+--- a/hw/xfree86/os-support/linux/lnx_init.c
++++ b/hw/xfree86/os-support/linux/lnx_init.c
+@@ -49,6 +49,7 @@ static Bool KeepTty = FALSE;
+ static int VTnum = -1;
+ static Bool VTSwitch = TRUE;
+ static Bool ShareVTs = FALSE;
++Bool NoHwAccess = FALSE;
+ static int activeVT = -1;
+
+ static int vtPermSave[4];
+@@ -80,9 +81,11 @@ saveVtPerms(void)
+ static void
+ restoreVtPerms(void)
+ {
+- /* Set the terminal permissions back to before we started. */
+- chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
+- chown(vtname, vtPermSave[2], vtPermSave[3]);
++ if (geteuid() == 0) {
++ /* Set the terminal permissions back to before we started. */
++ (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
++ (void)chown(vtname, vtPermSave[2], vtPermSave[3]);
++ }
+ }
+
+ static void *console_handler;
+@@ -210,20 +213,22 @@ xf86OpenConsole(void)
+ xf86Msg(X_WARNING,
+ "xf86OpenConsole: Could not save ownership of VT\n");
+
+- /* change ownership of the vt */
+- if (chown(vtname, getuid(), getgid()) < 0)
+- xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
+- vtname, strerror(errno));
+-
+- /*
+- * the current VT device we're running on is not "console", we want
+- * to grab all consoles too
+- *
+- * Why is this needed??
+- */
+- if (chown("/dev/tty0", getuid(), getgid()) < 0)
+- xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
+- strerror(errno));
++ if (geteuid() == 0) {
++ /* change ownership of the vt */
++ if (chown(vtname, getuid(), getgid()) < 0)
++ xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
++ vtname, strerror(errno));
++
++ /*
++ * the current VT device we're running on is not
++ * "console", we want to grab all consoles too
++ *
++ * Why is this needed??
++ */
++ if (chown("/dev/tty0", getuid(), getgid()) < 0)
++ xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
++ strerror(errno));
++ }
+ }
+
+ /*
+@@ -433,6 +438,11 @@ xf86ProcessArgument(int argc, char *argv[], int i)
+ ShareVTs = TRUE;
+ return(1);
+ }
++ if (!strcmp(argv[i], "-nohwaccess"))
++ {
++ NoHwAccess = TRUE;
++ return(1);
++ }
+ if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
+ {
+ if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
+@@ -454,5 +464,6 @@ xf86UseMsg()
+ ErrorF("don't detach controlling tty (for debugging only)\n");
+ ErrorF("-novtswitch don't immediately switch to new VT\n");
+ ErrorF("-sharevts share VTs with another X server\n");
++ ErrorF("-nohwaccess don't access hardware ports directly\n");
+ return;
+ }
+diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
+index 688106a..34a845b 100644
+--- a/hw/xfree86/os-support/linux/lnx_video.c
++++ b/hw/xfree86/os-support/linux/lnx_video.c
+@@ -51,6 +51,7 @@
+ #define MAP_FAILED ((void *)-1)
+ #endif
+
++extern Bool NoHwAccess;
+ static Bool ExtendedEnabled = FALSE;
+
+ #ifdef __ia64__
+@@ -509,6 +510,9 @@ xf86EnableIO(void)
+ int fd;
+ unsigned int ioBase_phys;
+ #endif
++ /* Fake it... */
++ if (NoHwAccess)
++ return TRUE;
+
+ if (ExtendedEnabled)
+ return TRUE;
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb
new file mode 100644
index 0000000..81d70bc
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb
@@ -0,0 +1,19 @@
+require recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc
+
+PROTO_DEPS += "xf86driproto dri2proto"
+
+DEPENDS += "font-util"
+
+PE = "1"
+PR = "r0"
+
+SRC_URI += "file://nodolt.patch \
+ file://crosscompile.patch"
+
+# Misc build failure for master HEAD
+SRC_URI += "file://fix_open_max_preprocessor_error.patch"
+
+SRC_URI[md5sum] = "5bef6839a76d029204ab31aa2fcb5201"
+SRC_URI[sha256sum] = "864831f51e841ff37f2445d1c85b86b559c8860a435fb496aead4f256a2b141d"
+
+EXTRA_OECONF += "--enable-dri --enable-dri2 --enable-dga"
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


[PATCH 6/6] meta-crownbay: update README with new build instructions.

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

EMGD 1.6 added a new non-clickthrough Linux tarball download; this
changes the README to make use of it and also updates new directory
naming, etc.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
meta-crownbay/README | 95 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 77 insertions(+), 18 deletions(-)

diff --git a/meta-crownbay/README b/meta-crownbay/README
index bb1e0c3..89056ed 100644
--- a/meta-crownbay/README
+++ b/meta-crownbay/README
@@ -6,7 +6,7 @@ The Crown Bay platform consists of the Intel Atom Z6xx processor,
plus the Intel EG20T Platform Controller Hub (Tunnel Creek + Topcliff).

It also supports the E6xx embedded on-chip graphics via the Intel
-Embedded Media and Graphics Driver (EMGD) 1.5 Gold Driver.
+Embedded Media and Graphics Driver (EMGD) 1.6 Gold Driver.

Table of Contents
=================
@@ -33,7 +33,7 @@ bblayers.conf e.g.:
The meta-crownbay layer contains support for two different machine
configurations. These configurations are identical except for the fact
that the one prefixed with 'crownbay' makes use of the
-Intel-proprietary EMGD 1.5 graphics driver, while the one prefixed
+Intel-proprietary EMGD 1.6 graphics driver, while the one prefixed
with 'crownbay-noemgd' does not.

If you want to enable the layer that supports EMGD graphics add
@@ -73,19 +73,71 @@ userspace drivers when building the "crownbay" machine (but not when
building the "crownbay-noemgd" machine). If you got the BSP from the
'BSP Downloads' section of the Yocto website, the EMGD binaries needed
to perform the build will already be present in the BSP, located in
-the recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin directory, and
+the recipes-graphics/xorg-xserver/emgd-driver-bin-1.6 directory, and
you can ignore the rest of this section.

If you didn't get the BSP from the 'BSP Downloads' section of the
-Yocto website, you'll need to download the a Windows executable from
-the official EMGD website, extract the binaries from it, and copy them
-to the proper location in the meta-crownbay layer.
+Yocto website, you have two choices:
+
+- You can download a tarball containing an rpm that contains the
+ binaries and extract the binaries from that, and copy them to the
+ proper location in the meta-crownbay layer.
+
+- You can download a Windows executable from the official EMGD
+ website, extract the binaries from it, and copy them to the proper
+ location in the meta-crownbay layer.
+
+The following subsections describe each option in detail.
+
+
+IIa Downloading and extracting the binaries using the EMGD Linux tarball
+------------------------------------------------------------------------
+
+The first step of the process is to download the EMGD 1.6 Gold Driver.
+Here is the current link to the URL which it can be downloaded from:
+
+http://edc.intel.com/Software/Downloads/EMGD/
+
+In the Download Now tab, select:
+
+Intel® architecture-based product: Linux Tar Ball
+Operating System: MeeGo 1.0 IVI Linux (kernel 2.6.33.3, X.server 1.8.0)
+
+That will give you a large tar file:
+
+Lin_EMGD_1_6_RC_1922.tar
+
+Extract the files in the tar file, which will in turn give you a
+directory named IEMGD_HEAD_Linux.
+
+The binaries are contained in an rpm file; you can extract the
+binaries from the rpm file using rpm2cpio and cpio:
+
+$ cd IEMGD_HEAD_Linux/MeeGo1.2
+$ rpm2cpio emgd-bin-1922-1.6.i586.rpm > emgd-bin-1922-1.6.i586.cpio
+$ mkdir extracted; cd extracted
+$ cpio -idv < ../poky-image-minimal-initramfs-emenlow.cpio
+
+Finally, you can copy the xorg-xserver binaries to the
+emgd-driver-bin-1.6 directory in the meta-crownbay layer:
+
+$ cp -a usr/lib meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6
+
+You also need to copy the IEMGD License.txt file to the same directory:
+
+$ cp IEMGD_HEAD_Linux/License/License.txt meta-crownbay/recipes/xorg-xserver/emgd-driver-bin-1.6
+
+At this point, you should be able to build meta-crownbay images as usual.
+
+
+IIb Extracting the binaries using the graphical ced application
+---------------------------------------------------------------

These steps require that you run a graphical application in Windows.
Windows 7 was used for these instructions, but it shouldn't matter
which version of Windows you use.

-The first step of the process is to download the EMGD 1.5 Gold Driver.
+The first step of the process is to download the EMGD 1.6 Gold Driver.
Here is the current link to the URL which it can be downloaded from:

http://edc.intel.com/Software/Downloads/EMGD/
@@ -97,14 +149,14 @@ Operating System: MeeGo 1.0 IVI Linux (kernel 2.6.33.3, X.server 1.8.0)

That will give you a large zip file:

-IEMGD_1_5_GOLD_ALL_1742.zip
+IEMGD_1_6_GOLD_1922.zip

Extract the files in the zip file, which will in turn give you a large
.exe file:

-IEMGD_1_5_GOLD_ALL_1742.exe
+IEMGD_1_6_GOLD_ALL_1922.exe

-Run IEMGD_1_5_GOLD_ALL_1742.exe to install, accept licenses, etc.
+Run IEMGD_1_6_GOLD_ALL_1922.exe to install, accept licenses, etc.

If it says to install watcom, follow the instructions to do that.

@@ -157,32 +209,39 @@ system, and uncompress/untar it:

$ tar cvfz IEMGD_HEAD_Linux.tgz

-Finally, copy Xorg-xserver binaries in the Meego1.0 driver directory
-to the xserver-xf86-emgd-bin directory in the meta-crownbay layer:
+The binaries are contained in an rpm file; you can extract the
+binaries from the rpm file using rpm2cpio and cpio:
+
+$ cd IEMGD_HEAD_Linux/MeeGo1.2
+$ rpm2cpio emgd-bin-1922-1.6.i586.rpm > emgd-bin-1922-1.6.i586.cpio
+$ mkdir extracted; cd extracted
+$ cpio -idv < ../poky-image-minimal-initramfs-emenlow.cpio
+
+Finally, you can copy the xorg-xserver binaries to the
+emgd-driver-bin-1.6 directory in the meta-crownbay layer:

-$ cp IEMGD_HEAD_Linux/MeeGo1.0/driver/Xorg-xserver-1.7.99/* meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin
+$ cp -a usr/lib meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6

You also need to copy the IEMGD License.txt file to the same directory:

-$ cp IEMGD_HEAD_Linux/License/License.txt meta-crownbay/recipes/xorg-xserver/xserver-xf86-emgd-bin
+$ cp IEMGD_HEAD_Linux/License/License.txt meta-crownbay/recipes/xorg-xserver/emgd-driver-bin-1.6

At this point, you should be able to build meta-crownbay images as usual.

----

For reference, the EMGD Driver documentation is also available at the
-above link (it's also part of the installation).
+above link.

The specific text of the document is:

User Guide: Intel® Embedded Media and Graphics Driver, EFI Video
-Driver, EPOG, and Video BIOS v1.5 for Windows* XP and Linux* Provides
+Driver, EPOG, and Video BIOS v1.6 for Windows* XP and Linux* Provides
installation requirements/procedures & describes the vbios/firmware,
configuration options, & functionality of Intel® EMGD under Windows* &
Linux*. Refer to guide for details.

-File Type/Size: PDF 3,340KB
-Version: 008 : October 2010
+April 2011


II. Booting the images in /binary
--
1.7.0.4


[PATCH 5/6] meta-crownbay: remove obsolete graphics recipes

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

With the emgd 1.6 upgrade, we no longer need these.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
.../xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb | 90 --------------------
.../xserver-xf86-emgd/crosscompile.patch | 19 ----
.../fix_open_max_preprocessor_error.patch | 13 ---
.../xserver-xf86-emgd/macro_tweak.patch | 18 ----
.../xorg-xserver/xserver-xf86-emgd/nodolt.patch | 12 ---
.../xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb | 25 ------
6 files changed, 0 insertions(+), 177 deletions(-)
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb

diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb b/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
deleted file mode 100644
index 9506872..0000000
--- a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
+++ /dev/null
@@ -1,90 +0,0 @@
-SUMMARY = "EMGD 1.5 xserver binaries"
-DESCRIPTION = "EMGD 1.5 includes some userspace binaries that use non-free licensing. Intel Open Source Technology Center unfortunately has no power to change that, but tries to make their use as painless as possible. Please see the README.before.building in meta-crownbay/recipes/xorg-xerver for instructions on the (simple) manual steps necessary to make the necessary binaries available to this recipe. Please do that before building an image."
-
-LICENSE = "Intel-binary-only"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/License.txt;md5=95c4d031b83ab803f3f2401b04ecfbcd"
-PR = "r0"
-
-FILESPATH = "${FILE_DIRNAME}/xserver-xf86-emgd-bin"
-
-FILES_${PN} = "${libdir}/*.so.* ${libdir}/dri ${libdir}/xorg/modules/drivers"
-
-SRC_URI = "file://emgd_dri.so \
- file://emgd_drv.so \
- file://emgd_drv_video.so \
- file://libEGL.so \
- file://libGLES_CM.so \
- file://libGLESv2.so \
- file://libIMGegl.so \
- file://libOpenVG.so \
- file://libOpenVGU.so \
- file://libPVROGL.so \
- file://libPVRScopeServices.so \
- file://libXegd_escape.so.2.0.0 \
- file://libglslcompiler.so \
- file://libpvr2d.so \
- file://libpvrPVR2D_DRIWSEGL.so \
- file://libsrv_init.so \
- file://libsrv_um.so \
- file://libva-x11.so.1.0.1 \
- file://libva.so.1.0.1 \
- file://License.txt"
-
-S = "${WORKDIR}"
-
-do_install () {
- install -d -m 0755 ${D}/${libdir}/dri ${D}/${libdir}/xorg/modules/drivers
-
- install -m 0755 ${S}/emgd_dri.so ${D}${libdir}/dri/emgd_dri.so.1.1.15.3082
- ln -sf emgd_dri.so.1.1.15.3082 ${D}${libdir}/dri/emgd_dri.so
-
- install -m 0755 ${S}/emgd_drv.so ${D}${libdir}/xorg/modules/drivers/emgd_drv.so
- install -m 0755 ${S}/emgd_drv_video.so ${D}${libdir}/xorg/modules/drivers/emgd_drv_video.so
-
- install -m 0755 ${S}/libEGL.so ${D}${libdir}/libEGL.so.1.1.15.3082
- ln -sf libEGL.so.1.1.15.3082 ${D}${libdir}/libEGL.so
-
- install -m 0755 ${S}/libGLES_CM.so ${D}${libdir}/libGLES_CM.so.1.1.15.3082
- ln -sf libGLES_CM.so.1.1.15.3082 ${D}${libdir}/libGLES_CM.so
-
- install -m 0755 ${S}/libGLESv2.so ${D}${libdir}/libGLESv2.so.1.1.15.3082
- ln -sf libGLESv2.so.1.1.15.3082 ${D}${libdir}/libGLESv2.so
-
- install -m 0755 ${S}/libIMGegl.so ${D}${libdir}/libIMGegl.so.1.1.15.3082
- ln -sf libIMGegl.so.1.1.15.3082 ${D}${libdir}/libIMGegl.so
-
- install -m 0755 ${S}/libOpenVG.so ${D}${libdir}/libOpenVG.so.1.1.15.3082
- ln -sf libOpenVG.so.1.1.15.3082 ${D}${libdir}/libOpenVG.so
-
- install -m 0755 ${S}/libOpenVGU.so ${D}${libdir}/libOpenVGU.so.1.1.15.3082
- ln -sf libOpenVG.so.1.1.15.3082 ${D}${libdir}/libOpenVGU.so
-
- install -m 0755 ${S}/libPVROGL.so ${D}${libdir}/libPVROGL.so.1.1.15.3082
- ln -sf libPVROGL.so.1.1.15.3082 ${D}${libdir}/libPVROGL.so
-
- install -m 0755 ${S}/libPVRScopeServices.so ${D}${libdir}/libPVRScopeServices.so.1.1.15.3082
- ln -sf libPVRScopeServices.so.1.1.15.3082 ${D}${libdir}/libPVRScopeServices.so
-
- install -m 0755 ${S}/libXegd_escape.so.2.0.0 ${D}${libdir}/libXegd_escape.so.2.0.0
-
- install -m 0755 ${S}/libglslcompiler.so ${D}${libdir}/libglslcompiler.so.1.1.15.3082
- ln -sf libglslcompiler.so.1.1.15.3082 ${D}${libdir}/libglslcompiler.so
-
- install -m 0755 ${S}/libpvr2d.so ${D}${libdir}/libpvr2d.so.1.1.15.3082
- ln -sf libpvr2d.so.1.1.15.3082 ${D}${libdir}/libpvr2d.so
-
- install -m 0755 ${S}/libpvrPVR2D_DRIWSEGL.so ${D}${libdir}/libpvrPVR2D_DRIWSEGL.so.1.1.15.3082
- ln -sf libpvrPVR2D_DRIWSEGL.so.1.1.15.3082 ${D}${libdir}/libpvrPVR2D_DRIWSEGL.so
-
- install -m 0755 ${S}/libsrv_init.so ${D}${libdir}/libsrv_init.so.1.1.15.3082
- ln -sf libsrv_init.so.1.1.15.3082 ${D}${libdir}/libsrv_init.so
-
- install -m 0755 ${S}/libsrv_um.so ${D}${libdir}/libsrv_um.so.1.1.15.3082
- ln -sf libsrv_um.so.1.1.15.3082 ${D}${libdir}/libsrv_um.so
-
- install -m 0755 ${S}/libva-x11.so.1.0.1 ${D}${libdir}/libva-x11.so.1.0.1
-
- install -m 0755 ${S}/libva.so.1.0.1 ${D}${libdir}/libva.so.1.0.1
-}
-
-LEAD_SONAME = "libEGL.so"
diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch b/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
deleted file mode 100644
index 2341e40..0000000
--- a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: xorg-server-1.7.99.2/configure.ac
-===================================================================
---- xorg-server-1.7.99.2.orig/configure.ac 2010-01-29 16:38:49.000000000 +0000
-+++ xorg-server-1.7.99.2/configure.ac 2010-01-29 16:42:39.000000000 +0000
-@@ -503,14 +503,10 @@
-
- dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
- dnl otherwise uses standard subdirectories of FONTROOTDIR
--AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
-- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
-- [
- DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
- case $host_os in
- darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
- esac
-- ])
- AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
- [ FONTPATH="$withval" ],
- [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch b/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch
deleted file mode 100644
index 565832e..0000000
--- a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/fix_open_max_preprocessor_error.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: git/os/osdep.h
-===================================================================
---- git.orig/os/osdep.h 2008-10-07 18:38:21.000000000 +0100
-+++ git/os/osdep.h 2008-10-07 18:39:36.000000000 +0100
-@@ -92,7 +92,7 @@
- * like sysconf(_SC_OPEN_MAX) is not supported.
- */
-
--#if OPEN_MAX <= 256
-+#if 0
- #define MAXSOCKS (OPEN_MAX - 1)
- #else
- #define MAXSOCKS 256
diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch b/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch
deleted file mode 100644
index 6998adf..0000000
--- a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Index: xorg-server-1.5.0/xorg-server.m4
-===================================================================
---- xorg-server-1.5.0.orig/xorg-server.m4 2007-05-29 20:36:51.000000000 +0100
-+++ xorg-server-1.5.0/xorg-server.m4 2008-11-04 23:56:55.000000000 +0000
-@@ -28,9 +28,12 @@
- # Checks for the $1 define in xorg-server.h (from the sdk). If it
- # is defined, then add $1 to $REQUIRED_MODULES.
-
-+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
-+
- AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
-+ PKG_PROG_PKG_CONFIG
- SAVE_CFLAGS="$CFLAGS"
-- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
-+ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`pkg-config --variable=sdkdir xorg-server`"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include "xorg-server.h"
- #if !defined $1
diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch b/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch
deleted file mode 100644
index 6b34032..0000000
--- a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/nodolt.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
-+++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
-@@ -62,7 +62,6 @@
- AC_LIBTOOL_WIN32_DLL
- AC_DISABLE_STATIC
- AC_PROG_LIBTOOL
--DOLT
- AC_PROG_MAKE_SET
- PKG_PROG_PKG_CONFIG
- AC_PROG_LEX
diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb b/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb
deleted file mode 100644
index 01f0a24..0000000
--- a/meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-require recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3dd2bbe3563837f80ed8926b06c1c353"
-
-PROTO_DEPS += "xf86driproto dri2proto"
-
-DEPENDS += "font-util"
-
-PE = "1"
-PR = "r0"
-
-SRC_URI += "file://nodolt.patch \
- file://crosscompile.patch"
-
-# Misc build failure for master HEAD
-SRC_URI += "file://fix_open_max_preprocessor_error.patch"
-
-SRC_URI[md5sum] = "cafc4e2d4ef6cf6e47f3e7dffeb3346a"
-SRC_URI[sha256sum] = "a89f13b166b412930fe418ff50032dd2cde8bb181d8b47b5ca6f848d218fdcf2"
-
-RDEPENDS_${PN} += "xserver-xf86-emgd-bin mesa-dri"
-
-COMPATIBLE_MACHINE = "crownbay"
-
-EXTRA_OECONF += "--enable-dga --enable-dri --enable-dri2"
--
1.7.0.4


[PATCH 4/6] meta-crownbay: update crownbay.conf

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

Update to reflect new graphics recipes.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
meta-crownbay/conf/machine/crownbay.conf | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta-crownbay/conf/machine/crownbay.conf b/meta-crownbay/conf/machine/crownbay.conf
index 48742be..e35334d 100644
--- a/meta-crownbay/conf/machine/crownbay.conf
+++ b/meta-crownbay/conf/machine/crownbay.conf
@@ -17,18 +17,18 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-dri"
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-emgd"
-PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-emgd"
-XSERVER ?= "xserver-xf86-emgd \
- xserver-xf86-emgd-bin \
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite"
+PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-dri-lite"
+XSERVER ?= "xserver-xf86-dri-lite \
+ emgd-driver-bin \
xf86-input-mouse \
xf86-input-keyboard \
xf86-input-evdev \
xf86-input-synaptics \
xf86-video-vesa"

-PREFERRED_VERSION_xserver-xf86-emgd ?= "1.7.99.2"
-PREFERRED_VERSION_xserver-xf86-emgd-bin ?= "1.7.99.2"
+PREFERRED_VERSION_xserver-xf86-dri-lite ?= "1.9.3"
+PREFERRED_VERSION_emgd-driver-bin ?= "1.6"

SERIAL_CONSOLE = "115200 ttyS0"

--
1.7.0.4


[PATCH 3/6] meta-crownbay: add common to BBFILES

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

Add common to BBFILES so crownbay can find recipes it needs from
there.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
meta-crownbay/conf/layer.conf | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/meta-crownbay/conf/layer.conf b/meta-crownbay/conf/layer.conf
index d15579d..4ffeb2c 100644
--- a/meta-crownbay/conf/layer.conf
+++ b/meta-crownbay/conf/layer.conf
@@ -3,7 +3,9 @@ BBPATH := "${BBPATH}:${LAYERDIR}"

# We have a recipes directory, add to BBFILES
BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
- ${LAYERDIR}/recipes-*/*/*.bbappend"
+ ${LAYERDIR}/recipes-*/*/*.bbappend \
+ ${LAYERDIR}/../common/recipes-*/*/*.bb \
+ ${LAYERDIR}/../common/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS_append_crownbay += "crownbay"
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
--
1.7.0.4


[PATCH 2/6] meta-intel: add xserver-xf86-dri-lite_1.9.3 to common

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

emgd 1.6 requires xserver 1.9.3, which is no longer in meta, and it
needs to be shared by multiple BSPs, so add it to common.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
.../cache-xkbcomp-output-for-fast-start-up.patch | 358 ++++++++++++++++++++
.../xserver-xf86-dri-lite/crosscompile.patch | 20 ++
.../xserver-xf86-dri-lite/doublefix.patch | 13 +
.../xserver-xf86-dri-lite/drmfix.patch | 13 +
.../xserver-xf86-dri-lite/fix_macros.patch | 21 ++
.../xserver-xf86-dri-lite/fix_macros1.patch | 22 ++
.../fix_open_max_preprocessor_error.patch | 13 +
.../libdri-xinerama-symbol.patch | 50 +++
.../xserver-xf86-dri-lite/macro_tweak.patch | 28 ++
.../xserver-xf86-dri-lite/nodolt.patch | 12 +
.../xorg-server-disable-dri_sarea.patch | 12 +
.../xorg-server-enable-dri2.patch | 23 ++
.../xserver-1.5.0-bg-none-root.patch | 156 +++++++++
.../xserver-DRI2Swapbuffer.patch | 179 ++++++++++
.../xserver-xf86-dri-lite/xserver-boottime.patch | 38 ++
.../xserver-xf86-dri-lite/xserver-no-root-2.patch | 105 ++++++
.../xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb | 19 +
17 files changed, 1082 insertions(+), 0 deletions(-)
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
create mode 100755 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
create mode 100755 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb

diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
new file mode 100644
index 0000000..b121bba
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
@@ -0,0 +1,358 @@
+From 0f70ba9d3412b17ac4e08e33e1be3c226c06ea54 Mon Sep 17 00:00:00 2001
+From: Yan Li <yan.i.li@...>
+Date: Tue, 12 May 2009 17:49:07 +0800
+Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v5 for 1.6.1
+Organization: Intel
+
+xkbcomp outputs will be cached in files with hashed keymap as
+names. This saves boot time for around 1s on commodity netbooks.
+
+Signed-off-by: Yan Li <yan.i.li@...>
+---
+ configure.ac | 6 +-
+ xkb/README.compiled | 8 +-
+ xkb/ddxLoad.c | 192 +++++++++++++++++++++++++++++++++++++++++---------
+ 3 files changed, 164 insertions(+), 42 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4c4c797..7a5020a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -476,9 +476,9 @@ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [
+ AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
+ [ XKBPATH="$withval" ],
+ [ XKBPATH="${datadir}/X11/xkb" ])
+-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
++AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
+ [ XKBOUTPUT="$withval" ],
+- [ XKBOUTPUT="compiled" ])
++ [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
+ AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH],
+ [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]),
+ [ SERVERCONFIG="$withval" ],
+@@ -1757,7 +1757,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir])
+ XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
+
+ if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then
+- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
++ AC_MSG_ERROR([xkb-output must be an absolute path.])
+ fi
+
+ # XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
+diff --git a/xkb/README.compiled b/xkb/README.compiled
+index 71caa2f..a4a2ae0 100644
+--- a/xkb/README.compiled
++++ b/xkb/README.compiled
+@@ -4,10 +4,10 @@ current keymap and/or any scratch keymaps used by clients. The X server
+ or some other tool might destroy or replace the files in this directory,
+ so it is not a safe place to store compiled keymaps for long periods of
+ time. The default keymap for any server is usually stored in:
+- X<num>-default.xkm
+-where <num> is the display number of the server in question, which makes
+-it possible for several servers *on the same host* to share the same
+-directory.
++ server-<SHA1>.xkm
++
++where <SHA1> is the SHA1 hash of keymap source, so that compiled
++keymap of different keymap sources are stored in different files.
+
+ Unless the X server is modified, sharing this directory between servers on
+ different hosts could cause problems.
+diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
+index 4d5dfb6..60a68af 100644
+--- a/xkb/ddxLoad.c
++++ b/xkb/ddxLoad.c
+@@ -32,6 +32,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #include <xkb-config.h>
+ #endif
+
++#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
++# include <sha1.h>
++#else /* Use OpenSSL's libcrypto */
++# include <stddef.h> /* buggy openssl/sha.h wants size_t */
++# include <openssl/sha.h>
++#endif
+ #include <stdio.h>
+ #include <ctype.h>
+ #define NEED_EVENTS 1
+@@ -46,24 +52,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ #define XKBSRV_NEED_FILE_FUNCS
+ #include <xkbsrv.h>
+ #include <X11/extensions/XI.h>
++#include <errno.h>
+ #include "xkb.h"
+
+ #if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
+ #include <paths.h>
+ #endif
+
+- /*
+- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
+- * relative to the top-level XKB configuration directory.
+- * Making the server write to a subdirectory of that directory
+- * requires some work in the general case (install procedure
+- * has to create links to /var or somesuch on many machines),
+- * so we just compile into /usr/tmp for now.
+- */
+-#ifndef XKM_OUTPUT_DIR
+-#define XKM_OUTPUT_DIR "compiled/"
+-#endif
+-
+ #define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
+ #define ERROR_PREFIX "\"> \""
+ #define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
+@@ -179,6 +174,45 @@ OutputDirectory(
+ }
+
+ static Bool
++Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input)
++{
++ int i;
++ unsigned char sha1[SHA_DIGEST_LENGTH];
++
++#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
++ SHA1_CTX ctx;
++
++ SHA1Init (&ctx);
++ SHA1Update (&ctx, input, strlen(input));
++ SHA1Final (sha1, &ctx);
++#else /* Use OpenSSL's libcrypto */
++ SHA_CTX ctx;
++ int success;
++
++ success = SHA1_Init (&ctx);
++ if (! success)
++ return BadAlloc;
++
++ success = SHA1_Update (&ctx, input, strlen(input));
++ if (! success)
++ return BadAlloc;
++
++ success = SHA1_Final (sha1, &ctx);
++ if (! success)
++ return BadAlloc;
++#endif
++
++ /* convert sha1 to sha1_asc */
++ for(i=0; i<SHA_DIGEST_LENGTH; ++i) {
++ sprintf(sha1Asc+i*2, "%02X", sha1[i]);
++ }
++
++ return Success;
++}
++
++/* call xkbcomp and compile XKB keymap, return xkm file name in
++ nameRtrn */
++static Bool
+ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ XkbComponentNamesPtr names,
+ unsigned want,
+@@ -187,7 +221,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ int nameRtrnLen)
+ {
+ FILE * out;
+- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
++ char * buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
++ char * tmpXkmFile = NULL;
++ char * canonicalXkmFileName = NULL;
++ char sha1Asc[SHA_DIGEST_LENGTH*2+1], xkbKeyMapBuf[100*1024];
++ int ret, result;
+
+ const char *emptystring = "";
+ const char *xkbbasedirflag = emptystring;
+@@ -198,16 +236,70 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ /* WIN32 has no popen. The input must be stored in a file which is
+ used as input for xkbcomp. xkbcomp does not read from stdin. */
+ char tmpname[PATH_MAX];
+- const char *xkmfile = tmpname;
++ const char *xkbfile = tmpname;
+ #else
+- const char *xkmfile = "-";
++ const char *xkbfile = "-";
+ #endif
+
+- snprintf(keymap, sizeof(keymap), "server-%s", display);
++ /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
++ of which SHA1 is generated and used as result xkm file name */
++ memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
++ out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
++ if (NULL == out) {
++ ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
++ return False;
++ }
++ ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
++ if (fclose(out) !=0)
++ {
++ ErrorF("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
++ return False;
++ }
++#ifdef DEBUG
++ if (xkbDebugFlags) {
++ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
++ fputs(xkbKeyMapBuf, stderr);
++ }
++#endif
++ if (!ret) {
++ ErrorF("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
++ return False;
++ }
++
++ DebugF("[xkb] computing SHA1 of keymap\n");
++ if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
++ snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
++ }
++ else {
++ ErrorF("[xkb] Computing SHA1 of keymap failed, "
++ "using display name instead as xkm file name\n");
++ snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
++ }
+
+- XkbEnsureSafeMapName(keymap);
++ XkbEnsureSafeMapName(xkmfile);
+ OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+
++ /* set nameRtrn, fail if it's too small */
++ if ((strlen(xkmfile)+1 > nameRtrnLen) && nameRtrn) {
++ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
++ return False;
++ }
++ strncpy(nameRtrn, xkmfile, nameRtrnLen);
++
++ /* if the xkm file already exists, reuse it */
++ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
++ if (access(canonicalXkmFileName, R_OK) == 0) {
++ /* yes, we can reuse the old xkm file */
++ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
++ result = True;
++ goto _ret;
++ }
++ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
++
++ /* continue to call xkbcomp to compile the keymap. to avoid race
++ condition, we compile it to a tmpfile then rename it to
++ xkmfile */
++
+ #ifdef WIN32
+ strcpy(tmpname, Win32TempDir());
+ strcat(tmpname, "\\xkb_XXXXXX");
+@@ -230,19 +322,30 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ }
+ }
+
++ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) {
++ ErrorF("[xkb] Can't generate temp xkm file name");
++ result = False;
++ goto _ret;
++ }
++
+ buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
+- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
++ "-em1 %s -emp %s -eml %s \"%s\"",
+ xkbbindir, xkbbindirsep,
+ ( (xkbDebugFlags < 2) ? 1 :
+ ((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
+- xkbbasedirflag, xkmfile,
++ xkbbasedirflag, xkbfile,
+ PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
+- xkm_output_dir, keymap);
++ tmpXkmFile);
+
+ if (xkbbasedirflag != emptystring) {
+ xfree(xkbbasedirflag);
+ }
+
++ /* there's a potential race condition between calling tempnam()
++ and invoking xkbcomp to write the result file (potential temp
++ file name conflicts), but since xkbcomp is a standalone
++ program, we have to live with this */
++
+ #ifndef WIN32
+ out= Popen(buf,"w");
+ #else
+@@ -250,31 +353,43 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ #endif
+
+ if (out!=NULL) {
+-#ifdef DEBUG
+- if (xkbDebugFlags) {
+- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
+- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
++ /* write XKBKeyMapBuf to xkbcomp */
++ if (EOF==fputs(xkbKeyMapBuf, out))
++ {
++ ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
++ result = False;
++ goto _ret;
+ }
+-#endif
+- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
+ #ifndef WIN32
+ if (Pclose(out)==0)
+ #else
+ if (fclose(out)==0 && System(buf) >= 0)
+ #endif
+ {
++ /* xkbcomp success */
+ if (xkbDebugFlags)
+ DebugF("[xkb] xkb executes: %s\n",buf);
+- if (nameRtrn) {
+- strncpy(nameRtrn,keymap,nameRtrnLen);
+- nameRtrn[nameRtrnLen-1]= '\0';
++
++ /* if canonicalXkmFileName already exists now, we simply
++ overwrite it, this is OK */
++ ret = rename(tmpXkmFile, canonicalXkmFileName);
++ if (0 != ret) {
++ ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
++ tmpXkmFile, canonicalXkmFileName,
++ strerror(errno));
++
++ /* in case of error, don't unlink tmpXkmFile, leave it
++ for debugging */
++
++ result = False;
++ goto _ret;
+ }
+- if (buf != NULL)
+- xfree (buf);
+- return True;
++
++ result = True;
++ goto _ret;
+ }
+ else
+- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
++ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
+ #ifdef WIN32
+ /* remove the temporary file */
+ unlink(tmpname);
+@@ -289,9 +404,17 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
+ }
+ if (nameRtrn)
+ nameRtrn[0]= '\0';
++ result = False;
++
++_ret:
++ if (tmpXkmFile)
++ free(tmpXkmFile);
++ if (canonicalXkmFileName)
++ xfree(canonicalXkmFileName);
+ if (buf != NULL)
+ xfree (buf);
+- return False;
++
++ return result;
+ }
+
+ static FILE *
+@@ -375,7 +498,6 @@ unsigned missing;
+ DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
+ }
+ fclose(file);
+- (void) unlink (fileName);
+ return (need|want)&(~missing);
+ }
+
+--
+1.5.6.5
+
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
new file mode 100644
index 0000000..8b82de2
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
@@ -0,0 +1,20 @@
+diff --git a/configure.ac b/configure.ac
+index b3b752c..600500b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -523,13 +523,9 @@ dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
+ dnl otherwise uses standard subdirectories of FONTROOTDIR. When cross
+ dnl compiling, assume default font path uses standard FONTROOTDIR directories.
+ DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
+-if test "$cross_compiling" != yes; then
+- AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
+- [DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
+- [case $host_os in
++ case $host_os in
+ darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
+- esac])
+-fi
++ esac
+ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
+ [ FONTPATH="$withval" ],
+ [ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
new file mode 100644
index 0000000..092a712
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.6.0/hw/xfree86/common/Makefile.am
+===================================================================
+--- xorg-server-1.6.0.orig/hw/xfree86/common/Makefile.am 2010-02-01 14:04:53.247789918 +0000
++++ xorg-server-1.6.0/hw/xfree86/common/Makefile.am 2010-02-01 14:05:27.787817002 +0000
+@@ -46,7 +46,7 @@
+ sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
+ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \
+ xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \
+- $(XVSDKINCS) xorgVersion.h \
++ xorgVersion.h \
+ xf86sbusBus.h xf86xv.h xf86xvmc.h xf86xvpriv.h
+
+ DISTCLEANFILES = xf86Build.h
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
new file mode 100644
index 0000000..a62a767
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am
+===================================================================
+--- xorg-server-1.4.orig/hw/xfree86/os-support/linux/Makefile.am 2007-08-23 21:04:53.000000000 +0200
++++ xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am 2008-03-13 18:27:23.000000000 +0100
+@@ -41,7 +41,7 @@
+
+ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
+
+-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
++INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
+
+ # FIXME: These need to be added to the build
+ LNX_EXTRA_SRCS = \
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
new file mode 100644
index 0000000..eed491b
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch
@@ -0,0 +1,21 @@
+We need to insert the sysroot path into compiler commandlines for this
+kind of variable use, otherwise we're looking into /usr/include/.
+
+RP - 26/11/09
+
+Index: git/xorg-server.m4
+===================================================================
+--- git.orig/xorg-server.m4 2009-11-10 12:04:34.000000000 +0000
++++ git/xorg-server.m4 2009-11-27 00:05:02.000000000 +0000
+@@ -28,9 +28,10 @@
+ # Checks for the $1 define in xorg-server.h (from the sdk). If it
+ # is defined, then add $1 to $REQUIRED_MODULES.
+
++m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$])
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`pkg-config --variable=sdkdir xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
new file mode 100644
index 0000000..94852f0
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
@@ -0,0 +1,22 @@
+We need to insert the sysroot path into compiler commandlines for this
+kind of variable use, otherwise we're looking into /usr/include/.
+
+RP - 26/11/09
+
+Index: git/xorg-server.m4
+===================================================================
+--- git.orig/xorg-server.m4 2010-02-05 10:00:55.000000000 +0000
++++ git/xorg-server.m4 2010-02-05 10:02:12.000000000 +0000
+@@ -28,10 +28,11 @@
+ # Checks for the $1 define in xorg-server.h (from the sdk). If it
+ # is defined, then add $1 to $REQUIRED_MODULES.
+
++m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$])
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
new file mode 100644
index 0000000..565832e
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_open_max_preprocessor_error.patch
@@ -0,0 +1,13 @@
+Index: git/os/osdep.h
+===================================================================
+--- git.orig/os/osdep.h 2008-10-07 18:38:21.000000000 +0100
++++ git/os/osdep.h 2008-10-07 18:39:36.000000000 +0100
+@@ -92,7 +92,7 @@
+ * like sysconf(_SC_OPEN_MAX) is not supported.
+ */
+
+-#if OPEN_MAX <= 256
++#if 0
+ #define MAXSOCKS (OPEN_MAX - 1)
+ #else
+ #define MAXSOCKS 256
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
new file mode 100644
index 0000000..db29da9
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
@@ -0,0 +1,50 @@
+Index: xorg-server-1.5.0/hw/xfree86/dri/dri.c
+===================================================================
+--- xorg-server-1.5.0.orig/hw/xfree86/dri/dri.c 2008-09-24 17:43:04.000000000 +0100
++++ xorg-server-1.5.0/hw/xfree86/dri/dri.c 2008-09-24 17:46:38.000000000 +0100
+@@ -73,10 +73,6 @@
+
+ #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
+
+-#if !defined(PANORAMIX)
+-extern Bool noPanoramiXExtension;
+-#endif
+-
+ static int DRIEntPrivIndex = -1;
+ static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey;
+ static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey;
+@@ -307,7 +303,6 @@
+ drm_context_t * reserved;
+ int reserved_count;
+ int i;
+- Bool xineramaInCore = FALSE;
+ DRIEntPrivPtr pDRIEntPriv;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ DRIContextFlags flags = 0;
+@@ -320,20 +315,13 @@
+ return FALSE;
+ }
+
+- /*
+- * If Xinerama is on, don't allow DRI to initialise. It won't be usable
+- * anyway.
+- */
+- if (xf86LoaderCheckSymbol("noPanoramiXExtension"))
+- xineramaInCore = TRUE;
+-
+- if (xineramaInCore) {
+- if (!noPanoramiXExtension) {
+- DRIDrvMsg(pScreen->myNum, X_WARNING,
+- "Direct rendering is not supported when Xinerama is enabled\n");
+- return FALSE;
+- }
++#if defined(PANORAMIX)
++ if (!noPanoramiXExtension) {
++ DRIDrvMsg(pScreen->myNum, X_WARNING,
++ "Direct rendering is not supported when Xinerama is enabled\n");
++ return FALSE;
+ }
++#endif
+
+ if (!DRIOpenDRMMaster(pScrn, pDRIInfo->SAREASize,
+ pDRIInfo->busIdString,
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
new file mode 100644
index 0000000..cd408c7
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
@@ -0,0 +1,28 @@
+This is the revised version of files/macro_tweak.patch for
+xorg-server 1.8.99.904.
+
+the files/macro_tweak.patch can not removed now since it is used by
+xserver-kdrive-1.7.99.2 and xserver-xf86-lite_1.7.99.2. Once they
+are all upgraded to 1.8.99.904, the the files/macro_tweak.patch
+can be safely replace by this patch.
+
+Signed-off-by: Yu Ke <ke.yu@...>
+
+diff --git a/xorg-server.m4 b/xorg-server.m4
+index bdecf62..040fdb8 100644
+--- a/xorg-server.m4
++++ b/xorg-server.m4
+@@ -28,10 +28,12 @@ dnl
+ # Checks for the $1 define in xorg-server.h (from the sdk). If it
+ # is defined, then add $1 to $REQUIRED_MODULES.
+
++m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
++
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=sdkdir xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
new file mode 100644
index 0000000..6b34032
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/nodolt.patch
@@ -0,0 +1,12 @@
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2009-01-15 20:35:31.000000000 +0000
++++ git/configure.ac 2009-01-15 20:35:38.000000000 +0000
+@@ -62,7 +62,6 @@
+ AC_LIBTOOL_WIN32_DLL
+ AC_DISABLE_STATIC
+ AC_PROG_LIBTOOL
+-DOLT
+ AC_PROG_MAKE_SET
+ PKG_PROG_PKG_CONFIG
+ AC_PROG_LEX
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
new file mode 100755
index 0000000..3d2fa16
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
@@ -0,0 +1,12 @@
+diff -urN xorg-server-1.5.99.1/hw/xfree86/dri2/dri2.c xorg-server-1.5.99.1.new/hw/xfree86/dri2/dri2.c
+--- xorg-server-1.5.99.1/hw/xfree86/dri2/dri2.c 2008-09-01 03:26:37.000000000 +0800
++++ xorg-server-1.5.99.1.new/hw/xfree86/dri2/dri2.c 2008-09-18 00:28:16.000000000 +0800
+@@ -39,7 +39,7 @@
+ #include "scrnintstr.h"
+ #include "windowstr.h"
+ #include "dri2.h"
+-#include <GL/internal/dri_sarea.h>
++//#include <GL/internal/dri_sarea.h>
+
+ #include "xf86.h"
+
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
new file mode 100755
index 0000000..7ff3658
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
@@ -0,0 +1,23 @@
+commit 67b9b3a77a8b86eef03af36a0f4be3a07411efee
+Author: Eric Anholt <eric@...>
+Date: Thu Sep 11 16:18:17 2008 -0700
+
+ Enable DRI2 build.
+
+diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
+index eff2c31..98d7ec8 100644
+--- a/hw/xfree86/Makefile.am
++++ b/hw/xfree86/Makefile.am
+@@ -4,9 +4,9 @@ if DRI
+ DRI_SUBDIR = dri
+ endif
+
+-#if DRI2
+-#DRI2_SUBDIR = dri2
+-#endif
++if DRI2
++DRI2_SUBDIR = dri2
++endif
+
+ if XF86UTILS
+ XF86UTILS_SUBDIR = utils
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
new file mode 100644
index 0000000..ef53689
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
@@ -0,0 +1,156 @@
+From a3e15680da24cb8259f6a83dee0c930dab024290 Mon Sep 17 00:00:00 2001
+From: Kristian <krh@...>
+Date: Fri, 15 Aug 2008 15:15:14 +1000
+Subject: [PATCH] Add nr for background=none root
+
+---
+ dix/globals.c | 1 +
+ dix/window.c | 22 ++++++++++++----------
+ hw/xfree86/common/xf86Init.c | 11 +++++++++++
+ hw/xfree86/common/xf86str.h | 5 ++++-
+ include/opaque.h | 1 +
+ os/utils.c | 3 +++
+ 6 files changed, 32 insertions(+), 11 deletions(-)
+
+diff --git a/dix/globals.c b/dix/globals.c
+index 973dc43..dbd76bb 100644
+--- a/dix/globals.c
++++ b/dix/globals.c
+@@ -141,6 +141,7 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
+ CursorPtr rootCursor;
+ Bool party_like_its_1989 = FALSE;
+ Bool whiteRoot = FALSE;
++Bool bgNoneRoot = FALSE;
+
+ int cursorScreenDevPriv[MAXSCREENS];
+
+diff --git a/dix/window.c b/dix/window.c
+index c31fa87..8bb178d 100644
+--- a/dix/window.c
++++ b/dix/window.c
+@@ -482,23 +482,24 @@ InitRootWindow(WindowPtr pWin)
+ pWin->cursorIsNone = FALSE;
+ pWin->optional->cursor = rootCursor;
+ rootCursor->refcnt++;
+-
++ pWin->backingStore = defaultBackingStore;
++ pWin->forcedBS = (defaultBackingStore != NotUseful);
+
+ if (party_like_its_1989) {
+ MakeRootTile(pWin);
+ backFlag |= CWBackPixmap;
++ pScreen->ChangeWindowAttributes(pWin, backFlag);
++ } else if (bgNoneRoot) {
++ /* nothing, handled in xf86CreateRootWindow */
+ } else {
+ if (whiteRoot)
+ pWin->background.pixel = pScreen->whitePixel;
+ else
+ pWin->background.pixel = pScreen->blackPixel;
+ backFlag |= CWBackPixel;
+- }
+
+- pWin->backingStore = defaultBackingStore;
+- pWin->forcedBS = (defaultBackingStore != NotUseful);
+- /* We SHOULD check for an error value here XXX */
+- (*pScreen->ChangeWindowAttributes)(pWin, backFlag);
++ pScreen->ChangeWindowAttributes(pWin, backFlag);
++ }
+
+ MapWindow(pWin, serverClient);
+ }
+diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
+index 236c00b..083a6ac 100644
+--- a/hw/xfree86/common/xf86Init.c
++++ b/hw/xfree86/common/xf86Init.c
+@@ -79,6 +79,7 @@
+ #ifdef RENDER
+ #include "picturestr.h"
+ #endif
++#include "xace.h"
+
+ #include "globals.h"
+
+@@ -328,6 +329,7 @@ xf86CreateRootWindow(WindowPtr pWin)
+ int ret = TRUE;
+ int err = Success;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
++ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ RootWinPropPtr pProp;
+ CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
+ dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
+@@ -381,6 +383,15 @@ xf86CreateRootWindow(WindowPtr pWin)
+ }
+ }
+
++ if (bgNoneRoot && pScrn->canDoBGNoneRoot || 1) {
++ pWin->backgroundState = XaceBackgroundNoneState(pWin);
++ pWin->background.pixel = pScreen->whitePixel;
++ pScreen->ChangeWindowAttributes(pWin, CWBackPixmap | CWBorderPixel | CWCursor | CWBackingStore);
++ } else {
++ pWin->background.pixel = pScreen->blackPixel;
++ pScreen->ChangeWindowAttributes(pWin, CWBackPixel | CWBorderPixel | CWCursor | CWBackingStore);
++ }
++
+ #ifdef DEBUG
+ ErrorF("xf86CreateRootWindow() returns %d\n", ret);
+ #endif
+diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
+index 904c369..8c38f69 100644
+--- a/hw/xfree86/common/xf86str.h
++++ b/hw/xfree86/common/xf86str.h
+@@ -531,7 +531,7 @@ typedef struct _confdrirec {
+ } confDRIRec, *confDRIPtr;
+
+ /* These values should be adjusted when new fields are added to ScrnInfoRec */
+-#define NUM_RESERVED_INTS 16
++#define NUM_RESERVED_INTS 15
+ #define NUM_RESERVED_POINTERS 15
+ #define NUM_RESERVED_FUNCS 11
+
+@@ -959,6 +959,9 @@ typedef struct _ScrnInfoRec {
+ ClockRangesPtr clockRanges;
+ int adjustFlags;
+
++ /* -nr support */
++ int canDoBGNoneRoot;
++
+ /*
+ * These can be used when the minor ABI version is incremented.
+ * The NUM_* parameters must be reduced appropriately to keep the
+diff --git a/include/opaque.h b/include/opaque.h
+index 07a0715..be1577b 100644
+--- a/include/opaque.h
++++ b/include/opaque.h
+@@ -71,6 +71,7 @@ extern Bool defeatAccessControl;
+ extern long maxBigRequestSize;
+ extern Bool party_like_its_1989;
+ extern Bool whiteRoot;
++extern Bool bgNoneRoot;
+
+ extern Bool CoreDump;
+
+diff --git a/os/utils.c b/os/utils.c
+index b100949..c41b45b 100644
+--- a/os/utils.c
++++ b/os/utils.c
+@@ -515,6 +515,7 @@ void UseMsg(void)
+ #endif
+ ErrorF("-nolisten string don't listen on protocol\n");
+ ErrorF("-noreset don't reset after last client exists\n");
++ ErrorF("-nr create root window with no background\n");
+ ErrorF("-reset reset after last client exists\n");
+ ErrorF("-p # screen-saver pattern duration (minutes)\n");
+ ErrorF("-pn accept failure to listen on all ports\n");
+@@ -859,6 +860,8 @@ ProcessCommandLine(int argc, char *argv[])
+ defaultBackingStore = WhenMapped;
+ else if ( strcmp( argv[i], "-wr") == 0)
+ whiteRoot = TRUE;
++ else if ( strcmp( argv[i], "-nr") == 0)
++ bgNoneRoot = TRUE;
+ else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
+ if(++i < argc) {
+ long reqSizeArg = atol(argv[i]);
+--
+1.5.3.4
+
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
new file mode 100644
index 0000000..2754170
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
@@ -0,0 +1,179 @@
+diff --git a/glx/glxdri2.c b/glx/glxdri2.c
+index 146ea82..3b5338b 100644
+--- a/glx/glxdri2.c
++++ b/glx/glxdri2.c
+@@ -70,6 +70,7 @@ struct __GLXDRIscreen {
+
+ const __DRIcoreExtension *core;
+ const __DRIdri2Extension *dri2;
++ const __DRI2flushExtension *flush;
+ const __DRIcopySubBufferExtension *copySubBuffer;
+ const __DRIswapControlExtension *swapControl;
+ const __DRItexBufferExtension *texBuffer;
+@@ -135,10 +136,14 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *drawable,
+ static GLboolean
+ __glXDRIdrawableSwapBuffers(__GLXdrawable *drawable)
+ {
+- __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable;
++ __GLXDRIdrawable *priv = (__GLXDRIdrawable *) drawable;
++ __GLXDRIscreen *screen = priv->screen;
++
++ if (!DRI2SwapBuffers(drawable->pDraw))
++ return FALSE;
+
+- __glXDRIdrawableCopySubBuffer(drawable, 0, 0,
+- private->width, private->height);
++ if (screen->flush->flushInvalidate)
++ (*screen->flush->flushInvalidate)(priv->driDrawable);
+
+ return TRUE;
+ }
+diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
+index 580383d..23e6467 100644
+--- a/hw/xfree86/dri2/dri2.c
++++ b/hw/xfree86/dri2/dri2.c
+@@ -70,6 +70,7 @@ typedef struct _DRI2Screen {
+ DRI2CreateBufferProcPtr CreateBuffer;
+ DRI2DestroyBufferProcPtr DestroyBuffer;
+ DRI2CopyRegionProcPtr CopyRegion;
++ DRI2SwapBuffersProcPtr SwapBuffers;
+
+ HandleExposuresProcPtr HandleExposures;
+ } DRI2ScreenRec, *DRI2ScreenPtr;
+@@ -422,6 +423,49 @@ DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
+ return Success;
+ }
+
++Bool
++DRI2SwapBuffers(DrawablePtr pDraw)
++{
++ DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen);
++ DRI2DrawablePtr pPriv;
++ DRI2BufferPtr pDestBuffer, pSrcBuffer;
++ int i;
++
++ pPriv = DRI2GetDrawable(pDraw);
++ if (pPriv == NULL)
++ return FALSE;
++
++ pDestBuffer = NULL;
++ pSrcBuffer = NULL;
++ for (i = 0; i < pPriv->bufferCount; i++)
++ {
++ if (pPriv->buffers[i]->attachment == DRI2BufferFrontLeft)
++ pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i];
++ if (pPriv->buffers[i]->attachment == DRI2BufferBackLeft)
++ pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i];
++ }
++ if (pSrcBuffer == NULL || pDestBuffer == NULL)
++ return FALSE;
++
++ if (ds->SwapBuffers) {
++ if ((*ds->SwapBuffers)(pDraw, pDestBuffer, pSrcBuffer))
++ return TRUE;
++ }
++
++ BoxRec box;
++ RegionRec region;
++
++ box.x1 = 0;
++ box.y1 = 0;
++ box.x2 = pDraw->width;
++ box.y2 = pDraw->height;
++ REGION_INIT(drawable->pDraw->pScreen, &region, &box, 0);
++ if (DRI2CopyRegion(pDraw, &region, DRI2BufferFrontLeft, DRI2BufferBackLeft) != Success)
++ return FALSE;
++
++ return TRUE;
++}
++
+ void
+ DRI2DestroyDrawable(DrawablePtr pDraw)
+ {
+@@ -538,6 +582,9 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
+ }
+ ds->CopyRegion = info->CopyRegion;
+
++ if (info->version >= 3)
++ ds->SwapBuffers = info->SwapBuffers;
++
+ dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds);
+
+ xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n");
+diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
+index f369267..e2784dd 100644
+--- a/hw/xfree86/dri2/dri2.h
++++ b/hw/xfree86/dri2/dri2.h
+@@ -67,6 +67,10 @@ typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw,
+ DRI2BufferPtr pDestBuffer,
+ DRI2BufferPtr pSrcBuffer);
+
++typedef Bool (*DRI2SwapBuffersProcPtr)(DrawablePtr pDraw,
++ DRI2BufferPtr pFrontBuffer,
++ DRI2BufferPtr pBackBuffer);
++
+ typedef void (*DRI2WaitProcPtr)(WindowPtr pWin,
+ unsigned int sequence);
+
+@@ -90,6 +94,7 @@ typedef struct {
+ DRI2CreateBuffersProcPtr CreateBuffers;
+ DRI2DestroyBuffersProcPtr DestroyBuffers;
+ DRI2CopyRegionProcPtr CopyRegion;
++ DRI2SwapBuffersProcPtr SwapBuffers;
+ DRI2WaitProcPtr Wait;
+
+ /**
+@@ -153,4 +158,6 @@ extern _X_EXPORT DRI2Buffer2Ptr *DRI2GetBuffersWithFormat(DrawablePtr pDraw,
+ int *width, int *height, unsigned int *attachments, int count,
+ int *out_count);
+
++extern _X_EXPORT Bool DRI2SwapBuffers(DrawablePtr pDraw);
++
+ #endif
+diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
+index 3c06174..67b419b 100644
+--- a/hw/xfree86/dri2/dri2ext.c
++++ b/hw/xfree86/dri2/dri2ext.c
+@@ -81,7 +81,7 @@ ProcDRI2QueryVersion(ClientPtr client)
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.majorVersion = 1;
+- rep.minorVersion = 1;
++ rep.minorVersion = 2;
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+@@ -323,6 +323,24 @@ ProcDRI2CopyRegion(ClientPtr client)
+ }
+
+ static int
++ProcDRI2SwapBuffers(ClientPtr client)
++{
++ REQUEST(xDRI2SwapBuffersReq);
++ DrawablePtr pDrawable;
++ int status;
++
++ REQUEST_SIZE_MATCH(xDRI2SwapBuffersReq);
++
++ if (!validDrawable(client, stuff->drawable, &pDrawable, &status))
++ return status;
++
++ if (!DRI2SwapBuffers(pDrawable))
++ return BadAlloc;
++
++ return client->noClientException;
++}
++
++static int
+ ProcDRI2Dispatch (ClientPtr client)
+ {
+ REQUEST(xReq);
+@@ -350,6 +368,8 @@ ProcDRI2Dispatch (ClientPtr client)
+ return ProcDRI2CopyRegion(client);
+ case X_DRI2GetBuffersWithFormat:
+ return ProcDRI2GetBuffersWithFormat(client);
++ case X_DRI2SwapBuffers:
++ return ProcDRI2SwapBuffers(client);
+ default:
+ return BadRequest;
+ }
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
new file mode 100644
index 0000000..efc85a4
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
@@ -0,0 +1,38 @@
+diff --git a/os/log.c b/os/log.c
+index 0860847..2c46f1a 100644
+--- a/os/log.c
++++ b/os/log.c
+@@ -255,6 +255,33 @@ LogVWrite(int verb, const char *f, va_list args)
+ static char tmpBuffer[1024];
+ int len = 0;
+
++ struct timeval time;
++ time_t tv_sec;
++ suseconds_t tv_usec;
++ static Bool first = TRUE;
++ static time_t start_tv_sec;
++ static suseconds_t start_usec;
++ int diff_sec, diff_usec;
++
++ gettimeofday(&time, NULL);
++ tv_sec = time.tv_sec;
++ tv_usec = time.tv_usec;
++ if (first == TRUE) {
++ start_tv_sec = tv_sec;
++ start_usec = tv_usec;
++ first = FALSE;
++ }
++ diff_sec = (int)difftime(tv_sec, start_tv_sec);
++ diff_usec = (tv_usec - start_usec);
++ if (diff_usec < 0) {
++ diff_sec--;
++ diff_usec += 1000000;
++ }
++ sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
++ len = strlen(tmpBuffer);
++ if (logFile)
++ fwrite(tmpBuffer, len, 1, logFile);
++
+ /*
+ * Since a va_list can only be processed once, write the string to a
+ * buffer, and then write the buffer out to the appropriate output
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
new file mode 100644
index 0000000..afc94dc
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
@@ -0,0 +1,105 @@
+diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
+index 7f40857..cf58c01 100644
+--- a/hw/xfree86/os-support/linux/lnx_init.c
++++ b/hw/xfree86/os-support/linux/lnx_init.c
+@@ -49,6 +49,7 @@ static Bool KeepTty = FALSE;
+ static int VTnum = -1;
+ static Bool VTSwitch = TRUE;
+ static Bool ShareVTs = FALSE;
++Bool NoHwAccess = FALSE;
+ static int activeVT = -1;
+
+ static int vtPermSave[4];
+@@ -80,9 +81,11 @@ saveVtPerms(void)
+ static void
+ restoreVtPerms(void)
+ {
+- /* Set the terminal permissions back to before we started. */
+- chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
+- chown(vtname, vtPermSave[2], vtPermSave[3]);
++ if (geteuid() == 0) {
++ /* Set the terminal permissions back to before we started. */
++ (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
++ (void)chown(vtname, vtPermSave[2], vtPermSave[3]);
++ }
+ }
+
+ static void *console_handler;
+@@ -210,20 +213,22 @@ xf86OpenConsole(void)
+ xf86Msg(X_WARNING,
+ "xf86OpenConsole: Could not save ownership of VT\n");
+
+- /* change ownership of the vt */
+- if (chown(vtname, getuid(), getgid()) < 0)
+- xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
+- vtname, strerror(errno));
+-
+- /*
+- * the current VT device we're running on is not "console", we want
+- * to grab all consoles too
+- *
+- * Why is this needed??
+- */
+- if (chown("/dev/tty0", getuid(), getgid()) < 0)
+- xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
+- strerror(errno));
++ if (geteuid() == 0) {
++ /* change ownership of the vt */
++ if (chown(vtname, getuid(), getgid()) < 0)
++ xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
++ vtname, strerror(errno));
++
++ /*
++ * the current VT device we're running on is not
++ * "console", we want to grab all consoles too
++ *
++ * Why is this needed??
++ */
++ if (chown("/dev/tty0", getuid(), getgid()) < 0)
++ xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
++ strerror(errno));
++ }
+ }
+
+ /*
+@@ -433,6 +438,11 @@ xf86ProcessArgument(int argc, char *argv[], int i)
+ ShareVTs = TRUE;
+ return(1);
+ }
++ if (!strcmp(argv[i], "-nohwaccess"))
++ {
++ NoHwAccess = TRUE;
++ return(1);
++ }
+ if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
+ {
+ if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
+@@ -454,5 +464,6 @@ xf86UseMsg()
+ ErrorF("don't detach controlling tty (for debugging only)\n");
+ ErrorF("-novtswitch don't immediately switch to new VT\n");
+ ErrorF("-sharevts share VTs with another X server\n");
++ ErrorF("-nohwaccess don't access hardware ports directly\n");
+ return;
+ }
+diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
+index 688106a..34a845b 100644
+--- a/hw/xfree86/os-support/linux/lnx_video.c
++++ b/hw/xfree86/os-support/linux/lnx_video.c
+@@ -51,6 +51,7 @@
+ #define MAP_FAILED ((void *)-1)
+ #endif
+
++extern Bool NoHwAccess;
+ static Bool ExtendedEnabled = FALSE;
+
+ #ifdef __ia64__
+@@ -509,6 +510,9 @@ xf86EnableIO(void)
+ int fd;
+ unsigned int ioBase_phys;
+ #endif
++ /* Fake it... */
++ if (NoHwAccess)
++ return TRUE;
+
+ if (ExtendedEnabled)
+ return TRUE;
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb
new file mode 100644
index 0000000..81d70bc
--- /dev/null
+++ b/common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb
@@ -0,0 +1,19 @@
+require recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc
+
+PROTO_DEPS += "xf86driproto dri2proto"
+
+DEPENDS += "font-util"
+
+PE = "1"
+PR = "r0"
+
+SRC_URI += "file://nodolt.patch \
+ file://crosscompile.patch"
+
+# Misc build failure for master HEAD
+SRC_URI += "file://fix_open_max_preprocessor_error.patch"
+
+SRC_URI[md5sum] = "5bef6839a76d029204ab31aa2fcb5201"
+SRC_URI[sha256sum] = "864831f51e841ff37f2445d1c85b86b559c8860a435fb496aead4f256a2b141d"
+
+EXTRA_OECONF += "--enable-dri --enable-dri2 --enable-dga"
--
1.7.0.4


[PATCH 1/6] meta-crownbay: new recipe for emgd 1.6 driver binaries

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

This adds a new recipe for the emgd 1.6 driver binaries. For emgd
1.6, the layout of the binaries has changed, making them easier to
install, and we also take the opportunity to sanitize the naming and
make it more apparent that these are the emgd driver bits
corresponding to a particular emgd release, 1.6 in this case.

Signed-off-by: Tom Zanussi <tom.zanussi@...>
---
.../xorg-xserver/emgd-driver-bin_1.6.bb | 25 ++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
create mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/.gitignore
create mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb

diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/.gitignore b/meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb b/meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb
new file mode 100644
index 0000000..4d5d1e2
--- /dev/null
+++ b/meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb
@@ -0,0 +1,25 @@
+SUMMARY = "EMGD 1.6 xserver binaries"
+DESCRIPTION = "EMGD 1.6 includes some userspace binaries that use non-free licensing. Intel Open Source Technology Center unfortunately has no power to change that, but tries to make their use as painless as possible. Please see the README in meta-crownbay/ for instructions on the (simple) manual steps necessary to make the necessary binaries available to this recipe. Please do that before building an image."
+
+LICENSE = "Intel-binary-only"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/License.txt;md5=b54f01caaf8483b3cb60c0c40f2bf22d"
+PR = "r0"
+
+FILESPATH = "${FILE_DIRNAME}/emgd-driver-bin-1.6"
+
+FILES_${PN} = "${libdir}/*.so.* ${libdir}/dri ${libdir}/xorg/modules/drivers"
+
+SRC_URI = "file://lib \
+ file://License.txt"
+
+S = "${WORKDIR}"
+
+do_install () {
+ install -d -m 0755 ${D}/${libdir}/dri ${D}/${libdir}/xorg/modules/drivers
+
+ cp -PR ${S}/lib/lib* ${D}${libdir}
+ install -m 0755 ${S}/lib/xorg/modules/drivers/* ${D}${libdir}/xorg/modules/drivers/
+ install -m 0755 ${S}/lib/dri/* ${D}${libdir}/dri/
+}
+
+LEAD_SONAME = "libEGL.so"
--
1.7.0.4


[PATCH 0/6] meta-intel: emgd updrade

tom.zanussi@...
 

From: Tom Zanussi <tom.zanussi@...>

This patchset upgrades emgd to 1.6 Gold.

The following changes since commit e94dba8309874a82a570db60223d18b2c723c3a5:
Darren Hart (1):
linux-yocto*: correct FILESEXTRAPATHS assignment in all layers

are available in the git repository at:

git://git.yoctoproject.org/meta-intel.git tzanussi/emgd-1.6-upgrade
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/emgd-1.6-upgrade

Tom Zanussi (6):
meta-crownbay: new recipe for emgd 1.6 driver binaries
meta-intel: add xserver-xf86-dri-lite_1.9.3 to common
meta-crownbay: add common to BBFILES
meta-crownbay: update crownbay.conf
meta-crownbay: remove obsolete graphics recipes
meta-crownbay: update README with new build instructions.

.../cache-xkbcomp-output-for-fast-start-up.patch | 358 ++++++++++++++++++++
.../xserver-xf86-dri-lite/crosscompile.patch | 20 ++
.../xserver-xf86-dri-lite/doublefix.patch | 13 +
.../xserver-xf86-dri-lite/drmfix.patch | 13 +
.../xserver-xf86-dri-lite/fix_macros.patch | 17 +-
.../xserver-xf86-dri-lite/fix_macros1.patch | 22 ++
.../fix_open_max_preprocessor_error.patch | 0
.../libdri-xinerama-symbol.patch | 50 +++
.../xserver-xf86-dri-lite/macro_tweak.patch | 28 ++
.../xserver-xf86-dri-lite}/nodolt.patch | 0
.../xorg-server-disable-dri_sarea.patch | 12 +
.../xorg-server-enable-dri2.patch | 23 ++
.../xserver-1.5.0-bg-none-root.patch | 156 +++++++++
.../xserver-DRI2Swapbuffer.patch | 179 ++++++++++
.../xserver-xf86-dri-lite/xserver-boottime.patch | 38 ++
.../xserver-xf86-dri-lite/xserver-no-root-2.patch | 105 ++++++
.../xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb | 19 +
meta-crownbay/README | 95 +++++-
meta-crownbay/conf/layer.conf | 4 +-
meta-crownbay/conf/machine/crownbay.conf | 12 +-
.../xorg-xserver/emgd-driver-bin_1.6.bb | 25 ++
.../xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb | 90 -----
.../xserver-xf86-emgd/crosscompile.patch | 19 -
.../xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb | 25 --
24 files changed, 1157 insertions(+), 166 deletions(-)
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/cache-xkbcomp-output-for-fast-start-up.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/crosscompile.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/doublefix.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/drmfix.patch
rename meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/macro_tweak.patch => common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros.patch (56%)
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/fix_macros1.patch
rename {meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd => common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite}/fix_open_max_preprocessor_error.patch (100%)
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/libdri-xinerama-symbol.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/macro_tweak.patch
rename {meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd => common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite}/nodolt.patch (100%)
create mode 100755 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-disable-dri_sarea.patch
create mode 100755 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xorg-server-enable-dri2.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-1.5.0-bg-none-root.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-DRI2Swapbuffer.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite/xserver-no-root-2.patch
create mode 100644 common/recipes-graphics/xorg-xserver/xserver-xf86-dri-lite_1.9.3.bb
create mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin-1.6/.gitignore
create mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/emgd-driver-bin_1.6.bb
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd-bin_1.7.99.2.bb
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd/crosscompile.patch
delete mode 100644 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-emgd_1.7.99.2.bb