summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dietze <di@fh-wedel.de>2006-11-02 13:50:10 +0000
committerMartin Dietze <di@fh-wedel.de>2006-11-02 13:50:10 +0000
commit9349f11f6676d641d6d7f52a5bdfcab23afb928b (patch)
tree83d0a090abe267eb3ecbff7a46b7a39c2b76e07c
parent4692aa9f440b992fee19fd7aa35fc0a3e7284e46 (diff)
nylon update:
- formally added mtx-3 architecture - pptp support in the linux kernel
-rw-r--r--classes/nylon-image.bbclass11
-rw-r--r--conf/distro/nylon.conf32
-rw-r--r--conf/machine/mtx-3.conf36
-rw-r--r--packages/images/nylon-image-base.bb17
-rw-r--r--packages/linux/linux-mtx-1-2.4.27/42-usb-ohci-fixes.patch9
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff324
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/42-usb-ohci-fixes.patch9
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/46-otg.patch56853
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/47-au1000_eth.patch163
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/48-pptp.patch5092
-rw-r--r--packages/linux/linux-mtx-2-2.4.27/defconfig-mtx-2207
-rw-r--r--packages/linux/linux-mtx-2_2.4.27.bb3
-rw-r--r--packages/linux/linux-mtx-3-2.6.15.4/.mtn2git_empty0
-rw-r--r--packages/linux/linux-mtx-3-2.6.15.4/00-mtx-3.diff27080
-rw-r--r--packages/linux/linux-mtx-3-2.6.15.4/01-verbose-and-fatal-mkuboot.diff16
-rw-r--r--packages/linux/linux-mtx-3-2.6.15.4/defconfig-mtx-3960
-rw-r--r--packages/linux/linux-mtx-3-2.6.15/.mtn2git_empty0
-rw-r--r--packages/linux/linux-mtx-3-2.6.15/00-mtx-3.diff27080
-rw-r--r--packages/linux/linux-mtx-3-2.6.15/01-verbose-and-fatal-mkuboot.diff16
-rw-r--r--packages/linux/linux-mtx-3-2.6.15/defconfig-mtx-3960
-rw-r--r--packages/linux/linux-mtx-3_2.6.15.4.bb96
-rw-r--r--packages/linux/linux-mtx-3_2.6.15.bb63
22 files changed, 118620 insertions, 407 deletions
diff --git a/classes/nylon-image.bbclass b/classes/nylon-image.bbclass
index 8517c033e9..e24aa33cf4 100644
--- a/classes/nylon-image.bbclass
+++ b/classes/nylon-image.bbclass
@@ -1,5 +1,5 @@
# we dont need the kernel in the image
-ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/zImage*"
+ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/*Image*"
# create a tar.gz (.imgz) file containing the filesystem and the kernel
nylon_create_imgz() {
@@ -7,8 +7,15 @@ nylon_create_imgz() {
rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz
install -d ${DEPLOY_DIR_IMAGE}/tmp
- cp ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin ${DEPLOY_DIR_IMAGE}/tmp/zImage.flash
+ # copy the kernel (for mips on flash) into tmp
+ FLASH_BIN=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.bin
+ test -f ${FLASH_BIN} && \
+ cp ${FLASH_BIN} ${DEPLOY_DIR_IMAGE}/tmp/zImage.flash
+
+ # copy rootfs.jffs (or so) into tmp
cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/tmp/rootfs.${type}
+
+ # make an imgz out of tmp
( cd ${DEPLOY_DIR_IMAGE}/tmp; tar cvzf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.imgz * )
rm -r ${DEPLOY_DIR_IMAGE}/tmp
}
diff --git a/conf/distro/nylon.conf b/conf/distro/nylon.conf
index 1c76ef870b..0d21488bb0 100644
--- a/conf/distro/nylon.conf
+++ b/conf/distro/nylon.conf
@@ -20,12 +20,18 @@ PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}libc-for-gcc:glibc"
PREFERRED_PROVIDERS += " virtual/libx11:diet-x11"
PREFERRED_PROVIDERS += " python:python-curses"
+PREFERRED_PROVIDER_classpath = "classpath-minimal"
TARGET_FPU = "soft"
SRCDATE := "20050527"
PREFERRED_VERSION_glibc = "2.3.3"
+PREFERRED_VERSION_shorewall = "2.0.9-monolithic"
+PREFERRED_VERSION_ppp-dsl = "0.1-monolithic"
+PREFERRED_VERSION_mtd-utils = "0.0.0+cvs20041113"
+PREFERRED_VERSION_kismet = "2005-01-R1"
+
PREFERRED_VERSION_gcc-cross-initial = "3.3.4"
PREFERRED_VERSION_gcc-cross = "3.3.4"
PREFERRED_VERSION_gcc-cross-sdk = "3.3.4"
@@ -33,13 +39,30 @@ PREFERRED_VERSION_gcc = "3.3.4"
PREFERRED_VERSION_binutils-cross = "2.14.90.0.7"
PREFERRED_VERSION_binutils-cross-sdk = "2.14.90.0.7"
PREFERRED_VERSION_binutils = "2.16"
-PREFERRED_VERSION_shorewall = "2.0.9-monolithic"
-PREFERRED_VERSION_ppp-dsl = "0.1-monolithic"
-PREFERRED_VERSION_mtd-utils = "0.0.0+cvs20041113"
-PREFERRED_VERSION_kismet = "2005-01-R1"
PREFERRED_VERSION_prism54-firmware = "1.0.3.0"
+KERNEL_VERSION_mtx-1 = "2.4.27"
+KERNEL_VERSION_mtx-2 = "2.4.27"
+
+PREFERRED_VERSION_glibc_mtx-3 = "2.3.5+cvs20050627"
+PREFERRED_VERSION_gcc-cross-initial_mtx-3 = "3.4.4"
+PREFERRED_VERSION_gcc-cross_mtx-3 = "3.4.4"
+PREFERRED_VERSION_gcc-cross-sdk_mtx-3 = "3.4.4"
+PREFERRED_VERSION_gcc_mtx-3 = "3.4.4"
+### did not compile with:
+#PREFERRED_VERSION_binutils-cross_mtx-3 = "2.16.91.0.7"
+#PREFERRED_VERSION_binutils-cross-sdk_mtx-3 = "2.16.91.0.7"
+### falling back to:
+PREFERRED_VERSION_binutils-cross_mtx-3 = "2.15.94.0.1"
+PREFERRED_VERSION_binutils-cross-sdk_mtx-3 = "2.15.94.0.1"
+PREFERRED_VERSION_binutils_mtx-3 = "2.16"
+
+PREFERRED_VERSION_udev = "089"
+
+KERNEL_VERSION_mtx-3 = "2.6.15.4"
+
+
# usually overrrided from local.conf
NYLON_RELEASE = "unstable"
@@ -53,7 +76,6 @@ export FEED_URIS = " \
# image names
DISTRO_VERSION = "${NYLON_VERSION}"
BUILDNAME := "${NYLON_VERSION}"
-KERNEL_VERSION = "2.4.27"
#this does not work: ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-abiversion')}
IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}_${BUILDNAME}"
KERNEL_IMAGE_NAME = "kernel-${KERNEL_VERSION}-${MACHINE}_${BUILDNAME}"
diff --git a/conf/machine/mtx-3.conf b/conf/machine/mtx-3.conf
new file mode 100644
index 0000000000..bdd39ab57f
--- /dev/null
+++ b/conf/machine/mtx-3.conf
@@ -0,0 +1,36 @@
+#@TYPE: Machine
+#@NAME: 4G Systems mtx-3
+#@DESCRIPTION: Machine configuration for the mtx-3 (aka SurfBox 3rd generation)
+
+# hint: the mtx-3 architecture is still in experimental state, no hardware
+# is yet available for it
+
+# TARGET_ARCH should be set here in the machine configuration.
+# For compiling the kernel, ARCH will be derived form it by kernel-arch.bbclass
+TARGET_ARCH = "arm"
+
+IPKG_ARCHS = "all arm ${MACHINE}"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-mtx-3"
+
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n"
+
+TARGET_CC_ARCH = "-march=armv5te"
+#-mtune=arm926ejs"
+
+USE_DEVFS = "1"
+USE_VT = "0"
+SERIAL_CONSOLE = "115200 ttyS0 vt100"
+
+BOOTSTRAP_EXTRA_RDEPENDS += ""
+
+#PREFERRED_VERSION_yamon = "2.24"
+
+
+# FIXME: old srec files as mtx-2 used to do it ... this may need to get adapted sometime!
+
+# create srec files
+#IMAGE_POSTPROCESS_COMMAND += "\
+# ${TARGET_PREFIX}objcopy -O srec -I binary --adjust-vma 0xbe000000 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${type} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.srec; \
+# grep -v S7 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.srec > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.srec; \
+# grep -v S0 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_NAME}.flash.srec >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.srec; "
diff --git a/packages/images/nylon-image-base.bb b/packages/images/nylon-image-base.bb
index bcbcc67c05..4034590822 100644
--- a/packages/images/nylon-image-base.bb
+++ b/packages/images/nylon-image-base.bb
@@ -1,24 +1,31 @@
-inherit image_ipk nylon-image
+inherit image_ipk
+inherit nylon_image
LICENSE = MIT
export IMAGE_BASENAME = "nylon-base"
NYLON_BASE = "base-files base-passwd bash busybox \
ipkg initscripts less \
- modutils modutils-initscripts mtd-utils \
+ mtd-utils \
nano ncurses netbase \
openssh sysvinit \
timezones tinylogin"
DEPENDS += "virtual/kernel less nano"
-RDEPENDS = "kernel modutils-depmod modutils-modinfo less nano elvis-tiny \
+RDEPENDS = "kernel less nano elvis-tiny \
${NYLON_BASE} ${BOOTSTRAP_EXTRA_RDEPENDS}"
+## kernel 2.4 ##
+RDEPENDS_append_mtx-1 = " modutils modutils-initscripts modutils-depmod modutils-modinfo"
+RDEPENDS_append_mtx-2 = " modutils modutils-initscripts modutils-depmod modutils-modinfo"
+## kernel 2.6 ##
+RDEPENDS_append_mtx-3 = " module-init-tools udev"
+
export IPKG_INSTALL = "${RDEPENDS}"
IMAGE_LINGUAS = ""
# we dont need the kernel in the image
-ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/zImage*"
+ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/*Image*"
+# needed?? the above line is the same as in classes/nylon-image.bbclass
-inherit image_ipk nylon-image
diff --git a/packages/linux/linux-mtx-1-2.4.27/42-usb-ohci-fixes.patch b/packages/linux/linux-mtx-1-2.4.27/42-usb-ohci-fixes.patch
index 4c3058ce00..aa5a0d45f7 100644
--- a/packages/linux/linux-mtx-1-2.4.27/42-usb-ohci-fixes.patch
+++ b/packages/linux/linux-mtx-1-2.4.27/42-usb-ohci-fixes.patch
@@ -11,6 +11,15 @@
/*-------------------------------------------------------------------------*/
/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
+@@ -147,7 +151,7 @@
+ ohci->complete_head = urb;
+ ohci->complete_tail = urb;
+ } else {
+- ohci->complete_head->hcpriv = urb;
++ ohci->complete_tail->hcpriv = urb;
+ ohci->complete_tail = urb;
+ }
+ }
@@ -2587,12 +2591,12 @@
hc_release_ohci (ohci);
return -ENODEV;
diff --git a/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff b/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
index 589446c2e9..6d1ca1c75e 100644
--- a/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
+++ b/packages/linux/linux-mtx-2-2.4.27/00-mtx-2.diff
@@ -2500,8 +2500,8 @@ diff -Nur linux-old/Documentation/Configure.help linux/Documentation/Configure.h
+#
+CONFIG_USBD_AU1X00_BUS=m
+CONFIG_USBD_AU1X00_SCLOCK=400
-+CONFIG_AU1000_USB_DEVICE=y
-+CONFIG_AU1X00_USB_DEVICE=y
++# CONFIG_AU1000_USB_DEVICE is not set
++# CONFIG_AU1X00_USB_DEVICE is not set
+# CONFIG_USBD_BI_REGISTER_TRACE is not set
+
+#
@@ -2605,326 +2605,6 @@ diff -Nur linux-old/Documentation/Configure.help linux/Documentation/Configure.h
MODULE_AUTHOR("Dan Malek, Embedded Edge, LLC.");
MODULE_DESCRIPTION("SMBus adapter Alchemy pb1550");
---- linux/drivers/net/au1000_eth.c~00-mtx-2.diff 2006-06-10 14:01:44.602796000 +0200
-+++ linux/drivers/net/au1000_eth.c 2006-06-10 13:56:07.353719250 +0200
-@@ -6,7 +6,9 @@
- * Copyright 2002 TimeSys Corp.
- * Author: MontaVista Software, Inc.
- * ppopov@mvista.com or source@mvista.com
-- *
-+ * Bjoern Riemer 2004
-+ * riemer@fokus.fraunhofer.de or riemer@riemer-nt.de
-+ * // fixed the link beat detection with ioctls (SIOCGMIIPHY)
- * ########################################################################
- *
- * This program is free software; you can distribute it and/or modify it
-@@ -83,7 +85,7 @@
- static int au1000_set_config(struct net_device *dev, struct ifmap *map);
- static void set_rx_mode(struct net_device *);
- static struct net_device_stats *au1000_get_stats(struct net_device *);
--static inline void update_tx_stats(struct net_device *, u32, u32);
-+static inline void update_tx_stats(struct net_device *, u32);
- static inline void update_rx_stats(struct net_device *, u32);
- static void au1000_timer(unsigned long);
- static int au1000_ioctl(struct net_device *, struct ifreq *, int);
-@@ -656,6 +658,7 @@
- ks8995m_status,
- };
-
-+
- #ifdef CONFIG_MIPS_BOSPORUS
- struct phy_ops stub_ops = {
- stub_init,
-@@ -674,6 +677,7 @@
- {"Broadcom BCM5201 10/100 BaseT PHY",0x0040,0x6212, &bcm_5201_ops,0},
- {"Broadcom BCM5221 10/100 BaseT PHY",0x0040,0x61e4, &bcm_5201_ops,0},
- {"Broadcom BCM5222 10/100 BaseT PHY",0x0040,0x6322, &bcm_5201_ops,1},
-+ {"Broadcom BCM5241 10/100 BaseT PHY",0x0143,0xBC31, &bcm_5201_ops,1},
- {"AMD 79C901 HomePNA PHY",0x0000,0x35c8, &am79c901_ops,0},
- {"AMD 79C874 10/100 BaseT PHY",0x0022,0x561b, &am79c874_ops,0},
- {"LSI 80227 10/100 BaseT PHY",0x0016,0xf840, &lsi_80227_ops,0},
-@@ -810,28 +814,39 @@
- int phy_found=0;
- #endif
-
-+#if 0
-+ if (aup && aup->mii)
-+ aup->mii->chip_info = NULL;
-+#endif
-+
-+
- /* search for total of 32 possible mii phy addresses */
- for (phy_addr = 0; phy_addr < 32; phy_addr++) {
- u16 mii_status;
- u16 phy_id0, phy_id1;
- int i;
-
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- /* Mask the already found phy, try next one */
- if (au_macs[0]->mii && au_macs[0]->mii->mii_control_reg) {
- if (au_macs[0]->phy_addr == phy_addr)
- continue;
- }
-- #endif
-+#endif
-
- mii_status = mdio_read(dev, phy_addr, MII_STATUS);
- if (mii_status == 0xffff || mii_status == 0x0000)
- /* the mii is not accessable, try next one */
- continue;
-
-+
- phy_id0 = mdio_read(dev, phy_addr, MII_PHY_ID0);
- phy_id1 = mdio_read(dev, phy_addr, MII_PHY_ID1);
-
-+ /*printk ("mii_probe: found PHY at address 0x%X : %04X/%04X\n", phy_addr,
-+ phy_id0, phy_id1
-+ ); */
-+
- /* search our mii table for the current mii */
- for (i = 0; mii_chip_table[i].phy_id1; i++) {
- if (phy_id0 == mii_chip_table[i].phy_id0 &&
-@@ -853,7 +868,7 @@
- // values and set indicators. We need to do
- // this now since mdio_{read,write} need the
- // control and data register addresses.
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- if ( mii_chip_table[i].dual_phy) {
-
- /* assume both phys are controlled
-@@ -867,11 +882,13 @@
- aup->mii->mii_data_reg = (u32 *)
- &au_macs[0]->mac->mii_data;
- }
-- #endif
-+#endif
- goto found;
- }
- }
- }
-+ return -1;
-+
- found:
-
- #ifdef CONFIG_MIPS_BOSPORUS
-@@ -1027,24 +1044,26 @@
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
-
- if (au1000_debug > 4)
-- printk(KERN_INFO "%s: reset mac, aup %x\n",
-- dev->name, (unsigned)aup);
-+ printk(KERN_INFO "%s: reset mac, aup %x, macid %d\n",
-+ dev->name, (unsigned)aup, aup->mac_id);
-+
-+ return;
-
- spin_lock_irqsave(&aup->lock, flags);
- del_timer(&aup->timer);
- hard_stop(dev);
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- if (aup->mac_id != 0) {
-- #endif
-+#endif
- /* If BCM5222, we can't leave MAC0 in reset because then
- * we can't access the dual phy for ETH1 */
- *aup->enable = MAC_EN_CLOCK_ENABLE;
- au_sync_delay(2);
- *aup->enable = 0;
- au_sync_delay(2);
-- #ifdef CONFIG_BCM5222_DUAL_PHY
-+#ifdef CONFIG_BCM5222_DUAL_PHY
- }
-- #endif
-+#endif
- aup->tx_full = 0;
- for (i = 0; i < NUM_RX_DMA; i++) {
- /* reset control bits */
-@@ -1140,17 +1159,39 @@
- iflist[1].macen_addr = AU1550_MAC1_ENABLE;
- iflist[0].irq = AU1550_MAC0_DMA_INT;
- iflist[1].irq = AU1550_MAC1_DMA_INT;
-+ /*printk ("***** Au1550 Ethernet *****\n");*/
- break;
- #endif
- default:
- num_ifs = 0;
- }
-+
-+ {
-+ unsigned long pf = au_readl(SYS_PINFUNC);
-+ pf &= ~1;
-+
-+ au_writel (pf, SYS_PINFUNC);
-+ au_writel (0x10000, SYS_OUTPUTSET);
-+
-+ }
-+
-+
-+
- for(i = 0; i < num_ifs; i++) {
-+ /*printk ("*** calling au1000_probe(0x%08lX, %d, %d)\n", iflist[i].base_addr, iflist[i].irq, i);*/
- dev = au1000_probe(iflist[i].base_addr, iflist[i].irq, i);
-+ /*printk ("*** left au1000_probe\n");*/
-+
- iflist[i].dev = dev;
-+
-+ /*printk ("*** 1\n");*/
-+
- if (dev)
- found_one++;
- }
-+
-+ printk("Au1x Ethernet found %d ethernet devices\n", found_one);
-+
- if (!found_one)
- return -ENODEV;
- return 0;
-@@ -1194,6 +1235,7 @@
- /* Allocate the data buffers */
- aup->vaddr = (u32)dma_alloc(MAX_BUF_SIZE *
- (NUM_TX_BUFFS+NUM_RX_BUFFS), &aup->dma_addr);
-+
- if (!aup->vaddr) {
- kfree(dev);
- release_region(ioaddr, MAC_IOSIZE);
-@@ -1227,6 +1269,7 @@
- setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR);
- aup->mac_id = 0;
- au_macs[0] = aup;
-+
- }
- else
- if (ioaddr == iflist[1].base_addr)
-@@ -1257,6 +1300,8 @@
- printk(KERN_ERR "%s: out of memory\n", dev->name);
- goto err_out;
- }
-+
-+ aup->mii->chip_info = NULL;
- aup->mii->mii_control_reg = 0;
- aup->mii->mii_data_reg = 0;
-
-@@ -1284,6 +1329,7 @@
- aup->rx_dma_ring[i]->buff_stat = (unsigned)pDB->dma_addr;
- aup->rx_db_inuse[i] = pDB;
- }
-+
- for (i = 0; i < NUM_TX_DMA; i++) {
- pDB = GetFreeDB(aup);
- if (!pDB) {
-@@ -1383,12 +1429,17 @@
- aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed);
- control = MAC_DISABLE_RX_OWN | MAC_RX_ENABLE | MAC_TX_ENABLE;
- #ifndef CONFIG_CPU_LITTLE_ENDIAN
-+ /*riemer: fix for startup without cable */
-+ if (!link)
-+ dev->flags &= ~IFF_RUNNING;
-+
- control |= MAC_BIG_ENDIAN;
- #endif
- if (link && (dev->if_port == IF_PORT_100BASEFX)) {
- control |= MAC_FULL_DUPLEX;
- }
- aup->mac->control = control;
-+ aup->mac->vlan1_tag = 0x8100; /* activate vlan support */
- au_sync();
-
- spin_unlock_irqrestore(&aup->lock, flags);
-@@ -1541,14 +1592,11 @@
-
-
- static inline void
--update_tx_stats(struct net_device *dev, u32 status, u32 pkt_len)
-+update_tx_stats(struct net_device *dev, u32 status)
- {
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
- struct net_device_stats *ps = &aup->stats;
-
-- ps->tx_packets++;
-- ps->tx_bytes += pkt_len;
--
- if (status & TX_FRAME_ABORTED) {
- if (dev->if_port == IF_PORT_100BASEFX) {
- if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
-@@ -1581,7 +1629,7 @@
- ptxd = aup->tx_dma_ring[aup->tx_tail];
-
- while (ptxd->buff_stat & TX_T_DONE) {
-- update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff);
-+ update_tx_stats(dev, ptxd->status);
- ptxd->buff_stat &= ~TX_T_DONE;
- ptxd->len = 0;
- au_sync();
-@@ -1603,6 +1651,7 @@
- static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
- {
- struct au1000_private *aup = (struct au1000_private *) dev->priv;
-+ struct net_device_stats *ps = &aup->stats;
- volatile tx_dma_t *ptxd;
- u32 buff_stat;
- db_dest_t *pDB;
-@@ -1622,7 +1671,7 @@
- return 1;
- }
- else if (buff_stat & TX_T_DONE) {
-- update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff);
-+ update_tx_stats(dev, ptxd->status);
- ptxd->len = 0;
- }
-
-@@ -1642,6 +1691,9 @@
- else
- ptxd->len = skb->len;
-
-+ ps->tx_packets++;
-+ ps->tx_bytes += ptxd->len;
-+
- ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE;
- au_sync();
- dev_kfree_skb(skb);
-@@ -1840,17 +1892,35 @@
-
- static int au1000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
- {
-- //u16 *data = (u16 *)&rq->ifr_data;
-+/*
-+// This structure is used in all SIOCxMIIxxx ioctl calls
-+struct mii_ioctl_data {
-+ 0 u16 phy_id;
-+ 1 u16 reg_num;
-+ 2 u16 val_in;
-+ 3 u16 val_out;
-+};*/
-+ u16 *data = (u16 *)&rq->ifr_data;
-+ struct au1000_private *aup = (struct au1000_private *) dev->priv;
-+ //struct mii_ioctl_data *data = (struct mii_ioctl_data *) & rq->ifr_data;
-
- /* fixme */
- switch(cmd) {
- case SIOCDEVPRIVATE: /* Get the address of the PHY in use. */
-- //data[0] = PHY_ADDRESS;
-+ case SIOCGMIIPHY:
-+ if (!netif_running(dev))
-+ return -EINVAL;
-+ data[0] = aup->phy_addr;
- case SIOCDEVPRIVATE+1: /* Read the specified MII register. */
-- //data[3] = mdio_read(ioaddr, data[0], data[1]);
-+ case SIOCGMIIREG:
-+ data[3] = mdio_read(dev, data[0], data[1]);
-+ //data->val_out = mdio_read(dev,data->phy_id,data->reg_num);
- return 0;
- case SIOCDEVPRIVATE+2: /* Write the specified MII register */
-- //mdio_write(ioaddr, data[0], data[1], data[2]);
-+ case SIOCSMIIREG:
-+ if (!capable(CAP_NET_ADMIN))
-+ return -EPERM;
-+ mdio_write(dev, data[0], data[1],data[2]);
- return 0;
- default:
- return -EOPNOTSUPP;
--- linux-old/drivers/sound/au1550_psc.c 2004-09-19 00:07:37.000000000 +0200
+++ linux/drivers/sound/au1550_psc.c 2006-04-30 20:35:58.000000000 +0200
@@ -55,14 +55,15 @@
diff --git a/packages/linux/linux-mtx-2-2.4.27/42-usb-ohci-fixes.patch b/packages/linux/linux-mtx-2-2.4.27/42-usb-ohci-fixes.patch
index 4c3058ce00..aa5a0d45f7 100644
--- a/packages/linux/linux-mtx-2-2.4.27/42-usb-ohci-fixes.patch
+++ b/packages/linux/linux-mtx-2-2.4.27/42-usb-ohci-fixes.patch
@@ -11,6 +11,15 @@
/*-------------------------------------------------------------------------*/
/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
+@@ -147,7 +151,7 @@
+ ohci->complete_head = urb;
+ ohci->complete_tail = urb;
+ } else {
+- ohci->complete_head->hcpriv = urb;
++ ohci->complete_tail->hcpriv = urb;
+ ohci->complete_tail = urb;
+ }
+ }
@@ -2587,12 +2591,12 @@
hc_release_ohci (ohci);
return -ENODEV;
diff --git a/packages/linux/linux-mtx-2-2.4.27/46-otg.patch b/packages/linux/linux-mtx-2-2.4.27/46-otg.patch
new file mode 100644
index 0000000000..2004894b3e
--- /dev/null
+++ b/packages/linux/linux-mtx-2-2.4.27/46-otg.patch
@@ -0,0 +1,56853 @@
+--- linux/Makefile-otgorig 2006-09-20 16:02:57.347146612 +0200
++++ linux/Makefile 2006-09-20 16:03:35.280797278 +0200
+@@ -181,6 +181,7 @@
+ DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
+ DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
+ DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
++DRIVERS-$(CONFIG_OTG) += drivers/otg/otg_drv.o
+ DRIVERS-$(CONFIG_USB_GADGET) += drivers/usb/gadget/built-in.o
+ DRIVERS-y +=drivers/media/media.o
+ DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
+--- linux/arch/mips/config-shared.in-otgorig 2006-09-20 16:09:20.671834564 +0200
++++ linux/arch/mips/config-shared.in 2006-09-20 16:09:28.068156725 +0200
+@@ -1009,6 +1009,7 @@
+ endmenu
+
+ source drivers/usb/Config.in
++source drivers/otg/Config.in
+
+ source net/bluetooth/Config.in
+
+--- linux/drivers/Makefile-otgorig 2006-09-20 16:09:47.100985766 +0200
++++ linux/drivers/Makefile 2006-09-20 16:10:25.730668535 +0200
+@@ -6,7 +6,7 @@
+ #
+
+
+-mod-subdirs := dio hil mtd sbus video macintosh usb input telephony ide \
++mod-subdirs := dio hil mtd sbus video macintosh usb otg input telephony ide \
+ message/i2o message/fusion scsi md ieee1394 pnp isdn atm \
+ fc4 net/hamradio i2c acpi bluetooth usb/gadget sensors
+
+@@ -28,6 +28,7 @@
+ subdir-$(CONFIG_MAC) += macintosh
+ subdir-$(CONFIG_PPC32) += macintosh
+ subdir-$(CONFIG_USB) += usb
++subdir-$(CONFIG_OTG) += otg
+ subdir-$(CONFIG_USB_GADGET) += usb/gadget
+ subdir-$(CONFIG_INPUT) += input
+ subdir-$(CONFIG_PHONE) += telephony
+diff -uNr linux/drivers/no-otg/Config.in linux/drivers/otg/Config.in
+--- linux/drivers/no-otg/Config.in 1970-01-01 01:00:00.000000000 +0100
++++ linux/drivers/otg/Config.in 2006-09-01 21:41:25.000000000 +0200
+@@ -0,0 +1,103 @@
++#
++# USBOTG - Top level configuration of a USB Peripheral or USB On-The-Go Peripheral Device
++#
++# Copyright (c) 2004 Belcarra
++#
++#
++
++mainmenu_option next_comment
++
++ #
++ # Enable/Disable OTG Support
++ #
++ comment 'On-The-Go and USB Peripheral Support'
++ tristate 'Support for On-The-Go and USB Peripherals ' CONFIG_OTG
++
++ if [ "$CONFIG_OTG" != "n" ]; then
++ #
++ # Select appropriate hardware platform, each config file
++ # will only offer options if the kernel is configured for
++ # that specific architecture or platform. They should define
++ # the following to enable the further configuration in this
++ # file:
++ # CONFIG_OTG_PLATFORM_OTG offer OTG configuration
++ #
++ # CONFIG_OTG_PLATFORM_USBD offer USBD configuration and
++ # function selection
++ # CONFIG_OTG_PLATFORM_HOST offer HOST configuration
++ #
++ mainmenu_option next_comment
++ comment 'Select Hardware'
++
++ # platform oriented configurations
++# source drivers/otg/config/Config.in-mainstone
++# source drivers/otg/config/Config.in-pcs-b780
++# source drivers/otg/config/Config.in-pcs-p1
++# source drivers/otg/config/Config.in-mx2ads
++# source drivers/otg/config/Config.in-omap-h2
++ source drivers/otg/config/Config.in-db1550
++# source drivers/otg/config/Config.in-mordor
++
++ # architecture specific configurations
++ source drivers/otg/config/Config.in-au1x00
++# source drivers/otg/config/Config.in-dbmx1
++# source drivers/otg/config/Config.in-lh7a400
++# source drivers/otg/config/Config.in-lubbock
++# source drivers/otg/config/Config.in-smdk2500
++# source drivers/otg/config/Config.in-strongarm
++# source drivers/otg/config/Config.in-superh
++
++ # generic drivers
++ source drivers/otg/config/Config.in-isp1301
++ source drivers/otg/config/Config.in-max3353e
++ endmenu
++
++ if [ "$CONFIG_OTG_PLATFORM_OTG" = "y" -o "$CONFIG_OTG_PLATFORM_USBD" = "y" ]; then
++
++ #
++ # Generic Options
++ #
++ mainmenu_option next_comment
++ comment 'General Support Options'
++ bool 'Enable High Speed Descriptors' CONFIG_OTG_HIGH_SPEED
++ # bool 'Enable Root HUB Function' CONFIG_OTG_ROOT_HUB
++ bool 'OTG Fast Tracing' CONFIG_OTG_TRACE
++ tristate 'USB FUNCTION FS Module' CONFIG_OTG_PROCFSM
++ bool 'Disable C99 initializers' CONFIG_OTG_NOC99
++ endmenu
++
++ #
++ # Select USB Peripheral Function Drivers
++ #
++ mainmenu_option next_comment
++ comment 'Targeted Peripherals (USB Peripheral Function Drivers)'
++ source drivers/otg/functions/acm/Config.in
++ source drivers/otg/functions/mouse/Config.in
++ source drivers/otg/functions/network/Config.in
++ source drivers/otg/functions/msc/Config.in
++# source drivers/otg/functions/test/Config.in
++ endmenu
++
++ mainmenu_option next_comment
++ comment 'Traditional Device Options'
++ bool 'Built-in Minimal USB Device' CONFIG_OTG_FW_MN
++ dep_bool 'Enable Auto-Start' CONFIG_OTG_TR_AUTO $CONFIG_OTG_MN
++ endmenu
++ fi
++ #dep_tristate 'Build OTG minihost core' CONFIG_OTG_HOSTCORE $CONFIG_OTG
++ if [ "$CONFIG_OTG_PLATFORM_HOST" != "n" ]; then
++ #
++ # Host configuration
++ #
++ mainmenu_option next_comment
++ comment 'Host configuration (OTG minihost core and HCD)'
++# source drivers/otg/core/Config.in
++ source drivers/otg/ocd/Config.in
++# source drivers/otg/classes/usblan/Config.in
++ endmenu
++ fi
++
++ fi
++
++endmenu
++
+diff -uNr linux/drivers/no-otg/Config.in-orig linux/drivers/otg/Config.in-orig
+--- linux/drivers/no-otg/Config.in-orig 1970-01-01 01:00:00.000000000 +0100
++++ linux/drivers/otg/Config.in-orig 2006-09-01 21:41:25.000000000 +0200
+@@ -0,0 +1,73 @@
++#
++# OTG - configuration of a USB On-The-Go Device
++#
++# Copyright (c) 2004 Belcarra
++#
++# The otg_export script will delete all comments marked "(Testing)"
++#
++
++mainmenu_option next_comment
++
++comment 'OTG devices'
++
++tristate 'Support for USB On-The-Go Devices ' CONFIG_OTG
++
++if [ "$CONFIG_OTG" = "y" -o "$CONFIG_OTG" = "m" ]; then
++ comment ''
++ bool ' Enable High Speed Descriptors' CONFIG_OTG_HIGH_SPEED
++ bool ' Enable Root HUB Function' CONFIG_OTG_ROOT_HUB
++ comment ''
++
++ bool ' Disable PCD' CONFIG_OTG_DISABLE_PCD
++ bool ' Disable HCD' CONFIG_OTG_DISABLE_HCD
++
++ comment ''
++
++ bool ' OTG Proc FS' CONFIG_OTG_PROCFS
++ tristate ' OTG Proc FS Module' CONFIG_OTG_PROCFSM $CONFIG_OTG
++
++ comment 'On-The-Go Functions'
++
++ source drivers/otg/functions/network/Config.in
++ source drivers/otg/functions/acm/Config.in
++ source drivers/otg/functions/msc/Config.in
++
++ source drivers/otg/functions/isotest/Config.in
++ source drivers/otg/functions/mouse/Config.in
++
++ comment ''
++ comment 'On-The-Go Transceiver Controller Drivers (TCD)'
++
++ source drivers/otg/tcd/isp1301/Config.in
++
++ comment ''
++ comment 'On-The-Go Peripheral Controller Drivers (PCD)'
++
++ source drivers/otg/pcd/au1x00/Config.in
++ source drivers/otg/pcd/mx1/Config.in
++ source drivers/otg/pcd/mx2/Config.in
++ source drivers/otg/pcd/pxa/Config.in
++ source drivers/otg/pcd/sa1100/Config.in
++ source drivers/otg/pcd/lh7a400/Config.in
++ source drivers/otg/pcd/omap/Config.in
++ source drivers/otg/pcd/smdk2500/Config.in
++ source drivers/otg/pcd/superh/Config.in
++ source drivers/otg/pcd/sx2/Config.in
++ source drivers/otg/pcd/wmmx/Config.in
++
++ comment ''
++ comment 'On-The-Go Host Controller Drivers (HCD)'
++
++ source drivers/otg/hcd/omap/Config.in
++
++ comment ''
++ tristate ' OTG Fast Tracing' CONFIG_OTG_TRACE
++ comment ''
++
++ comment 'Non Current Bus Drivers (Testing)'
++ source drivers/otg/functions/pst/Config.in
++ source drivers/otg/functions/datalog/Config.in
++
++fi
++
++endmenu
+diff -uNr linux/drivers/no-otg/FIX-MAKEFILES linux/drivers/otg/FIX-MAKEFILES
+--- linux/drivers/no-otg/FIX-MAKEFILES 1970-01-01 01:00:00.000000000 +0100
++++ linux/drivers/otg/FIX-MAKEFILES 2006-09-01 21:41:25.000000000 +0200
+@@ -0,0 +1,23 @@
++#!/bin/sh
++
++ARG=$1
++shift
++
++[ -z "${ARG}" ] && echo Bad args && exit 1
++
++#find . -name Makefile-${ARG} | while read i
++#do
++# m=`expr $i : "\(.*\)-${ARG}"`
++# ln -sfv $i $m
++#done
++
++find . -type d | while read d
++do
++ pushd $d > /dev/null
++ if [ -s Makefile-${ARG} ] ; then
++ echo -n `pwd` ": "
++ ln -sfv Makefile-${ARG} Makefile
++ fi
++ popd >/dev/null
++done
++
+diff -uNr linux/drivers/no-otg/Kconfig linux/drivers/otg/Kconfig
+--- linux/drivers/no-otg/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux/drivers/otg/Kconfig 2006-09-01 21:41:25.000000000 +0200
+@@ -0,0 +1,115 @@
++menu "On-The-Go and USB Peripheral Support"
++
++ config OTG
++ tristate "Support for On-The-Go and USB Peripheral Support"
++ ---help---
++ Configure all or part of the Belcarra OTG Stack
++
++
++ menu "On-The-Go Support"
++ depends on OTG
++
++ source "drivers/otg/config/Kconfig-scma11-evb"
++ #source "drivers/otg/config/Kconfig-omap-h2"
++
++ endmenu
++
++ menu "On-The-Go Support Configuration"
++ depends on OTG_PLATFORM_OTG
++