diff options
Diffstat (limited to 'packages')
38 files changed, 1528 insertions, 831 deletions
diff --git a/packages/avahi/avahi-python_0.6.21.bb b/packages/avahi/avahi-python_0.6.21.bb index eea8295ac8..dbaf3d6416 100644 --- a/packages/avahi/avahi-python_0.6.21.bb +++ b/packages/avahi/avahi-python_0.6.21.bb @@ -1,5 +1,6 @@ require avahi.inc -PR = "r0" + +PR = "r6" # FIXME: without --enable-gtk, avahi-discover (pygtk) won't be built FILES_avahi-discover = "" diff --git a/packages/avahi/avahi-ui_0.6.21.bb b/packages/avahi/avahi-ui_0.6.21.bb index add8de4db4..d693f5f0e0 100644 --- a/packages/avahi/avahi-ui_0.6.21.bb +++ b/packages/avahi/avahi-ui_0.6.21.bb @@ -1,5 +1,6 @@ require avahi.inc -PR = "r0" + +PR = "r6" DEPENDS += "avahi gtk+" diff --git a/packages/avahi/avahi.inc b/packages/avahi/avahi.inc index ae03d00e05..e856e40db5 100644 --- a/packages/avahi/avahi.inc +++ b/packages/avahi/avahi.inc @@ -4,8 +4,6 @@ HOMEPAGE = "http://avahi.org" SECTION = "network" PRIORITY = "optional" LICENSE = "GPL" -PR = "r5" - DEPENDS = "expat virtual/libintl libdaemon dbus glib-2.0" # uclibc has no nss @@ -23,6 +21,7 @@ RDEPENDS_append = "" # TODO: build and enable all the extra stuff avahi offers EXTRA_OECONF = "--with-distro=debian --disable-nls --disable-gdbm ${AVAHI_GTK} --disable-mono --disable-monodoc --disable-qt3 --disable-qt4 ${AVAHI_PYTHON}" +EXTRA_OECONF_append_mipsel = " --disable-stack-protector" AVAHI_PYTHON = "--disable-python" AVAHI_GTK = "--disable-gtk" diff --git a/packages/avahi/avahi_0.6.19.bb b/packages/avahi/avahi_0.6.19.bb index 69763e3932..631d4080fd 100644 --- a/packages/avahi/avahi_0.6.19.bb +++ b/packages/avahi/avahi_0.6.19.bb @@ -1,2 +1,3 @@ require avahi.inc -PR = "r2" + +PR = "r6" diff --git a/packages/avahi/avahi_0.6.20.bb b/packages/avahi/avahi_0.6.20.bb index 0b7fe70be5..631d4080fd 100644 --- a/packages/avahi/avahi_0.6.20.bb +++ b/packages/avahi/avahi_0.6.20.bb @@ -1,2 +1,3 @@ require avahi.inc -PR = "r1" + +PR = "r6" diff --git a/packages/avahi/avahi_0.6.21.bb b/packages/avahi/avahi_0.6.21.bb index 2c30fbc2c8..702594fa6e 100644 --- a/packages/avahi/avahi_0.6.21.bb +++ b/packages/avahi/avahi_0.6.21.bb @@ -1,5 +1,6 @@ require avahi.inc -PR = "r1" + +PR = "r6" SRC_URI += "file://dbus-pre-1.1.1-support.patch;patch=1" SRC_URI += "file://avr32-ipv6-fix.patch;patch=1" diff --git a/packages/avahi/avahi_0.6.22.bb b/packages/avahi/avahi_0.6.22.bb index 15f56ffa95..d4f15f6199 100644 --- a/packages/avahi/avahi_0.6.22.bb +++ b/packages/avahi/avahi_0.6.22.bb @@ -1,5 +1,6 @@ require avahi.inc DEPENDS += "intltool-native" +PR = "r6" PACKAGES =+ "libavahi-gobject" diff --git a/packages/bitlbee/.mtn2git_empty b/packages/bitlbee/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/bitlbee/.mtn2git_empty diff --git a/packages/bitlbee/bitlbee_1.0.4.bb b/packages/bitlbee/bitlbee_1.0.4.bb new file mode 100644 index 0000000000..41f7b1c97f --- /dev/null +++ b/packages/bitlbee/bitlbee_1.0.4.bb @@ -0,0 +1,59 @@ +DESCRIPTION = "Bitlbee is an IRC to IM gateway that support multiple IM protocols." +HOMEPAGE = "http://www.bitlbee.org/" +SECTION = "console/network" +LICENSE = "GPLv2" +DEPENDS = "glib-2.0 gnutls" +PR = "r0" + +SRC_URI = "http://get.bitlbee.org/src/${P}.tar.gz \ + file://configure.patch;patch=1 \ + file://init-script" + +S = "${WORKDIR}/bitlbee-${PV}" + +EXTRA_OECONF = "--prefix=/usr \ + --datadir=/usr/share/bitlbee \ + --etcdir=/etc/bitlbee \ + --oscar=0 \ + --cpu=${TARGET_ARCH}" + +do_configure () { + # NOTE: bitlbee's configure script is not an autotool creation, + # so we do not use the default autotools_do_configure. + ./configure ${EXTRA_OECONF} || die "./configure failed" +} + +do_compile () { + make CC="${CC}" LD="${LD}" || die "make failed" + + # make bitlbeed forking server + cd ${S}/utils + ${CC} bitlbeed.c -o bitlbeed || die "bitlbeed failed to compile" +} + +do_install () { + # install bitlbee + install -d ${D}${localstatedir}/lib/bitlbee + make install DESTDIR=${D} || die "install failed" + make install-etc DESTDIR=${D} || die "install failed" + + # copy bitlbee forking server + install ${S}/utils/bitlbeed ${D}${sbindir}/bitlbeed + + # copy init script + install -d ${D}${sysconfdir}/init.d + install ${WORKDIR}/init-script ${D}${sysconfdir}/init.d/bitlbee + sed -i -e "s:BITLBEED_EXEC:${sbindir}/bitlbeed:" ${D}${sysconfdir}/init.d/bitlbee + sed -i -e "s:BITLBEED_OPTS::" ${D}${sysconfdir}/init.d/bitlbee + + # copy bitlbee utils + install -d ${D}${datadir}/bitlbee + cp ${S}/utils/* ${D}${datadir}/bitlbee/ + rm ${D}${datadir}/bitlbee/bitlbeed* +} + +pkg_postinst () { + chown nobody:nogroup ${localstatedir}/lib/bitlbee + chmod 700 ${localstatedir}/lib/bitlbee +} + diff --git a/packages/bitlbee/files/.mtn2git_empty b/packages/bitlbee/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/bitlbee/files/.mtn2git_empty diff --git a/packages/bitlbee/files/configure.patch b/packages/bitlbee/files/configure.patch new file mode 100644 index 0000000000..60488b1814 --- /dev/null +++ b/packages/bitlbee/files/configure.patch @@ -0,0 +1,21 @@ +--- bitlbee/configure.orig 2006-11-25 13:01:16.000000000 +0100 ++++ bitlbee/configure 2006-11-25 13:09:19.000000000 +0100 +@@ -57,6 +57,9 @@ + + --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto) + $ssl ++ ++--arch=... The target architecture $arch ++--cpu=... The target cpu $cpu + EOF + exit; + fi +@@ -366,6 +369,8 @@ + ;; + esac + ++echo Cpu: $cpu ++ + echo + echo 'Configuration done:' + diff --git a/packages/bitlbee/files/init-script b/packages/bitlbee/files/init-script new file mode 100644 index 0000000000..3ec3fdfb4a --- /dev/null +++ b/packages/bitlbee/files/init-script @@ -0,0 +1,31 @@ +#!/bin/sh + +case "$1" in + start) + echo "Starting bitlbee daemon" + start-stop-daemon --start --startas BITLBEED_EXEC \ + -c nobody:nogroup --exec BITLBEED_EXEC -- \ + BITLBEED_OPTS /usr/sbin/bitlbee + [ $? -eq 0 ] || echo $? "Failed to start bitlbee daemon" + ;; + + stop) + echo "Stopping bitlbee daemon" + start-stop-daemon --stop --signal 9 \ + --exec BITLBEED_EXEC + [ $? -eq 0 ] || echo $? "Failed to stop bitlbee daemon" + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop }" + exit 1 + ;; +esac + +exit 0 diff --git a/packages/dillo/dillo2-0.6.6/dillo2-gcc4.patch b/packages/dillo/dillo2-0.6.6/dillo2-gcc4.patch new file mode 100644 index 0000000000..b8e01aaca5 --- /dev/null +++ b/packages/dillo/dillo2-0.6.6/dillo2-gcc4.patch @@ -0,0 +1,27 @@ +diff -Naur dillo-0.6.6-orig/src/dw_table.c dillo-0.6.6/src/dw_table.c +--- dillo-0.6.6-orig/src/dw_table.c 2007-03-22 22:46:10.000000000 +0100 ++++ dillo-0.6.6/src/dw_table.c 2007-03-22 22:48:57.000000000 +0100 +@@ -1177,7 +1177,10 @@ + sub_extr_width = rest_w * cols_per_sub / rest_n; + rest_w -= sub_extr_width; + rest_n -= cols_per_sub; +- EXTR_VALUE (sub_extremes[i]) = sub_extr_width; ++ if(max) ++ sub_extremes[i].max_width = sub_extr_width; ++ else ++ sub_extremes[i].min_width = sub_extr_width; + } + } + } else { +@@ -1196,7 +1199,10 @@ + delta = rest_w * EXTR_VALUE (sub_extremes[i]) / rest_n; + rest_w -= delta; + rest_n -= EXTR_VALUE (sub_extremes[i]); +- EXTR_VALUE (sub_extremes[i]) += delta; ++ if(max) ++ sub_extremes[i].max_width += delta; ++ else ++ sub_extremes[i].min_width += delta; + } + DEBUG_MSG (DEBUG_WIDTH_LEVEL + 2, "%d\n", + EXTR_VALUE (sub_extremes[i])); diff --git a/packages/dillo/dillo2_0.6.6.bb b/packages/dillo/dillo2_0.6.6.bb index f6052e860d..0eef5d9fd8 100644 --- a/packages/dillo/dillo2_0.6.6.bb +++ b/packages/dillo/dillo2_0.6.6.bb @@ -4,11 +4,12 @@ LICENSE = "GPL" DEPENDS = "gtk+" RDEPENDS = "gdk-pixbuf-loader-xpm" SRC_URI="http://www.dillo.org/download/dillo-${PV}.tar.gz \ + file://dillo2-gcc4.patch;patch=1;pnum=1 \ file://gtk2.patch;patch=1;pnum=1 \ - file://fix_about_syntax.patch;patch=1;pnum=1 \ - file://dillo.desktop \ - file://dillo.png \ - file://dillorc" + file://fix_about_syntax.patch;patch=1;pnum=1 \ + file://dillo.desktop \ + file://dillo.png \ + file://dillorc" PRIORITY = "optional" diff --git a/packages/freesmartphone/python-ophoned/ophoned b/packages/freesmartphone/python-ophoned/ophoned new file mode 100644 index 0000000000..edc800711a --- /dev/null +++ b/packages/freesmartphone/python-ophoned/ophoned @@ -0,0 +1,40 @@ +#! /bin/sh +# +# ophoned This shell script starts and stops the open phone daemon. +# +# chkconfig: 345 90 20 +# description: py-ophoned is the open phone daemon +# processname: python + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +NAME=ophoned + +[ -f /etc/default/rcS ] && . /etc/default/rcS + +case "$1" in + start) + echo -n "Starting open phone daemon: " + start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/bin/ophoned + if [ $? = 0 ]; then + echo "(ok)" + else + echo "(failed)" + fi + ;; + stop) + echo -n "Stopping open phone daemon: " + start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo + rm -f /var/run/${NAME}.pid + echo "(done)" + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/ophoned {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packages/freesmartphone/python-ophoned_git.bb b/packages/freesmartphone/python-ophoned_git.bb index e494719bec..0a1c802041 100644 --- a/packages/freesmartphone/python-ophoned_git.bb +++ b/packages/freesmartphone/python-ophoned_git.bb @@ -19,9 +19,9 @@ S = "${WORKDIR}/git" do_install_append() { install -d ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/ophoned ${D}${sysconfdir}/init.d/ -# install -m 0644 ${WORKDIR}/odeviced.conf ${D}${sysconfdir} +# install -m 0644 ${WORKDIR}/ophoned.conf ${D}${sysconfdir} install -d ${D}${sysconfdir}/dbus-1/system.d/ -# mv -f ${D}${datadir}/etc/dbus-1/system.d/odeviced.conf ${D}${sysconfdir}/dbus-1/system.d/ + mv -f ${D}${datadir}/etc/dbus-1/system.d/ophoned.conf ${D}${sysconfdir}/dbus-1/system.d/ } RDEPENDS_${PN} += "\ diff --git a/packages/freesmartphone/python-ousaged/.mtn2git_empty b/packages/freesmartphone/python-ousaged/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/freesmartphone/python-ousaged/.mtn2git_empty diff --git a/packages/freesmartphone/python-ousaged/ousaged b/packages/freesmartphone/python-ousaged/ousaged new file mode 100644 index 0000000000..7b62d7f93c --- /dev/null +++ b/packages/freesmartphone/python-ousaged/ousaged @@ -0,0 +1,40 @@ +#! /bin/sh +# +# odeviced This shell script starts and stops the open device daemon. +# +# chkconfig: 345 90 20 +# description: py-ousaged is the open usage daemon +# processname: python + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +NAME=odeviced + +[ -f /etc/default/rcS ] && . /etc/default/rcS + +case "$1" in + start) + echo -n "Starting open usage daemon: " + start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/bin/ousaged + if [ $? = 0 ]; then + echo "(ok)" + else + echo "(failed)" + fi + ;; + stop) + echo -n "Stopping open usage daemon: " + start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo + rm -f /var/run/${NAME}.pid + echo "(done)" + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/ousaged {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packages/freesmartphone/python-ousaged_git.bb b/packages/freesmartphone/python-ousaged_git.bb new file mode 100644 index 0000000000..f9ba2856eb --- /dev/null +++ b/packages/freesmartphone/python-ousaged_git.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "The Open Usage Daemon Prototype in Python" +HOMEPAGE = "http://www.freesmartphone.org/mediawiki/index.php/Implementations/OpenUsageDaemon" +AUTHOR = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>" +SECTION = "console/network" +DEPENDS = "python-cython-native python-pyrex-native" +LICENSE = "GPLv2" +PV = "0.7.9+gitr${SRCREV}" +PR = "r0" + +inherit distutils update-rc.d + +INITSCRIPT_NAME = "ousaged" +INITSCRIPT_PARAMS = "defaults 20" + +SRC_URI = "\ + ${FREESMARTPHONE_GIT}/usaged.git;protocol=git;branch=master \ + file://ousaged \ +" +S = "${WORKDIR}/git" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/ousaged ${D}${sysconfdir}/init.d/ + install -d ${D}${sysconfdir}/dbus-1/system.d/ + mv -f ${D}${datadir}/etc/dbus-1/system.d/ousaged.conf ${D}${sysconfdir}/dbus-1/system.d/ +} + +RDEPENDS_${PN} += "\ + python-dbus \ + python-pygobject \ + python-pyrtc \ + python-syslog \ + python-odeviced \ +" + +FILES_${PN} += "${sysconfdir}" diff --git a/packages/freesmartphone/zhone/.mtn2git_empty b/packages/freesmartphone/zhone/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/freesmartphone/zhone/.mtn2git_empty diff --git a/packages/freesmartphone/zhone/80zhone b/packages/freesmartphone/zhone/80zhone new file mode 100644 index 0000000000..4a698007b8 --- /dev/null +++ b/packages/freesmartphone/zhone/80zhone @@ -0,0 +1,4 @@ +#!/bin/sh -e +zhone --fullscreen > /dev/null 2>&1 & +renice -3 $! +exit 0 diff --git a/packages/freesmartphone/zhone_git.bb b/packages/freesmartphone/zhone_git.bb index 7fe6742069..419ee7a3e3 100644 --- a/packages/freesmartphone/zhone_git.bb +++ b/packages/freesmartphone/zhone_git.bb @@ -4,10 +4,26 @@ SECTION = "x11" DEPENDS = "edje-native" RDEPENDS = "task-python-efl python-textutils" PV = "0.0.0+gitr${SRCREV}" +PR = "r3" -SRC_URI = "${FREESMARTPHONE_GIT}/zhone.git;protocol=git;branch=master" +SRC_URI = "${FREESMARTPHONE_GIT}/zhone.git;protocol=git;branch=master \ + file://80zhone" S = "${WORKDIR}/git" inherit autotools -FILES_${PN} += "${datadir}" +RDEPENDS_${PN} += "\ + python-dbus \ +" + +do_install_append() { + install -d ${D}${sysconfdir}/X11/Xsession.d/ + install -m 0755 ${WORKDIR}/80zhone ${D}${sysconfdir}/X11/Xsession.d/ +} + +FILES_${PN} += "${datadir} ${sysconfdir}" + +RCONFLICTS = "openmoko-session2" +RREPLACES = "openmoko-session2" +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/packages/images/fso-image.bb b/packages/images/fso-image.bb new file mode 100644 index 0000000000..72cbfd71c6 --- /dev/null +++ b/packages/images/fso-image.bb @@ -0,0 +1,61 @@ +#------------------------------------------------------ +# freesmartphone.org Image Recipe +#------------------------------------------------------ + +IMAGE_LINGUAS = "" + +ADD_INSTALL = "\ + fontconfig-utils \ + \ + ttf-dejavu-common \ + ttf-dejavu-sans \ + ttf-dejavu-serif \ + \ +" + +MICKEY_INSTALL = "\ + htop \ + mickeyterm \ + nano \ + powertop \ + s3c24xx-gpio \ +" + +ZHONE_INSTALL = "\ + gsm0710muxd \ + python-odeviced \ + python-ophoned \ + python-ousaged \ + zhone \ +" + +IMAGE_INSTALL = "\ + ${MACHINE_TASK_PROVIDER} \ + netbase \ + sysfsutils \ + module-init-tools-depmod \ + rsync \ + screen \ + fbset \ + fbset-modes \ + \ + matchbox-wm \ + ${XSERVER} \ + xserver-kdrive-common \ + xserver-nodm-init \ + xauth \ + xhost \ + xset \ + xrandr \ + \ + python-codecs \ + \ + ${ADD_INSTALL} \ + ${MICKEY_INSTALL} \ + ${ZHONE_INSTALL} \ +" + +inherit image + +ROOTFS_POSTPROCESS_COMMAND += 'date "+%m%d%H%M%Y" >${IMAGE_ROOTFS}/etc/timestamp' + diff --git a/packages/ipaq-sleep/ipaq-sleep_0.9.bb b/packages/ipaq-sleep/ipaq-sleep_0.9.bb index a3fcbdf270..24d881dd05 100644 --- a/packages/ipaq-sleep/ipaq-sleep_0.9.bb +++ b/packages/ipaq-sleep/ipaq-sleep_0.9.bb @@ -1,17 +1,14 @@ - +DESCRIPTION = "Automatic sleep/suspend control daemon" +SECTION = "x11/base" LICENSE = "GPL" -inherit gpe pkgconfig - DEPENDS = "apmd virtual/xserver libxext virtual/libx11 libxau xscrnsaverh libxss" -SECTION = "x11/base" RDEPENDS = "apm" +PR = "r6" + +inherit gpe pkgconfig SRC_URI_append = " file://init-script-busybox.patch;patch=1" SRC_URI_append = " file://install-fix.patch;patch=1" SRC_URI_append = " file://unbreak.patch;patch=1" -PR = "r6" - -DESCRIPTION = "Automatic sleep/suspend control daemon" - CONFFILES_${PN} += "${sysconfdir}/ipaq-sleep.conf" diff --git a/packages/linux/linux-2.6.24/ts72xx/ep93xx-eth-phylib-framework.patch b/packages/linux/linux-2.6.24/ts72xx/ep93xx-eth-phylib-framework.patch new file mode 100644 index 0000000000..3f25f308cd --- /dev/null +++ b/packages/linux/linux-2.6.24/ts72xx/ep93xx-eth-phylib-framework.patch @@ -0,0 +1,548 @@ +Currently, the ep93xx_eth driver doesn't care about the PHY state, +but it should, in order to tell the MAC when full duplex operation is +required; failure to do so causes degraded performance on full duplex +links. This patch implements proper PHY handling via the phylib framework: + + - clean up ep93xx_mdio_{read,write} to conform to ep93xx manual + - convert ep93xx_eth driver to phylib framework + - set full duplex bit in configuration of MAC when FDX link detected + - convert to use print_mac() + +Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> +Cc: Lennert Buytenhek <buytenh@wantstofly.org> +Cc: Andy Fleming <afleming@freescale.com> + + drivers/net/arm/Kconfig | 1 + + drivers/net/arm/ep93xx_eth.c | 354 +++++++++++++++++++++++++++++++++--------- + 2 files changed, 282 insertions(+), 73 deletions(-) + +diff --git a/drivers/net/arm/Kconfig b/drivers/net/arm/Kconfig +index f9cc2b6..5860175 100644 +--- a/drivers/net/arm/Kconfig ++++ b/drivers/net/arm/Kconfig +@@ -44,6 +44,7 @@ config EP93XX_ETH + tristate "EP93xx Ethernet support" + depends on ARM && ARCH_EP93XX + select MII ++ select PHYLIB + help + This is a driver for the ethernet hardware included in EP93xx CPUs. + Say Y if you are building a kernel for EP93xx based devices. +diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c +index 91a6590..6b9ac41 100644 +--- a/drivers/net/arm/ep93xx_eth.c ++++ b/drivers/net/arm/ep93xx_eth.c +@@ -2,6 +2,7 @@ + * EP93xx ethernet network device driver + * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> + * Dedicated to Marija Kulikova. ++ * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -14,6 +15,7 @@ + #include <linux/kernel.h> + #include <linux/netdevice.h> + #include <linux/mii.h> ++#include <linux/phy.h> + #include <linux/etherdevice.h> + #include <linux/ethtool.h> + #include <linux/init.h> +@@ -37,6 +39,8 @@ + #define REG_RXCTL_DEFAULT 0x00073800 + #define REG_TXCTL 0x0004 + #define REG_TXCTL_ENABLE 0x00000001 ++#define REG_TESTCTL 0x0008 ++#define REG_TESTCTL_MFDX 0x00000040 + #define REG_MIICMD 0x0010 + #define REG_MIICMD_READ 0x00008000 + #define REG_MIICMD_WRITE 0x00004000 +@@ -45,6 +49,9 @@ + #define REG_MIISTS_BUSY 0x00000001 + #define REG_SELFCTL 0x0020 + #define REG_SELFCTL_RESET 0x00000001 ++#define REG_SELFCTL_MDCDIV_MSK 0x00007e00 ++#define REG_SELFCTL_MDCDIV_OFS 9 ++#define REG_SELFCTL_PSPRS 0x00000100 + #define REG_INTEN 0x0024 + #define REG_INTEN_TX 0x00000008 + #define REG_INTEN_RX 0x00000007 +@@ -174,8 +181,14 @@ struct ep93xx_priv + + struct net_device_stats stats; + +- struct mii_if_info mii; + u8 mdc_divisor; ++ int phy_supports_mfps:1; ++ ++ struct mii_bus mii_bus; ++ struct phy_device *phy_dev; ++ int speed; ++ int duplex; ++ int link; + }; + + #define rdb(ep, off) __raw_readb((ep)->base_addr + (off)) +@@ -185,8 +198,6 @@ struct ep93xx_priv + #define wrw(ep, off, val) __raw_writew((val), (ep)->base_addr + (off)) + #define wrl(ep, off, val) __raw_writel((val), (ep)->base_addr + (off)) + +-static int ep93xx_mdio_read(struct net_device *dev, int phy_id, int reg); +- + static struct net_device_stats *ep93xx_get_stats(struct net_device *dev) + { + struct ep93xx_priv *ep = netdev_priv(dev); +@@ -542,12 +553,6 @@ static int ep93xx_start_hw(struct net_device *dev) + return 1; + } + +- wrl(ep, REG_SELFCTL, ((ep->mdc_divisor - 1) << 9)); +- +- /* Does the PHY support preamble suppress? */ +- if ((ep93xx_mdio_read(dev, ep->mii.phy_id, MII_BMSR) & 0x0040) != 0) +- wrl(ep, REG_SELFCTL, ((ep->mdc_divisor - 1) << 9) | (1 << 8)); +- + /* Receive descriptor ring. */ + addr = ep->descs_dma_addr + offsetof(struct ep93xx_descs, rdesc); + wrl(ep, REG_RXDQBADD, addr); +@@ -631,12 +636,11 @@ static int ep93xx_open(struct net_device *dev) + return -ENOMEM; + + if (is_zero_ether_addr(dev->dev_addr)) { ++ DECLARE_MAC_BUF(mac_buf); ++ + random_ether_addr(dev->dev_addr); +- printk(KERN_INFO "%s: generated random MAC address " +- "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x.\n", dev->name, +- dev->dev_addr[0], dev->dev_addr[1], +- dev->dev_addr[2], dev->dev_addr[3], +- dev->dev_addr[4], dev->dev_addr[5]); ++ dev_info(&dev->dev, "generated random MAC address %s\n", ++ print_mac(mac_buf, dev->dev_addr)); + } + + napi_enable(&ep->napi); +@@ -664,6 +668,8 @@ static int ep93xx_open(struct net_device *dev) + + wrl(ep, REG_GIINTMSK, REG_GIINTMSK_ENABLE); + ++ phy_start(ep->phy_dev); ++ + netif_start_queue(dev); + + return 0; +@@ -676,6 +682,9 @@ static int ep93xx_close(struct net_device *dev) + napi_disable(&ep->napi); + netif_stop_queue(dev); + ++ if (ep->phy_dev) ++ phy_stop(ep->phy_dev); ++ + wrl(ep, REG_GIINTMSK, 0); + free_irq(ep->irq, dev); + ep93xx_stop_hw(dev); +@@ -687,53 +696,103 @@ static int ep93xx_close(struct net_device *dev) + static int ep93xx_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) + { + struct ep93xx_priv *ep = netdev_priv(dev); +- struct mii_ioctl_data *data = if_mii(ifr); + +- return generic_mii_ioctl(&ep->mii, data, cmd, NULL); ++ return phy_mii_ioctl(ep->phy_dev, if_mii(ifr), cmd); + } + +-static int ep93xx_mdio_read(struct net_device *dev, int phy_id, int reg) ++/* common MII transactions should take < 100 iterations */ ++#define EP93XX_PHY_TIMEOUT 2000 ++ ++static int ep93xx_mdio_wait(struct mii_bus *bus) + { +- struct ep93xx_priv *ep = netdev_priv(dev); +- int data; +- int i; ++ struct ep93xx_priv *ep = bus->priv; ++ unsigned int timeout = EP93XX_PHY_TIMEOUT; + +- wrl(ep, REG_MIICMD, REG_MIICMD_READ | (phy_id << 5) | reg); ++ while ((rdl(ep, REG_MIISTS) & REG_MIISTS_BUSY) ++ && timeout--) ++ cpu_relax(); + +- for (i = 0; i < 10; i++) { +- if ((rdl(ep, REG_MIISTS) & REG_MIISTS_BUSY) == 0) +- break; +- msleep(1); ++ if (timeout <= 0) { ++ dev_err(bus->dev, "MII operation timed out\n"); ++ return -ETIMEDOUT; + } + +- if (i == 10) { +- printk(KERN_INFO DRV_MODULE_NAME ": mdio read timed out\n"); +- data = 0xffff; +- } else { +- data = rdl(ep, REG_MIIDATA); +- } ++ return 0; ++} ++ ++ ++static int ep93xx_mdio_read(struct mii_bus *bus, int mii_id, int regnum) ++{ ++ struct ep93xx_priv *ep = bus->priv; ++ u32 selfctl; ++ u32 data; ++ ++ if (ep93xx_mdio_wait(bus) < 0) ++ return -ETIMEDOUT; ++ ++ selfctl = rdl(ep, REG_SELFCTL); ++ ++ if (ep->phy_supports_mfps) ++ wrl(ep, REG_SELFCTL, selfctl | REG_SELFCTL_PSPRS); ++ else ++ wrl(ep, REG_SELFCTL, selfctl & ~REG_SELFCTL_PSPRS); ++ ++ wrl(ep, REG_MIICMD, REG_MIICMD_READ | (mii_id << 5) | regnum); ++ ++ if (ep93xx_mdio_wait(bus) < 0) ++ return -ETIMEDOUT; ++ ++ data = rdl(ep, REG_MIIDATA); ++ ++ wrl(ep, REG_SELFCTL, selfctl); + + return data; + } + +-static void ep93xx_mdio_write(struct net_device *dev, int phy_id, int reg, int data) ++static int ep93xx_mdio_write(struct mii_bus *bus, int mii_id, int regnum, ++ u16 value) + { +- struct ep93xx_priv *ep = netdev_priv(dev); +- int i; ++ struct ep93xx_priv *ep = bus->priv; ++ u32 selfctl; + +- wrl(ep, REG_MIIDATA, data); +- wrl(ep, REG_MIICMD, REG_MIICMD_WRITE | (phy_id << 5) | reg); ++ if (ep93xx_mdio_wait(bus) < 0) ++ return -ETIMEDOUT; + +- for (i = 0; i < 10; i++) { +- if ((rdl(ep, REG_MIISTS) & REG_MIISTS_BUSY) == 0) +- break; +- msleep(1); +- } ++ selfctl = rdl(ep, REG_SELFCTL); + +- if (i == 10) +- printk(KERN_INFO DRV_MODULE_NAME ": mdio write timed out\n"); ++ if (ep->phy_supports_mfps) ++ wrl(ep, REG_SELFCTL, selfctl | REG_SELFCTL_PSPRS); ++ else ++ wrl(ep, REG_SELFCTL, selfctl & ~REG_SELFCTL_PSPRS); ++ ++ wrl(ep, REG_MIIDATA, value); ++ wrl(ep, REG_MIICMD, REG_MIICMD_WRITE | (mii_id << 5) | regnum); ++ ++ if (ep93xx_mdio_wait(bus) < 0) ++ return -ETIMEDOUT; ++ ++ wrl(ep, REG_SELFCTL, selfctl); ++ ++ return 0; ++} ++ ++static int ep93xx_mdio_reset(struct mii_bus *bus) ++{ ++ struct ep93xx_priv *ep = bus->priv; ++ ++ u32 selfctl = rdl(ep, REG_SELFCTL); ++ ++ selfctl &= ~(REG_SELFCTL_MDCDIV_MSK | REG_SELFCTL_PSPRS); ++ ++ selfctl |= (ep->mdc_divisor - 1) << REG_SELFCTL_MDCDIV_OFS; ++ selfctl |= REG_SELFCTL_PSPRS; ++ ++ wrl(ep, REG_SELFCTL, selfctl); ++ ++ return 0; + } + ++ + static void ep93xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) + { + strcpy(info->driver, DRV_MODULE_NAME); +@@ -743,33 +802,30 @@ static void ep93xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *i + static int ep93xx_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) + { + struct ep93xx_priv *ep = netdev_priv(dev); +- return mii_ethtool_gset(&ep->mii, cmd); ++ struct phy_device *phydev = ep->phy_dev; ++ ++ if (!phydev) ++ return -ENODEV; ++ ++ return phy_ethtool_gset(phydev, cmd); + } + + static int ep93xx_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) + { + struct ep93xx_priv *ep = netdev_priv(dev); +- return mii_ethtool_sset(&ep->mii, cmd); +-} ++ struct phy_device *phydev = ep->phy_dev; + +-static int ep93xx_nway_reset(struct net_device *dev) +-{ +- struct ep93xx_priv *ep = netdev_priv(dev); +- return mii_nway_restart(&ep->mii); +-} ++ if (!phydev) ++ return -ENODEV; + +-static u32 ep93xx_get_link(struct net_device *dev) +-{ +- struct ep93xx_priv *ep = netdev_priv(dev); +- return mii_link_ok(&ep->mii); ++ return phy_ethtool_sset(phydev, cmd); + } + + static struct ethtool_ops ep93xx_ethtool_ops = { + .get_drvinfo = ep93xx_get_drvinfo, + .get_settings = ep93xx_get_settings, + .set_settings = ep93xx_set_settings, +- .nway_reset = ep93xx_nway_reset, +- .get_link = ep93xx_get_link, ++ .get_link = ethtool_op_get_link, + }; + + struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data) +@@ -824,15 +880,127 @@ static int ep93xx_eth_remove(struct platform_device *pdev) + return 0; + } + ++static void ep93xx_adjust_link(struct net_device *dev) ++{ ++ struct ep93xx_priv *ep = netdev_priv(dev); ++ struct phy_device *phydev = ep->phy_dev; ++ ++ int status_change = 0; ++ ++ if (phydev->link) { ++ if ((ep->speed != phydev->speed) || ++ (ep->duplex != phydev->duplex)) { ++ /* speed and/or duplex state changed */ ++ u32 testctl = rdl(ep, REG_TESTCTL); ++ ++ if (DUPLEX_FULL == phydev->duplex) ++ testctl |= REG_TESTCTL_MFDX; ++ else ++ testctl &= ~(REG_TESTCTL_MFDX); ++ ++ wrl(ep, REG_TESTCTL, testctl); ++ ++ ep->speed = phydev->speed; ++ ep->duplex = phydev->duplex; ++ status_change = 1; ++ } ++ } ++ ++ /* test for online/offline link transition */ ++ if (phydev->link != ep->link) { ++ if (phydev->link) /* link went online */ ++ netif_schedule(dev); ++ else { /* link went offline */ ++ ep->speed = 0; ++ ep->duplex = -1; ++ } ++ ep->link = phydev->link; ++ ++ status_change = 1; ++ } ++ ++ if (status_change) ++ phy_print_status(phydev); ++} ++ ++static int ep93xx_mii_probe(struct net_device *dev, int phy_addr) ++{ ++ struct ep93xx_priv *ep = netdev_priv(dev); ++ struct phy_device *phydev = NULL; ++ int val; ++ ++ if (phy_addr >= 0 && phy_addr < PHY_MAX_ADDR) ++ phydev = ep->mii_bus.phy_map[phy_addr]; ++ ++ if (!phydev) { ++ dev_info(&dev->dev, ++ "PHY not found at specified address," ++ " trying autodetection\n"); ++ ++ /* find the first phy */ ++ for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) { ++ if (ep->mii_bus.phy_map[phy_addr]) { ++ phydev = ep->mii_bus.phy_map[phy_addr]; ++ break; ++ } ++ } ++ } ++ ++ if (!phydev) { ++ dev_err(&dev->dev, "no PHY found\n"); ++ return -ENODEV; ++ } ++ ++ phydev = phy_connect(dev, phydev->dev.bus_id, ++ ep93xx_adjust_link, 0, PHY_INTERFACE_MODE_MII); ++ ++ if (IS_ERR(phydev)) { ++ dev_err(&dev->dev, "Could not attach to PHY\n"); ++ return PTR_ERR(phydev); ++ } ++ ++ ep->phy_supports_mfps = 0; ++ ++ val = phy_read(phydev, MII_BMSR); ++ if (val < 0) { ++ dev_err(&phydev->dev, "failed to read MII register\n"); ++ return val; ++ } ++ ++ if (val & 0x0040) { ++ dev_info(&phydev->dev, ++ "PHY supports MII frame preamble suppression\n"); ++ ep->phy_supports_mfps = 1; ++ } ++ ++ phydev->supported &= PHY_BASIC_FEATURES; ++ ++ phydev->advertising = phydev->supported; ++ ++ ep->link = 0; ++ ep->speed = 0; ++ ep->duplex = -1; ++ ep->phy_dev = phydev; ++ ++ dev_info(&dev->dev, "attached PHY driver [%s] " ++ "(mii_bus:phy_addr=%s, irq=%d)\n", ++ phydev->drv->name, phydev->dev.bus_id, phydev->irq); ++ ++ return 0; ++} ++ ++ + static int ep93xx_eth_probe(struct platform_device *pdev) + { + struct ep93xx_eth_data *data; + struct net_device *dev; + struct ep93xx_priv *ep; +- int err; ++ DECLARE_MAC_BUF(mac_buf); ++ int err, i; + + if (pdev == NULL) + return -ENODEV; ++ + data = pdev->dev.platform_data; + + dev = ep93xx_dev_alloc(data); +@@ -852,7 +1020,7 @@ static int ep93xx_eth_probe(struct platform_device *pdev) + if (ep->res == NULL) { + dev_err(&pdev->dev, "Could not reserve memory region\n"); + err = -ENOMEM; +- goto err_out; ++ goto err_out_request_mem_region; + } + + ep->base_addr = ioremap(pdev->resource[0].start, +@@ -860,34 +1028,74 @@ static int ep93xx_eth_probe(struct platform_device *pdev) + if (ep->base_addr == NULL) { + dev_err(&pdev->dev, "Failed to ioremap ethernet registers\n"); + err = -EIO; +- goto err_out; ++ goto err_out_ioremap; + } + ep->irq = pdev->resource[1].start; + +- ep->mii.phy_id = data->phy_id; +- ep->mii.phy_id_mask = 0x1f; +- ep->mii.reg_num_mask = 0x1f; +- ep->mii.dev = dev; +- ep->mii.mdio_read = ep93xx_mdio_read; +- ep->mii.mdio_write = ep93xx_mdio_write; ++ /* mdio/mii bus */ ++ ep->mii_bus.name = "ep93xx_mii_bus"; ++ ep->mii_bus.id = 0; ++ ++ ep->mii_bus.read = ep93xx_mdio_read; ++ ep->mii_bus.write = ep93xx_mdio_write; ++ ep->mii_bus.reset = ep93xx_mdio_reset; ++ ++ ep->mii_bus.phy_mask = 0; ++ ++ ep->mii_bus.priv = ep; ++ ep->mii_bus.dev = &dev->dev; ++ ++ ep->mii_bus.irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); ++ if (NULL == ep->mii_bus.irq) { ++ dev_err(&pdev->dev, "Could not allocate memory\n"); ++ err = -ENOMEM; ++ goto err_out_mii_bus_irq_kmalloc; ++ } ++ ++ for (i = 0; i < PHY_MAX_ADDR; i++) ++ ep->mii_bus.irq[i] = PHY_POLL; ++ + ep->mdc_divisor = 40; /* Max HCLK 100 MHz, min MDIO clk 2.5 MHz. */ ++ ep->phy_supports_mfps = 0; /* probe without preamble suppression */ + + err = register_netdev(dev); + if (err) { + dev_err(&pdev->dev, "Failed to register netdev\n"); +- goto err_out; ++ goto err_out_register_netdev; + } + +- printk(KERN_INFO "%s: ep93xx on-chip ethernet, IRQ %d, " +- "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x.\n", dev->name, +- ep->irq, data->dev_addr[0], data->dev_addr[1], +- data->dev_addr[2], data->dev_addr[3], +- data->dev_addr[4], data->dev_addr[5]); ++ err = mdiobus_register(&ep->mii_bus); ++ if (err) { ++ dev_err(&dev->dev, "Could not register MII bus\n"); ++ goto err_out_mdiobus_register; ++ } ++ ++ err = ep93xx_mii_probe(dev, data->phy_id); ++ if (err) { ++ dev_err(&dev->dev, "failed to probe MII bus\n"); ++ goto err_out_mii_probe; ++ } ++ ++ dev_info(&dev->dev, "ep93xx on-chip ethernet, IRQ %d, %s\n", ++ ep->irq, print_mac(mac_buf, dev->dev_addr)); + + return 0; + ++err_out_mii_probe: ++ mdiobus_unregister(&ep->mii_bus); ++err_out_mdiobus_register: ++ unregister_netdev(dev); ++err_out_register_netdev: ++ kfree(ep->mii_bus.irq); ++err_out_mii_bus_irq_kmalloc: ++ iounmap(ep->base_addr); ++err_out_ioremap: ++ release_resource(ep->res); ++ kfree(ep->res); ++err_out_request_mem_region: ++ free_netdev(dev); + err_out: +- ep93xx_eth_remove(pdev); ++ + return err; + } + diff --git a/packages/linux/linux-2.6.24/ts72xx/ts72xx-rs485.patch b/packages/linux/linux-2.6.24/ts72xx/ts72xx-rs485.patch index 0883322c28..17ee397f45 100644 --- a/packages/linux/linux-2.6.24/ts72xx/ts72xx-rs485.patch +++ b/packages/linux/linux-2.6.24/ts72xx/ts72xx-rs485.patch @@ -217,3 +217,222 @@ index bb9a7aa..4d7dad1 100644 /* Used for packet mode */ #define TIOCPKT_DATA 0 #define TIOCPKT_FLUSHREAD 1 +RS485 auto mode support ported from 2.4 (diff against 2.6.19-rc6-git10) + +Signed-off-by: Petr Stetiar <ynezz@true.cz> + +diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c +index 4213fab..5b3c5ff 100644 +--- a/drivers/serial/amba-pl010.c ++++ b/drivers/serial/amba-pl010.c +@@ -50,6 +50,7 @@ + #include <linux/amba/serial.h> + + #include <asm/io.h> ++#include <asm/hardware.h> + + #define UART_NR 8 + +@@ -65,6 +66,11 @@ + #define UART_DUMMY_RSR_RX 256 + #define UART_PORT_SIZE 64 + ++#ifdef CONFIG_MACH_TS72XX ++static void __iomem *ts_rs485_data9_register; ++static void __iomem *ts_rs485_control_register; ++#endif ++ + /* + * We wrap our port structure around the generic uart_port. + */ +@@ -487,6 +493,107 @@ static int pl010_verify_port(struct uart + return ret; + } + ++#ifdef CONFIG_MACH_TS72XX ++static int ts72xx_rs485_init(void) ++{ ++ ts_rs485_data9_register = ioremap(TS72XX_RS485_DATA9_PHYS_BASE, 4096); ++ if (ts_rs485_data9_register == NULL) { ++ return -1; ++ } ++ ++ ts_rs485_control_register = ioremap(TS72XX_RS485_CONTROL_PHYS_BASE, 4096); ++ if (ts_rs485_control_register == NULL) { ++ iounmap(ts_rs485_data9_register); ++ return -1; ++ } ++ ++ return 0; ++} ++ ++static int ts72xx_auto485(struct uart_port *port, unsigned int cmd, unsigned long *arg) ++{ ++ int baud, cflag, mode; ++ int datalength; ++ ++ mode = (int)*arg; ++ if (!is_rs485_installed()) { ++ printk("amba-pl010.c: this board does not support RS485 auto mode\n"); ++ return -EINVAL; ++ } ++ ++ if (port->line != 1) { ++ printk("amba-pl010.c: auto RS485 mode is only supported on second port (/dev/ttyAM1)\n"); ++ return -EINVAL; ++ } ++ ++ datalength = 8; ++ cflag = port->info->tty->termios->c_cflag ; ++ if (cflag & PARENB) ++ datalength++; ++ ++ if (cflag & CSTOPB) ++ datalength++; ++ ++ baud = tty_get_baud_rate(port->info->tty); ++ ++ switch (cmd) { ++ case TIOC_SBCC485: ++ if ((mode & TS72XX_RS485_AUTO485FD) || (mode & TS72XX_RS485_AUTO485HD)) { ++ printk("amba-pl010.c: unsetting auto RS485 mode\n"); ++ __raw_writew(TS72XX_RS485_MODE_RS232, ts_rs485_control_register); ++ __raw_writew(TS72XX_RS485_MODE_RS232, ts_rs485_data9_register); ++ } ++ break; ++ case TIOC_SBCS485: ++ if (mode & TS72XX_RS485_AUTO485FD) { ++ printk ("amba-pl010.c: setting FULL duplex auto RS485 mode\n"); ++ __raw_writew(TS72XX_RS485_MODE_FD, ts_rs485_control_register); ++ if (datalength > 8) ++ __raw_writew(TS72XX_RS485_MODE_FD, ts_rs485_data9_register); ++ } else if (mode & TS72XX_RS485_AUTO485HD) { ++ printk("amba-pl010.c: setting HALF DUPLEX auto RS485 mode\n"); ++ switch (baud) { ++ case 9600: ++ __raw_writew(TS72XX_RS485_MODE_9600_HD, ts_rs485_control_register); ++ break; ++ case 19200: ++ __raw_writew(TS72XX_RS485_MODE_19200_HD, ts_rs485_control_register); ++ break; ++ case 57600: ++ __raw_writew(TS72XX_RS485_MODE_57600_HD, ts_rs485_control_register); ++ break; ++ case 115200: ++ __raw_writew(TS72XX_RS485_MODE_115200_HD, ts_rs485_control_register); ++ break; ++ default: ++ printk("amba-pl010.c: %d baud rate is not supported for auto RS485 mode\n", baud); ++ return -1; ++ } ++ if (datalength > 8) ++ __raw_writew(TS72XX_RS485_MODE_FD, ts_rs485_data9_register); ++ } ++ break; ++ } ++ ++ return 0; ++} ++#endif ++ ++int pl010_ioctl(struct uart_port *port, unsigned int cmd, unsigned long arg) ++{ ++#ifdef CONFIG_MACH_TS72XX ++ switch (cmd) { ++ case TIOC_SBCC485: ++ case TIOC_SBCS485: ++ return ts72xx_auto485(port, cmd, (unsigned long *)arg); ++ break; ++ default: ++ return -ENOIOCTLCMD; ++ } ++#endif ++ return -ENOIOCTLCMD; ++} ++ + static struct uart_ops amba_pl010_pops = { + .tx_empty = pl010_tx_empty, + .set_mctrl = pl010_set_mctrl, +@@ -504,6 +611,7 @@ static struct uart_ops amba_pl010_pops = + .request_port = pl010_request_port, + .config_port = pl010_config_port, + .verify_port = pl010_verify_port, ++ .ioctl = pl010_ioctl, + }; + + static struct uart_amba_port *amba_ports[UART_NR]; +@@ -746,6 +854,15 @@ static int __init pl010_init(void) + ret = uart_register_driver(&amba_reg); + if (ret == 0) { + ret = amba_driver_register(&pl010_driver); ++#ifdef CONFIG_MACH_TS72XX ++ if (!ret && is_rs485_installed()) { ++ ret = ts72xx_rs485_init(); ++ if (ret) ++ printk("amba-pl010.c: ts72xx_rs485_init() failed\n"); ++ else ++ printk("amba-pl010.c: auto RS485 mode initialized\n"); ++ } ++#endif + if (ret) + uart_unregister_driver(&amba_reg); + } +@@ -756,6 +873,10 @@ static void __exit pl010_exit(void) + { + amba_driver_unregister(&pl010_driver); + uart_unregister_driver(&amba_reg); ++#ifdef CONFIG_MACH_TS72XX ++ iounmap(ts_rs485_data9_register); ++ iounmap(ts_rs485_control_register); ++#endif + } + + module_init(pl010_init); +diff --git a/include/asm-arm/arch-ep93xx/ts72xx.h b/include/asm-arm/arch-ep93xx/ts72xx.h +index a94f63f..4c9396b 100644 +--- a/include/asm-arm/arch-ep93xx/ts72xx.h ++++ b/include/asm-arm/arch-ep93xx/ts72xx.h +@@ -68,6 +68,16 @@ + #define TS72XX_RTC_DATA_PHYS_BASE 0x11700000 + #define TS72XX_RTC_DATA_SIZE 0x00001000 + ++#define TS72XX_RS485_CONTROL_PHYS_BASE 0x22C00000 ++#define TS72XX_RS485_DATA9_PHYS_BASE 0x23000000 ++#define TS72XX_RS485_AUTO485FD 1 ++#define TS72XX_RS485_AUTO485HD 2 ++#define TS72XX_RS485_MODE_RS232 0x00 ++#define TS72XX_RS485_MODE_FD 0x01 ++#define TS72XX_RS485_MODE_9600_HD 0x04 ++#define TS72XX_RS485_MODE_19200_HD 0x05 ++#define TS72XX_RS485_MODE_57600_HD 0x06 ++#define TS72XX_RS485_MODE_115200_HD 0x07 + + #ifndef __ASSEMBLY__ + #include <asm/io.h> +@@ -87,6 +100,12 @@ static inline int board_is_ts7260(void) + return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; + } + ++static inline int is_rs485_installed(void) ++{ ++ return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & ++ TS72XX_OPTIONS_COM2_RS485); ++} ++ + static inline int is_max197_installed(void) + { + return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & +diff --git a/include/asm-arm/ioctls.h b/include/asm-arm/ioctls.h +index bb9a7aa..4d7dad1 100644 +--- a/include/asm-arm/ioctls.h ++++ b/include/asm-arm/ioctls.h +@@ -66,6 +66,9 @@ + #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ + #define FIOQSIZE 0x545E + ++#define TIOC_SBCC485 0x545F /* TS72xx RTS/485 mode clear */ ++#define TIOC_SBCS485 0x5460 /* TS72xx RTS/485 mode set */ ++ + /* Used for packet mode */ + #define TIOCPKT_DATA 0 + #define TIOCPKT_FLUSHREAD 1 diff --git a/packages/linux/linux-omap2-git/beagleboard/0001-board-omap3beagle-fix-merge-damage-in-RTC-code.patch b/packages/linux/linux-omap2-git/beagleboard/0001-board-omap3beagle-fix-merge-damage-in-RTC-code.patch deleted file mode 100644 index 55e9bf7b54..0000000000 --- a/packages/linux/linux-omap2-git/beagleboard/0001-board-omap3beagle-fix-merge-damage-in-RTC-code.patch +++ /dev/null @@ -1,36 +0,0 @@ -From eddf57fb9748791e021ef550d651cc72c48add5c Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@openembedded.org> -Date: Thu, 15 May 2008 09:32:23 +0200 -Subject: [PATCH] ARM: OMAP: board-omap3beagle: fix merge-damage in RTC code - -This patch fixes the merge-damage in the beagleboard RTC code - -Signed-off-by: Koen Kooi <koen@openembedded.org> ---- - arch/arm/mach-omap2/board-omap3beagle.c | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 0c15ca0..0c0cbfc 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -76,6 +76,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = { - - static void __init omap3_beagle_init(void) - { -+ platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices)); - omap_board_config = omap3_beagle_config; - omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); - omap_serial_init(); -@@ -88,8 +89,6 @@ arch_initcall(omap3_beagle_i2c_init); - - static void __init omap3_beagle_map_io(void) - { -- platform_add_devices(omap3_beagle_devices, -- ARRAY_SIZE(omap3_beagle_devices)); - omap2_set_globals_343x(); - omap2_map_common_io(); - } --- -1.5.4.3 - diff --git a/packages/linux/linux-omap2-git/beagleboard/0001-omap3beagle-add-driver-to-turn-on-the-TFP410-framer.patch b/packages/linux/linux-omap2-git/beagleboard/0001-omap3beagle-add-driver-to-turn-on-the-TFP410-framer.patch deleted file mode 100644 index 5cc10b01c1..0000000000 --- a/packages/linux/linux-omap2-git/beagleboard/0001-omap3beagle-add-driver-to-turn-on-the-TFP410-framer.patch +++ /dev/null @@ -1,197 +0,0 @@ -From 75b8dbeed8f53ffb7edc58b2393084fe2346477e Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen@openembedded.org> -Date: Fri, 9 May 2008 20:54:00 +0200 -Subject: [PATCH] omap3beagle: add driver to turn on the TFP410 framer to get DVI output - -Signed-off-by: Koen Kooi <koen@openembedded.org> ---- - arch/arm/mach-omap2/board-omap3beagle.c | 11 +++ - drivers/video/omap/Makefile | 1 + - drivers/video/omap/lcd_omap3beagle.c | 135 +++++++++++++++++++++++++++++++ - 3 files changed, 147 insertions(+), 0 deletions(-) - create mode 100644 drivers/video/omap/lcd_omap3beagle.c - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 0c0cbfc..c992cc7 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -63,12 +63,23 @@ static struct platform_device omap3_beagle_twl4030rtc_device = { - .id = -1, - }; - -+static struct platform_device omap3_beagle_lcd_device = { -+ .name = "omap3beagle_lcd", -+ .id = -1, -+}; -+ -+static struct omap_lcd_config omap3_beagle_lcd_config __initdata = { -+ .ctrl_name = "internal", -+}; -+ - static struct omap_board_config_kernel omap3_beagle_config[] __initdata = { - { OMAP_TAG_UART, &omap3_beagle_uart_config }, - { OMAP_TAG_MMC, &omap3beagle_mmc_config }, -+ { OMAP_TAG_LCD, &omap3_beagle_lcd_config }, - }; - - static struct platform_device *omap3_beagle_devices[] __initdata = { -+ &omap3_beagle_lcd_device, - #ifdef CONFIG_RTC_DRV_TWL4030 - &omap3_beagle_twl4030rtc_device, - #endif -diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile -index cad6a68..fe7ee5d 100644 ---- a/drivers/video/omap/Makefile -+++ b/drivers/video/omap/Makefile -@@ -32,6 +32,7 @@ objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o - objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o - objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o - objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o -+objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o - objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o - - omapfb-objs := $(objs-yy) -diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c -new file mode 100644 -index 0000000..f5b7466 ---- /dev/null -+++ b/drivers/video/omap/lcd_omap3beagle.c -@@ -0,0 +1,135 @@ -+/* -+ * LCD panel support for the TI OMAP3 Beagle board -+ * -+ * Author: Koen Kooi <koen@openembedded.org> -+ * -+ * Derived from drivers/video/omap/lcd-omap3evm.c -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, write to the Free Software Foundation, Inc., -+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ */ -+ -+#include <linux/module.h> -+#include <linux/platform_device.h> -+#include <linux/i2c/twl4030.h> -+ -+#include <asm/arch/gpio.h> -+#include <asm/arch/mux.h> -+#include <asm/arch/omapfb.h> -+#include <asm/mach-types.h> -+ -+#define LCD_PANEL_ENABLE_GPIO 170 -+ -+#define LCD_XRES 1024 -+#define LCD_YRES 768 -+#define LCD_PIXCLOCK_MAX 64000 /* in kHz */ -+#define LCD_PIXCLOCK_MIN 64000 /* in kHz */ -+ -+static int omap3beagle_panel_init(struct lcd_panel *panel, -+ struct omapfb_device *fbdev) -+{ -+ omap_request_gpio(LCD_PANEL_ENABLE_GPIO); -+ -+ return 0; -+} -+ -+static void omap3beagle_panel_cleanup(struct lcd_panel *panel) -+{ -+} -+ -+static int omap3beagle_panel_enable(struct lcd_panel *panel) -+{ -+ omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 1); -+ return 0; -+} -+ -+static void omap3beagle_panel_disable(struct lcd_panel *panel) -+{ -+ omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 0); -+} -+ -+static unsigned long omap3beagle_panel_get_caps(struct lcd_panel *panel) -+{ -+ return 0; -+} -+ -+struct lcd_panel omap3beagle_panel = { -+ .name = "omap3beagle", -+ .config = OMAP_LCDC_PANEL_TFT, -+ -+ .bpp = 24, -+ .data_lines = 24, -+ .x_res = LCD_XRES, -+ .y_res = LCD_YRES, -+ .hsw = 3, /* hsync_len (4) - 1 */ -+ .hfp = 3, /* right_margin (4) - 1 */ -+ .hbp = 39, /* left_margin (40) - 1 */ -+ .vsw = 1, /* vsync_len (2) - 1 */ -+ .vfp = 2, /* lower_margin */ -+ .vbp = 7, /* upper_margin (8) - 1 */ -+ -+ .pixel_clock = LCD_PIXCLOCK_MAX, -+ -+ .init = omap3beagle_panel_init, -+ .cleanup = omap3beagle_panel_cleanup, -+ .enable = omap3beagle_panel_enable, -+ .disable = omap3beagle_panel_disable, -+ .get_caps = omap3beagle_panel_get_caps, -+}; -+ -+static int omap3beagle_panel_probe(struct platform_device *pdev) -+{ -+ omapfb_register_panel(&omap3beagle_panel); -+ return 0; -+} -+ -+static int omap3beagle_panel_remove(struct platform_device *pdev) -+{ -+ return 0; -+} -+ -+static int omap3beagle_panel_suspend(struct platform_device *pdev, -+ pm_message_t mesg) -+{ -+ return 0; -+} -+ -+static int omap3beagle_panel_resume(struct platform_device *pdev) -+{ -+ return 0; -+} -+ -+struct platform_driver omap3beagle_panel_driver = { -+ .probe = omap3beagle_panel_probe, -+ .remove = omap3beagle_panel_remove, -+ .suspend = omap3beagle_panel_suspend, -+ .resume = omap3beagle_panel_resume, -+ .driver = { -+ .name = "omap3beagle_lcd", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init omap3beagle_panel_drv_init(void) -+{ -+ return platform_driver_register(&omap3beagle_panel_driver); -+} -+ -+static void __exit omap3beagle_panel_drv_exit(void) -+{ -+ platform_driver_unregister(&omap3beagle_panel_driver); -+} -+ -+module_init(omap3beagle_panel_drv_init); -+module_exit(omap3beagle_panel_drv_exit); --- -1.5.4.3 - diff --git a/packages/linux/linux-omap2-git/beagleboard/defconfig b/packages/linux/linux-omap2-git/beagleboard/defconfig index 8d238c6594..c5b893fc1f 100644 --- a/packages/linux/linux-omap2-git/beagleboard/defconfig +++ b/packages/linux/linux-omap2-git/beagleboard/defconfig @@ -1324,6 +1324,7 @@ CONFIG_SND_SOC=y # SoC Audio for the Texas Instruments OMAP # CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_MCBSP=y # # Open Sound System diff --git a/packages/linux/linux-omap2-git/beagleboard/l2-cache.patch b/packages/linux/linux-omap2-git/beagleboard/l2-cache.patch deleted file mode 100644 index f35252283b..0000000000 --- a/packages/linux/linux-omap2-git/beagleboard/l2-cache.patch +++ /dev/null @@ -1,162 +0,0 @@ -From: "Syed Mohammed, Khasim" <khasim@ti.com> -To: Koen Kooi <k.kooi@student.utwente.nl> -CC: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>, - "Woodruff, - Richard" <r-woodruff2@ti.com> -Date: Wed, 7 May 2008 13:12:13 +0530 -Subject: RE: public git l2 cache off. - -The below patch should get you going with L2 Cache enabled on GIT kernel, tested on Beagle board. - -Regards, -Khasim - - ---- my_linux_omap/arch/arm/mm/Kconfig 2008-05-06 16:37:17.000000000 +0530 -+++ git/arch/arm/mm/Kconfig 2008-05-07 12:40:05.000000000 +0530 -@@ -659,6 +659,20 @@ config CPU_DCACHE_SIZE - If your SoC is configured to have a different size, define the value - here with proper conditions. - -+choice -+ prompt "L2 Cache Size" -+ depends on ARCH_OMAP34XX -+ -+config CPU_LOCKDOWN_TO_64K_L2 -+ bool "Lock down L2 Cache to 64K" -+ -+config CPU_LOCKDOWN_TO_128K_L2 -+ bool "Lock down L2 Cache to 128K" -+ -+config CPU_LOCKDOWN_TO_256K_L2 -+ bool "Lock down L2 Cache to 256K" -+endchoice -+ - config CPU_DCACHE_WRITETHROUGH - bool "Force write through D-cache" - depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020) && !CPU_DCACHE_DISABLE -@@ -674,6 +688,12 @@ config CPU_CACHE_ROUND_ROBIN - Say Y here to use the predictable round-robin cache replacement - policy. Unless you specifically require this or are unsure, say N. - -+config CPU_L2CACHE_DISABLE -+ bool "Disable level 2 cache" -+ depends on CPU_V7 -+ help -+ Say Y here to disable the level 2 cache. If unsure, say N. -+ - config CPU_BPREDICT_DISABLE - bool "Disable branch prediction" - depends on CPU_ARM1020 || CPU_V6 || CPU_XSC3 || CPU_V7 - ---- /tmp/proc-v7.S 2008-05-07 10:05:37.949232951 +0200 -+++ git/arch/arm/mm/proc-v7.S 2008-05-07 10:13:18.626067909 +0200 -@@ -182,11 +182,72 @@ - mov r10, #0x1f @ domains 0, 1 = manager - mcr p15, 0, r10, c3, c0, 0 @ load domain access register - #endif -+#if defined(CONFIG_ARCH_OMAP3) -+ @ L2 cache is enabled in the aux control register -+ mrc p15, 0, r0, c1, c0, 1 -+ orr r0, r0, #0x11 @ speculative+no-alais protection -+#ifdef CONFIG_CPU_L2CACHE_DISABLE -+ bic r0, r0, #0x2 @ disable L2 Cache. -+#else -+ orr r0, r0, #0x2 @ enaable L2 Cache. -+#endif -+ -+/* On 3430 ES2.0 ZeBu and silicon, Aux Ctrl Reg can be written outside -+ * Secure mode also -+ */ -+ mcr p15, 0, r0, c1, c0, 1 -+ -+#ifdef CONFIG_ARCH_OMAP34XX -+#ifdef CONFIG_CPU_LOCKDOWN_TO_64K_L2 -+ mov r10, #0xfc -+ mcr p15, 1, r10, c9, c0, 0 -+#endif -+ -+#ifdef CONFIG_CPU_LOCKDOWN_TO_128K_L2 -+ mov r10, #0xf0 -+ mcr p15, 1, r10, c9, c0, 0 -+#endif -+ -+#ifdef CONFIG_CPU_LOCKDOWN_TO_256K_L2 -+ mov r10, #0x00 -+ mcr p15, 1, r10, c9, c0, 0 -+#endif -+#endif -+ - adr r5, v7_crval - ldmia r5, {r5, r6} -- mrc p15, 0, r0, c1, c0, 0 @ read control register -- bic r0, r0, r5 @ clear bits them -- orr r0, r0, r6 @ set them -+ mrc p15, 0, r0, c1, c0, 0 @ read control register -+ bic r0, r0, r5 @ clear bits them -+ orr r0, r0, r6 @ set them -+ mov pc, lr @ return to head.S:__ret -+ -+ /* -+ * TAT N EV F H R -+ * .EFR M.EE .UI. ..A. .RVI Z... B... .CAM -+ * 0xxx x0xx 11x0 01x1 0xxx x000 0111 1xxx < forced typical -+ * r rr rr r rr r r rrr rrrr r < always read only -+ * .000 ..00 ..0. ..0. .011 1... .... .101 < we want -+ */ -+ .type v7_crval, #object -+v7_crval: -+ crval clear=0x7322f006, mmuset=0x00003805, ucset=0x00001804 -+#else -+ -+#ifndef CONFIG_CPU_L2CACHE_DISABLE -+ @ L2 cache configuration in the L2 aux control register -+ mrc p15, 1, r10, c9, c0, 2 -+ bic r10, r10, #(1 << 16) @ L2 outer cache -+ mcr p15, 1, r10, c9, c0, 2 -+ @ L2 cache is enabled in the aux control register -+ mrc p15, 0, r10, c1, c0, 1 -+ orr r10, r10, #2 -+ mcr p15, 0, r10, c1, c0, 1 -+#endif -+ mrc p15, 0, r0, c1, c0, 0 @ read control register -+ ldr r10, cr1_clear @ get mask for bits to clear -+ bic r0, r0, r10 @ clear bits them -+ ldr r10, cr1_set @ get mask for bits to set -+ orr r0, r0, r10 @ set them - mov pc, lr @ return to head.S:__ret - - /* -@@ -195,9 +256,13 @@ - * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced - * 0 110 0011 1.00 .111 1101 < we want - */ -- .type v7_crval, #object --v7_crval: -- crval clear=0x0120c302, mmuset=0x00c0387d, ucset=0x00c0187c -+ .type cr1_clear, #object -+ .type cr1_set, #object -+cr1_clear: -+ .word 0x0120c302 -+cr1_set: -+ .word 0x00c0387d -+#endif - - __v7_setup_stack: - .space 4 * 11 @ 11 registers -@@ -205,7 +270,6 @@ - .type v7_processor_functions, #object - ENTRY(v7_processor_functions) - .word v7_early_abort -- .word pabort_ifar - .word cpu_v7_proc_init - .word cpu_v7_proc_fin - .word cpu_v7_reset -@@ -213,6 +277,7 @@ - .word cpu_v7_dcache_clean_area - .word cpu_v7_switch_mm - .word cpu_v7_set_pte_ext -+ .word pabort_ifar - .size v7_processor_functions, . - v7_processor_functions - - .type cpu_arch_name, #object diff --git a/packages/linux/linux-omap2-git/beagleboard/usb-timout.patch b/packages/linux/linux-omap2-git/beagleboard/usb-timout.patch deleted file mode 100644 index 2d1797cb66..0000000000 --- a/packages/linux/linux-omap2-git/beagleboard/usb-timout.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /tmp/ehci-hub.c 2008-04-30 11:41:59.381876290 +0200 -+++ git/drivers/usb/host/ehci-hub.c 2008-04-30 11:42:20.522875367 +0200 -@@ -734,7 +734,7 @@ - * this bit; seems too long to spin routinely... - */ - retval = handshake(ehci, status_reg, -- PORT_RESET, 0, 750); -+ PORT_RESET, 0, 1250); - if (retval != 0) { - ehci_err (ehci, "port %d reset error %d\n", - wIndex + 1, retval); diff --git a/packages/linux/linux-omap2_git.bb b/packages/linux/linux-omap2_git.bb index 356d26664a..0c7eed9cb0 100644 --- a/packages/linux/linux-omap2_git.bb +++ b/packages/linux/linux-omap2_git.bb @@ -2,20 +2,16 @@ require linux-omap.inc FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git/${MACHINE}" -SRCREV = "74c89552b4a5f9b5b066f74fa265248f9b5d3f1d" +SRCREV = "fe2c08002adea304a13ccb806aa1ab4058607094" PV = "2.6.25+2.6.26-rc2+git${SRCREV}" -PR = "r13" +PR = "r14" SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \ file://defconfig" SRC_URI_append_beagleboard = " file://no-harry-potter.diff;patch=1 \ - file://usb-timout.patch;patch=1 \ - file://l2-cache.patch;patch=1 \ - file://0001-board-omap3beagle-fix-merge-damage-in-RTC-code.patch;patch=1 \ - file://0001-omap3beagle-add-driver-to-turn-on-the-TFP410-framer.patch;patch=1 \ " COMPATIBLE_MACHINE = "omap2430sdp|omap2420h4|beagleboard" diff --git a/packages/linux/linux_2.6.24.bb b/packages/linux/linux_2.6.24.bb index 13f767c56b..3a51a594f4 100644 --- a/packages/linux/linux_2.6.24.bb +++ b/packages/linux/linux_2.6.24.bb @@ -73,6 +73,7 @@ SRC_URI_append_ts72xx = "\ file://ep93xx-serial-clocks.diff;patch=1 \ file://ep93xx-timer-accuracy.diff;patch=1 \ file://ep93xx-maverick-uniqid.patch;patch=1 \ + file://ep93xx-eth-phylib-framework.patch;patch=1 \ file://ts72xx-nfbit-fix.patch;patch=1 \ file://ts72xx-machine-id-fix.patch;patch=1 \ file://ts72xx-watchdog.patch;patch=1 \ diff --git a/packages/openssl/openssl-0.9.8g/debian.patch b/packages/openssl/openssl-0.9.8g/debian.patch index bf2e50b6ce..b7d571a7fd 100644 --- a/packages/openssl/openssl-0.9.8g/debian.patch +++ b/packages/openssl/openssl-0.9.8g/debian.patch @@ -173,93 +173,6 @@ --release=$(VERSION) `basename $$i`") \ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ $(PERL) util/extract-names.pl < $$i | \ ---- openssl-0.9.8g.orig/VMS/VMSify-conf.pl -+++ openssl-0.9.8g/VMS/VMSify-conf.pl -@@ -1,4 +1,4 @@ --#! /usr/bin/perl -+#!/usr/local/bin/perl - - use strict; - use warnings; ---- openssl-0.9.8g.orig/Netware/do_tests.pl -+++ openssl-0.9.8g/Netware/do_tests.pl -@@ -1,4 +1,4 @@ --# perl script to run OpenSSL tests -+#!/usr/local/bin/perl - - - my $base_path = "\\openssl"; ---- openssl-0.9.8g.orig/apps/CA.sh -+++ openssl-0.9.8g/apps/CA.sh -@@ -91,6 +91,7 @@ - -out ${CATOP}/$CAREQ - $CA -out ${CATOP}/$CACERT $CADAYS -batch \ - -keyfile ${CATOP}/private/$CAKEY -selfsign \ -+ -extensions v3_ca \ - -infiles ${CATOP}/$CAREQ - RET=$? - fi ---- openssl-0.9.8g.orig/apps/CA.pl.in -+++ openssl-0.9.8g/apps/CA.pl.in -@@ -65,6 +65,7 @@ - foreach (@ARGV) { - if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; -+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; - exit 0; - } elsif (/^-newcert$/) { - # create a certificate -@@ -165,6 +166,7 @@ - } else { - print STDERR "Unknown arg $_\n"; - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; -+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; - exit 1; - } - } ---- openssl-0.9.8g.orig/apps/speed.c -+++ openssl-0.9.8g/apps/speed.c -@@ -577,7 +577,7 @@ - #define MAX_BLOCK_SIZE 64 - #endif - unsigned char DES_iv[8]; -- unsigned char iv[MAX_BLOCK_SIZE/8]; -+ unsigned char iv[2*MAX_BLOCK_SIZE/8]; - #ifndef OPENSSL_NO_DES - DES_cblock *buf_as_des_cblock = NULL; - static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; ---- openssl-0.9.8g.orig/apps/CA.pl -+++ openssl-0.9.8g/apps/CA.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -+#!/usr/local/bin/perl - # - # CA - wrapper around ca to make it easier to use ... basically ca requires - # some setup stuff to be done before you can use it and this makes -@@ -65,6 +65,7 @@ - foreach (@ARGV) { - if ( /^(-\?|-h|-help)$/ ) { - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; -+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; - exit 0; - } elsif (/^-newcert$/) { - # create a certificate -@@ -165,6 +166,7 @@ - } else { - print STDERR "Unknown arg $_\n"; - print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; -+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; - exit 1; - } - } ---- openssl-0.9.8g.orig/os2/backwardify.pl -+++ openssl-0.9.8g/os2/backwardify.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/perl -w -+#!/usr/local/bin/perl - use strict; - - # Use as $0 --- openssl-0.9.8g.orig/Configure +++ openssl-0.9.8g/Configure @@ -1,4 +1,4 @@ @@ -363,6 +276,220 @@ elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/) { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n" if $export_var_as_fn; +--- openssl-0.9.8g.orig/Makefile.shared ++++ openssl-0.9.8g/Makefile.shared +@@ -151,9 +151,9 @@ + SHLIB_SUFFIX=; \ + ALLSYMSFLAGS='-Wl,--whole-archive'; \ + NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ +- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" ++ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" + +-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" ++DO_GNU_APP=LDFLAGS="$(CFLAGS)" + + #This is rather special. It's a special target with which one can link + #applications without bothering with any features that have anything to +--- openssl-0.9.8g.orig/config ++++ openssl-0.9.8g/config +@@ -162,8 +162,8 @@ + echo "${MACHINE}-whatever-linux1"; exit 0 + ;; + +- GNU*) +- echo "hurd-x86"; exit 0; ++ GNU:*|GNU/*:*) ++ echo "${MACHINE}-gnuish"; exit 0; + ;; + + LynxOS:*) +--- openssl-0.9.8g.orig/Makefile.org ++++ openssl-0.9.8g/Makefile.org +@@ -104,7 +104,7 @@ + ZLIB_INCLUDE= + LIBZLIB= + +-DIRS= crypto ssl engines apps test tools ++DIRS= crypto ssl engines apps tools + SHLIBDIRS= crypto ssl + + # dirs in crypto to build +@@ -125,10 +125,11 @@ + + MAKEFILE= Makefile + +-MANDIR=$(OPENSSLDIR)/man ++MANDIR=/usr/share/man + MAN1=1 + MAN3=3 +-MANSUFFIX= ++MANSUFFIX=ssl ++MANSECTION=SSL + SHELL=/bin/sh + + TOP= . +@@ -308,7 +309,8 @@ + echo 'Description: OpenSSL cryptography library'; \ + echo 'Version: '$(VERSION); \ + echo 'Requires: '; \ +- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \ ++ echo 'Libs: -L$${libdir} -lcrypto'; \ ++ echo 'Libs.private: $(EX_LIBS)'; \ + echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc + + libssl.pc: Makefile +@@ -321,7 +323,8 @@ + echo 'Description: Secure Sockets Layer and cryptography libraries'; \ + echo 'Version: '$(VERSION); \ + echo 'Requires: '; \ +- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \ ++ echo 'Libs: -L$${libdir} -lssl'; \ ++ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \ + echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc + + openssl.pc: Makefile +@@ -334,7 +337,8 @@ + echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ + echo 'Version: '$(VERSION); \ + echo 'Requires: '; \ +- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \ ++ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \ ++ echo 'Libs.private: $(EX_LIBS)'; \ + echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc + + Makefile: Makefile.org Configure config +@@ -478,7 +482,7 @@ + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ + $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ +- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \ ++ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines \ + $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \ + $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ + $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ +@@ -556,7 +560,7 @@ + echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ + (cd `$(PERL) util/dirname.pl $$i`; \ + sh -c "$$pod2man \ +- --section=$$sec --center=OpenSSL \ ++ --section=$${sec}$(MANSECTION) --center=OpenSSL \ + --release=$(VERSION) `basename $$i`") \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(PERL) util/extract-names.pl < $$i | \ +@@ -573,7 +577,7 @@ + echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ + (cd `$(PERL) util/dirname.pl $$i`; \ + sh -c "$$pod2man \ +- --section=$$sec --center=OpenSSL \ ++ --section=$${sec}$(MANSECTION) --center=OpenSSL \ + --release=$(VERSION) `basename $$i`") \ + > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ + $(PERL) util/extract-names.pl < $$i | \ +--- openssl-0.9.8g.orig/openssl.ld ++++ openssl-0.9.8g/openssl.ld +@@ -0,0 +1,5 @@ ++OPENSSL_0.9.8 { ++ global: ++ *; ++}; ++ +--- openssl-0.9.8g.orig/VMS/VMSify-conf.pl ++++ openssl-0.9.8g/VMS/VMSify-conf.pl +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/local/bin/perl + + use strict; + use warnings; +--- openssl-0.9.8g.orig/Netware/do_tests.pl ++++ openssl-0.9.8g/Netware/do_tests.pl +@@ -1,4 +1,4 @@ +-# perl script to run OpenSSL tests ++#!/usr/local/bin/perl + + + my $base_path = "\\openssl"; +--- openssl-0.9.8g.orig/apps/s_time.c ++++ openssl-0.9.8g/apps/s_time.c +@@ -117,6 +117,7 @@ + + /* The following if from times(3) man page. It may need to be changed + */ ++#undef HZ + #ifndef HZ + # ifdef _SC_CLK_TCK + # define HZ ((double)sysconf(_SC_CLK_TCK)) +--- openssl-0.9.8g.orig/apps/CA.sh ++++ openssl-0.9.8g/apps/CA.sh +@@ -91,6 +91,7 @@ + -out ${CATOP}/$CAREQ + $CA -out ${CATOP}/$CACERT $CADAYS -batch \ + -keyfile ${CATOP}/private/$CAKEY -selfsign \ ++ -extensions v3_ca \ + -infiles ${CATOP}/$CAREQ + RET=$? + fi +--- openssl-0.9.8g.orig/apps/CA.pl.in ++++ openssl-0.9.8g/apps/CA.pl.in +@@ -65,6 +65,7 @@ + foreach (@ARGV) { + if ( /^(-\?|-h|-help)$/ ) { + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; ++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; + exit 0; + } elsif (/^-newcert$/) { + # create a certificate +@@ -165,6 +166,7 @@ + } else { + print STDERR "Unknown arg $_\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; ++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; + exit 1; + } + } +--- openssl-0.9.8g.orig/apps/speed.c ++++ openssl-0.9.8g/apps/speed.c +@@ -577,7 +577,7 @@ + #define MAX_BLOCK_SIZE 64 + #endif + unsigned char DES_iv[8]; +- unsigned char iv[MAX_BLOCK_SIZE/8]; ++ unsigned char iv[2*MAX_BLOCK_SIZE/8]; + #ifndef OPENSSL_NO_DES + DES_cblock *buf_as_des_cblock = NULL; + static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0}; +--- openssl-0.9.8g.orig/apps/CA.pl ++++ openssl-0.9.8g/apps/CA.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl ++#!/usr/local/bin/perl + # + # CA - wrapper around ca to make it easier to use ... basically ca requires + # some setup stuff to be done before you can use it and this makes +@@ -65,6 +65,7 @@ + foreach (@ARGV) { + if ( /^(-\?|-h|-help)$/ ) { + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; ++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; + exit 0; + } elsif (/^-newcert$/) { + # create a certificate +@@ -165,6 +166,7 @@ + } else { + print STDERR "Unknown arg $_\n"; + print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n"; ++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n"; + exit 1; + } + } +--- openssl-0.9.8g.orig/os2/backwardify.pl ++++ openssl-0.9.8g/os2/backwardify.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!/usr/local/bin/perl + use strict; + + # Use as $0 --- openssl-0.9.8g.orig/engines/Makefile +++ openssl-0.9.8g/engines/Makefile @@ -97,13 +97,13 @@ @@ -461,20 +588,6 @@ chomp $hash; chomp $fprint; $fprint =~ s/^.*=//; ---- openssl-0.9.8g.orig/Makefile.shared -+++ openssl-0.9.8g/Makefile.shared -@@ -151,9 +151,9 @@ - SHLIB_SUFFIX=; \ - ALLSYMSFLAGS='-Wl,--whole-archive'; \ - NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ -- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" -+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" - --DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" -+DO_GNU_APP=LDFLAGS="$(CFLAGS)" - - #This is rather special. It's a special target with which one can link - #applications without bothering with any features that have anything to --- openssl-0.9.8g.orig/ssl/t1_lib.c +++ openssl-0.9.8g/ssl/t1_lib.c @@ -132,6 +132,10 @@ @@ -507,19 +620,6 @@ # # For Microsoft CL this is implemented as inline assembler. So that # even though this script can generate even Win32 code, we'll be ---- openssl-0.9.8g.orig/config -+++ openssl-0.9.8g/config -@@ -162,8 +162,8 @@ - echo "${MACHINE}-whatever-linux1"; exit 0 - ;; - -- GNU*) -- echo "hurd-x86"; exit 0; -+ GNU:*|GNU/*:*) -+ echo "${MACHINE}-gnuish"; exit 0; - ;; - - LynxOS:*) --- openssl-0.9.8g.orig/demos/tunala/configure.in +++ openssl-0.9.8g/demos/tunala/configure.in @@ -1,4 +1,4 @@ @@ -629,96 +729,170 @@ +No known bugs + +=cut ---- openssl-0.9.8g.orig/Makefile.org -+++ openssl-0.9.8g/Makefile.org -@@ -104,7 +104,7 @@ - ZLIB_INCLUDE= - LIBZLIB= +--- openssl-0.9.8g.orig/crypto/Makefile ++++ openssl-0.9.8g/crypto/Makefile +@@ -57,7 +57,7 @@ + echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ + echo '#endif' ) >buildinf.h --DIRS= crypto ssl engines apps test tools -+DIRS= crypto ssl engines apps tools - SHLIBDIRS= crypto ssl +-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl ++x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl + $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@ + x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl + $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@ +@@ -70,7 +70,7 @@ + uplink-cof.s: ../ms/uplink.pl + $(PERL) ../ms/uplink.pl coff > $@ - # dirs in crypto to build -@@ -125,10 +125,11 @@ +-x86_64cpuid.s: x86_64cpuid.pl ++x86_64cpuid.S: x86_64cpuid.pl + $(PERL) x86_64cpuid.pl $@ + ia64cpuid.s: ia64cpuid.S + $(CC) $(CFLAGS) -E ia64cpuid.S > $@ +--- openssl-0.9.8g.orig/crypto/x86cpuid.pl ++++ openssl-0.9.8g/crypto/x86cpuid.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/local/bin/perl - MAKEFILE= Makefile + push(@INC,"perlasm"); + require "x86asm.pl"; +--- openssl-0.9.8g.orig/crypto/opensslconf.h ++++ openssl-0.9.8g/crypto/opensslconf.h +@@ -10,6 +10,9 @@ + #ifndef OPENSSL_NO_GMP + # define OPENSSL_NO_GMP + #endif ++#ifndef OPENSSL_NO_IDEA ++# define OPENSSL_NO_IDEA ++#endif + #ifndef OPENSSL_NO_KRB5 + # define OPENSSL_NO_KRB5 + #endif +@@ -25,11 +28,11 @@ + #ifndef OPENSSL_NO_SEED + # define OPENSSL_NO_SEED + #endif +-#ifndef OPENSSL_NO_TLSEXT +-# define OPENSSL_NO_TLSEXT +-#endif --MANDIR=$(OPENSSLDIR)/man -+MANDIR=/usr/share/man - MAN1=1 - MAN3=3 --MANSUFFIX= -+MANSUFFIX=ssl -+MANSECTION=SSL - SHELL=/bin/sh + #endif /* OPENSSL_DOING_MAKEDEPEND */ ++#ifndef OPENSSL_THREADS ++# define OPENSSL_THREADS ++#endif + #ifndef OPENSSL_NO_DYNAMIC_ENGINE + # define OPENSSL_NO_DYNAMIC_ENGINE + #endif +@@ -45,6 +48,9 @@ + # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) + # define NO_GMP + # endif ++# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA) ++# define NO_IDEA ++# endif + # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) + # define NO_KRB5 + # endif +@@ -60,11 +66,10 @@ + # if defined(OPENSSL_NO_SEED) && !defined(NO_SEED) + # define NO_SEED + # endif +-# if defined(OPENSSL_NO_TLSEXT) && !defined(NO_TLSEXT) +-# define NO_TLSEXT +-# endif + #endif - TOP= . -@@ -308,7 +309,8 @@ - echo 'Description: OpenSSL cryptography library'; \ - echo 'Version: '$(VERSION); \ - echo 'Requires: '; \ -- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \ -+ echo 'Libs: -L$${libdir} -lcrypto'; \ -+ echo 'Libs.private: $(EX_LIBS)'; \ - echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc ++#define OPENSSL_CPUID_OBJ ++ + /* crypto/opensslconf.h.in */ - libssl.pc: Makefile -@@ -321,7 +323,8 @@ - echo 'Description: Secure Sockets Layer and cryptography libraries'; \ - echo 'Version: '$(VERSION); \ - echo 'Requires: '; \ -- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \ -+ echo 'Libs: -L$${libdir} -lssl'; \ -+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \ - echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc + /* Generate 80386 code? */ +@@ -72,8 +77,8 @@ - openssl.pc: Makefile -@@ -334,7 +337,8 @@ - echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \ - echo 'Version: '$(VERSION); \ - echo 'Requires: '; \ -- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \ -+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \ -+ echo 'Libs.private: $(EX_LIBS)'; \ - echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc + #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ + #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) +-#define ENGINESDIR "/usr/local/ssl/lib/engines" +-#define OPENSSLDIR "/usr/local/ssl" ++#define ENGINESDIR "/usr/lib/ssl/engines" ++#define OPENSSLDIR "/usr/lib/ssl" + #endif + #endif - Makefile: Makefile.org Configure config -@@ -478,7 +482,7 @@ - install_sw: - @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ - $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ -- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \ -+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines \ - $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \ - $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ - $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ -@@ -556,7 +560,7 @@ - echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ - (cd `$(PERL) util/dirname.pl $$i`; \ - sh -c "$$pod2man \ -- --section=$$sec --center=OpenSSL \ -+ --section=$${sec}$(MANSECTION) --center=OpenSSL \ - --release=$(VERSION) `basename $$i`") \ - > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ - $(PERL) util/extract-names.pl < $$i | \ -@@ -573,7 +577,7 @@ - echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \ - (cd `$(PERL) util/dirname.pl $$i`; \ - sh -c "$$pod2man \ -- --section=$$sec --center=OpenSSL \ -+ --section=$${sec}$(MANSECTION) --center=OpenSSL \ - --release=$(VERSION) `basename $$i`") \ - > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \ - $(PERL) util/extract-names.pl < $$i | \ ---- openssl-0.9.8g.orig/openssl.ld -+++ openssl-0.9.8g/openssl.ld -@@ -0,0 +1,5 @@ -+OPENSSL_0.9.8 { -+ global: -+ *; -+}; -+ +@@ -104,14 +109,14 @@ + * - Intel P6 because partial register stalls are very expensive; + * - elder Alpha because it lacks byte load/store instructions; + */ +-#define RC4_INT unsigned int ++#define RC4_INT unsigned char + #endif + #if !defined(RC4_CHUNK) + /* + * This enables code handling data aligned at natural CPU word + * boundary. See crypto/rc4/rc4_enc.c for further details. + */ +-#undef RC4_CHUNK ++#define RC4_CHUNK unsigned long + #endif + #endif + +@@ -119,7 +124,7 @@ + /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a + * %20 speed up (longs are 8 bytes, int's are 4). */ + #ifndef DES_LONG +-#define DES_LONG unsigned long ++#define DES_LONG unsigned int + #endif + #endif + +@@ -133,9 +138,9 @@ + /* The prime number generation stuff may not work when + * EIGHT_BIT but I don't care since I've only used this mode + * for debuging the bignum libraries */ +-#undef SIXTY_FOUR_BIT_LONG ++#define SIXTY_FOUR_BIT_LONG + #undef SIXTY_FOUR_BIT +-#define THIRTY_TWO_BIT ++#undef THIRTY_TWO_BIT + #undef SIXTEEN_BIT + #undef EIGHT_BIT + #endif +@@ -149,7 +154,7 @@ + + #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) + #define CONFIG_HEADER_BF_LOCL_H +-#undef BF_PTR ++#define BF_PTR2 + #endif /* HEADER_BF_LOCL_H */ + + #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) +@@ -179,7 +184,7 @@ + /* Unroll the inner loop, this sometimes helps, sometimes hinders. + * Very mucy CPU dependant */ + #ifndef DES_UNROLL +-#undef DES_UNROLL ++#define DES_UNROLL + #endif + + /* These default values were supplied by +--- openssl-0.9.8g.orig/crypto/x86_64cpuid.pl ++++ openssl-0.9.8g/crypto/x86_64cpuid.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/env perl ++#!/usr/local/bin/perl + + $output=shift; + $win64a=1 if ($output =~ /win64a\.[s|asm]/); +@@ -134,5 +134,9 @@ + .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid + + .section .init ++#ifdef OPENSSL_PIC ++ call OPENSSL_cpuid_setup\@PLT ++#else + call OPENSSL_cpuid_setup ++#endif + ___ --- openssl-0.9.8g.orig/crypto/md5/asm/md5-x86_64.pl +++ openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl @@ -1,4 +1,4 @@ @@ -747,26 +921,16 @@ #else # define LOAD ld # define X(i) [%i1+i*4] ---- openssl-0.9.8g.orig/crypto/Makefile -+++ openssl-0.9.8g/crypto/Makefile -@@ -57,7 +57,7 @@ - echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ - echo '#endif' ) >buildinf.h +--- openssl-0.9.8g.orig/crypto/sha/sha.h ++++ openssl-0.9.8g/crypto/sha/sha.h +@@ -59,6 +59,7 @@ + #ifndef HEADER_SHA_H + #define HEADER_SHA_H --x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl -+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl - $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@ - x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl - $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@ -@@ -70,7 +70,7 @@ - uplink-cof.s: ../ms/uplink.pl - $(PERL) ../ms/uplink.pl coff > $@ ++#include <stddef.h> + #include <openssl/e_os2.h> + #include <stddef.h> --x86_64cpuid.s: x86_64cpuid.pl -+x86_64cpuid.S: x86_64cpuid.pl - $(PERL) x86_64cpuid.pl $@ - ia64cpuid.s: ia64cpuid.S - $(CC) $(CFLAGS) -E ia64cpuid.S > $@ --- openssl-0.9.8g.orig/crypto/sha/asm/sha1-ia64.pl +++ openssl-0.9.8g/crypto/sha/asm/sha1-ia64.pl @@ -1,4 +1,4 @@ @@ -791,30 +955,9 @@ # # ==================================================================== # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL ---- openssl-0.9.8g.orig/crypto/sha/sha.h -+++ openssl-0.9.8g/crypto/sha/sha.h -@@ -59,6 +59,7 @@ - #ifndef HEADER_SHA_H - #define HEADER_SHA_H - -+#include <stddef.h> - #include <openssl/e_os2.h> - #include <stddef.h> - --- openssl-0.9.8g.orig/crypto/rand/md_rand.c +++ openssl-0.9.8g/crypto/rand/md_rand.c -@@ -271,7 +271,10 @@ - else - MD_Update(&m,&(state[st_idx]),j); - -+/* -+ * Don't add uninitialised data. - MD_Update(&m,buf,j); -+*/ - MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); - MD_Final(&m,local_md); - md_c[1]++; -@@ -465,8 +468,10 @@ +@@ -465,8 +465,10 @@ MD_Update(&m,local_md,MD_DIGEST_LENGTH); MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); #ifndef PURIFY @@ -864,14 +1007,6 @@ &stack_pop(3); &mov($L,&DWP(0,"ebx","",0)); ---- openssl-0.9.8g.orig/crypto/x86cpuid.pl -+++ openssl-0.9.8g/crypto/x86cpuid.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/local/bin/perl - - push(@INC,"perlasm"); - require "x86asm.pl"; --- openssl-0.9.8g.orig/crypto/rc4/asm/rc4-x86_64.pl +++ openssl-0.9.8g/crypto/rc4/asm/rc4-x86_64.pl @@ -1,4 +1,4 @@ @@ -992,124 +1127,6 @@ # Ascetic x86_64 AT&T to MASM assembler translator by <appro>. # ---- openssl-0.9.8g.orig/crypto/opensslconf.h -+++ openssl-0.9.8g/crypto/opensslconf.h -@@ -10,6 +10,9 @@ - #ifndef OPENSSL_NO_GMP - # define OPENSSL_NO_GMP - #endif -+#ifndef OPENSSL_NO_IDEA -+# define OPENSSL_NO_IDEA -+#endif - #ifndef OPENSSL_NO_KRB5 - # define OPENSSL_NO_KRB5 - #endif -@@ -25,11 +28,11 @@ - #ifndef OPENSSL_NO_SEED - # define OPENSSL_NO_SEED - #endif --#ifndef OPENSSL_NO_TLSEXT --# define OPENSSL_NO_TLSEXT --#endif - - #endif /* OPENSSL_DOING_MAKEDEPEND */ -+#ifndef OPENSSL_THREADS -+# define OPENSSL_THREADS -+#endif - #ifndef OPENSSL_NO_DYNAMIC_ENGINE - # define OPENSSL_NO_DYNAMIC_ENGINE - #endif -@@ -45,6 +48,9 @@ - # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) - # define NO_GMP - # endif -+# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA) -+# define NO_IDEA -+# endif - # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) - # define NO_KRB5 - # endif -@@ -60,11 +66,10 @@ - # if defined(OPENSSL_NO_SEED) && !defined(NO_SEED) - # define NO_SEED - # endif --# if defined(OPENSSL_NO_TLSEXT) && !defined(NO_TLSEXT) --# define NO_TLSEXT --# endif - #endif - -+#define OPENSSL_CPUID_OBJ -+ - /* crypto/opensslconf.h.in */ - - /* Generate 80386 code? */ -@@ -72,8 +77,8 @@ - - #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ - #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) --#define ENGINESDIR "/usr/local/ssl/lib/engines" --#define OPENSSLDIR "/usr/local/ssl" -+#define ENGINESDIR "/usr/lib/ssl/engines" -+#define OPENSSLDIR "/usr/lib/ssl" - #endif - #endif - -@@ -104,14 +109,14 @@ - * - Intel P6 because partial register stalls are very expensive; - * - elder Alpha because it lacks byte load/store instructions; - */ --#define RC4_INT unsigned int -+#define RC4_INT unsigned char - #endif - #if !defined(RC4_CHUNK) - /* - * This enables code handling data aligned at natural CPU word - * boundary. See crypto/rc4/rc4_enc.c for further details. - */ --#undef RC4_CHUNK -+#define RC4_CHUNK unsigned long - #endif - #endif - -@@ -119,7 +124,7 @@ - /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a - * %20 speed up (longs are 8 bytes, int's are 4). */ - #ifndef DES_LONG --#define DES_LONG unsigned long -+#define DES_LONG unsigned int - #endif - #endif - -@@ -133,9 +138,9 @@ - /* The prime number generation stuff may not work when - * EIGHT_BIT but I don't care since I've only used this mode - * for debuging the bignum libraries */ --#undef SIXTY_FOUR_BIT_LONG -+#define SIXTY_FOUR_BIT_LONG - #undef SIXTY_FOUR_BIT --#define THIRTY_TWO_BIT -+#undef THIRTY_TWO_BIT - #undef SIXTEEN_BIT - #undef EIGHT_BIT - #endif -@@ -149,7 +154,7 @@ - - #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) - #define CONFIG_HEADER_BF_LOCL_H --#undef BF_PTR -+#define BF_PTR2 - #endif /* HEADER_BF_LOCL_H */ - - #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) -@@ -179,7 +184,7 @@ - /* Unroll the inner loop, this sometimes helps, sometimes hinders. - * Very mucy CPU dependant */ - #ifndef DES_UNROLL --#undef DES_UNROLL -+#define DES_UNROLL - #endif - - /* These default values were supplied by --- openssl-0.9.8g.orig/crypto/pkcs7/pk7_mime.c +++ openssl-0.9.8g/crypto/pkcs7/pk7_mime.c @@ -335,9 +335,9 @@ @@ -1131,24 +1148,6 @@ # # Implemented as a Perl wrapper as we want to support several different # architectures with single file. We pick up the target based on the ---- openssl-0.9.8g.orig/crypto/x86_64cpuid.pl -+++ openssl-0.9.8g/crypto/x86_64cpuid.pl -@@ -1,4 +1,4 @@ --#!/usr/bin/env perl -+#!/usr/local/bin/perl - - $output=shift; - $win64a=1 if ($output =~ /win64a\.[s|asm]/); -@@ -134,5 +134,9 @@ - .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid - - .section .init -+#ifdef OPENSSL_PIC -+ call OPENSSL_cpuid_setup\@PLT -+#else - call OPENSSL_cpuid_setup -+#endif - ___ --- openssl-0.9.8g.orig/crypto/aes/asm/aes-586.pl +++ openssl-0.9.8g/crypto/aes/asm/aes-586.pl @@ -1,4 +1,4 @@ @@ -1263,14 +1262,6 @@ while(<STDIN>) { if (/=for\s+comment\s+openssl_manual_section:(\S+)/) ---- openssl-0.9.8g.orig/util/pl/netware.pl -+++ openssl-0.9.8g/util/pl/netware.pl -@@ -1,4 +1,4 @@ --# Metrowerks Codewarrior for NetWare -+#!/usr/local/bin/perl - # - - # The import files and other misc imports needed to link --- openssl-0.9.8g.orig/util/mkdef.pl +++ openssl-0.9.8g/util/mkdef.pl @@ -1,4 +1,4 @@ @@ -1279,3 +1270,11 @@ # # generate a .def file # +--- openssl-0.9.8g.orig/util/pl/netware.pl ++++ openssl-0.9.8g/util/pl/netware.pl +@@ -1,4 +1,4 @@ +-# Metrowerks Codewarrior for NetWare ++#!/usr/local/bin/perl + # + + # The import files and other misc imports needed to link diff --git a/packages/openssl/openssl-native_0.9.7m.bb b/packages/openssl/openssl-native_0.9.7m.bb index f030ca10dd..e7dc7c7e5e 100644 --- a/packages/openssl/openssl-native_0.9.7m.bb +++ b/packages/openssl/openssl-native_0.9.7m.bb @@ -6,10 +6,6 @@ require openssl.inc export FULL_OPTIMIZATION = " " export BUILD_OPTIMIZATION = " " -export CFLAG = " ${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ - -DTERMIO " - - PR = "r2" SRC_URI += "file://debian.patch;patch=1 \ diff --git a/packages/openssl/openssl-native_0.9.8g.bb b/packages/openssl/openssl-native_0.9.8g.bb index e0fe33c9f9..9ae8e391d0 100644 --- a/packages/openssl/openssl-native_0.9.8g.bb +++ b/packages/openssl/openssl-native_0.9.8g.bb @@ -4,13 +4,12 @@ DEFAULT_PREFERENCE = "-1" require openssl.inc +PR = "r1" + # This flag can contain target options (e.g -mfpu=neon for armv7-a systems) export FULL_OPTIMIZATION = " " export BUILD_OPTIMIZATION = " " -export CFLAG = " ${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \ - -DTERMIO " - SRC_URI += "file://debian.patch;patch=1 \ file://configure-targets.patch;patch=1 \ file://shared-libs.patch;patch=1" diff --git a/packages/openssl/openssl.inc b/packages/openssl/openssl.inc index b77fda9a5b..2ec1d91e7a 100644 --- a/packages/openssl/openssl.inc +++ b/packages/openssl/openssl.inc @@ -55,6 +55,12 @@ do_configure () { linux-i686) target=debian-i386-i686/cmov ;; + linux-mips) + target=debian-mips + ;; + linux-mipsel) + target=debian-mipsel + ;; linux-powerpc) target=linux-ppc ;; diff --git a/packages/openssl/openssl_0.9.8g.bb b/packages/openssl/openssl_0.9.8g.bb index ed99d264f4..1cb360f967 100644 --- a/packages/openssl/openssl_0.9.8g.bb +++ b/packages/openssl/openssl_0.9.8g.bb @@ -2,7 +2,7 @@ inherit pkgconfig require openssl.inc -PR = "r8" +PR = "r9" SRC_URI += "file://debian.patch;patch=1 \ file://configure-targets.patch;patch=1 \ |